Core/GameObject: Skip setting state of NewFlag, if new state is equivalent to old state

Port From (https://github.com/TrinityCore/TrinityCore/commit/6175467c3e66fa09d8ff1e0f091375c26f7529e5)
This commit is contained in:
hondacrx
2023-09-14 04:48:19 -04:00
parent dbd3a16c11
commit 0bb8152623
@@ -4401,6 +4401,9 @@ namespace Game.Entities
public void SetState(FlagState newState, Player player)
{
if (_state == newState)
return;
FlagState oldState = _state;
_state = newState;