Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag

Port From (https://github.com/TrinityCore/TrinityCore/commit/b47185cabfbdeeaf492bf2303635db07ce703785)
This commit is contained in:
hondacrx
2022-05-30 16:12:11 -04:00
parent f53c4cb009
commit 442da7511f
43 changed files with 188 additions and 185 deletions
+4 -4
View File
@@ -1271,7 +1271,7 @@ namespace Game.Entities
if (apply)
{
SetTarget(ObjectGuid.Empty);
AddUnitFlag(UnitFlags.Stunned);
SetUnitFlag(UnitFlags.Stunned);
StopMoving();
@@ -1405,7 +1405,7 @@ namespace Game.Entities
if (mount != 0)
SetMountDisplayId(mount);
AddUnitFlag(UnitFlags.Mount);
SetUnitFlag(UnitFlags.Mount);
Player player = ToPlayer();
if (player != null)
@@ -1429,7 +1429,7 @@ namespace Game.Entities
Battleground bg = ToPlayer().GetBattleground();
// don't unsummon pet in arena but SetFlag UNIT_FLAG_STUNNED to disable pet's interface
if (bg && bg.IsArena())
pet.AddUnitFlag(UnitFlags.Stunned);
pet.SetUnitFlag(UnitFlags.Stunned);
else
player.UnsummonPetTemporaryIfAny();
}
@@ -1438,7 +1438,7 @@ namespace Game.Entities
Unit charm = player.GetCharmed();
if (charm)
if (charm.GetTypeId() == TypeId.Unit)
charm.AddUnitFlag(UnitFlags.Stunned);
charm.SetUnitFlag(UnitFlags.Stunned);
player.SendMovementSetCollisionHeight(player.GetCollisionHeight(), UpdateCollisionHeightReason.Mount);
}