Skip to content

Commit

Permalink
Force flush on effect changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xsear committed Feb 11, 2024
1 parent 6d83181 commit 1bf656b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions UdpHosts/GameServer/Entities/BaseAptitudeEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public EffectState AddEffect(Effect effect, Context context)
};
var index = state.Index;
SetStatusEffect(index, time, data);
Shard.EntityMan.FlushChanges(this); // Force flush so that we communicate every change

return state;
}
Expand All @@ -83,6 +84,7 @@ public void ClearEffect(EffectState state)
ActiveEffects[state.Index] = null;
var time = unchecked((ushort)state.Context.Shard.CurrentTime);
ClearStatusEffect(state.Index, time, state.Effect.Id);
Shard.EntityMan.FlushChanges(this); // Force flush so that we communicate every change
}

public abstract void SetStatusEffect(byte index, ushort time, StatusEffectData data);
Expand Down

0 comments on commit 1bf656b

Please sign in to comment.