diff options
| author | Shauren <shauren.trinity@gmail.com> | 2022-03-26 18:59:44 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-26 18:59:44 +0100 |
| commit | 4eba9786708dd3b22d9053c1a14eac7e6d03242e (patch) | |
| tree | f68dcd89c7b41d3b403facb0a0fa7fd1fdb1eedf /src/server/scripts/Commands | |
| parent | ad30c22902a23996f805f74851aef58935c56a6e (diff) | |
Core/Misc: Rename SetXXXFlags updatefield functions to ReplaceAllXXXFlags
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_modify.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_reset.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 9960143f455..dce7d2cb339 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -268,10 +268,10 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUID().ToString().c_str(), factionid, flag, std::to_string(npcflag).c_str(), dyflag); target->SetFaction(factionid); - target->SetUnitFlags(UnitFlags(flag)); - target->SetNpcFlags(NPCFlags(npcflag & 0xFFFFFFFF)); - target->SetNpcFlags2(NPCFlags2(npcflag >> 32)); - target->SetDynamicFlags(dyflag); + target->ReplaceAllUnitFlags(UnitFlags(flag)); + target->ReplaceAllNpcFlags(NPCFlags(npcflag & 0xFFFFFFFF)); + target->ReplaceAllNpcFlags2(NPCFlags2(npcflag >> 32)); + target->ReplaceAllDynamicFlags(dyflag); return true; } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index e90ded28df5..e7198d0afff 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -412,8 +412,8 @@ public: return false; } - creature->SetNpcFlags(npcFlags); - creature->SetNpcFlags2(npcFlags2); + creature->ReplaceAllNpcFlags(npcFlags); + creature->ReplaceAllNpcFlags2(npcFlags2); WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_NPCFLAG); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 2cddb813ac1..139f25b5226 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -114,9 +114,9 @@ public: if (player->GetShapeshiftForm() == FORM_NONE) player->InitDisplayIds(); - player->SetPvpFlags(UNIT_BYTE2_FLAG_PVP); + player->ReplaceAllPvpFlags(UNIT_BYTE2_FLAG_PVP); - player->SetUnitFlags(UNIT_FLAG_PLAYER_CONTROLLED); + player->ReplaceAllUnitFlags(UNIT_FLAG_PLAYER_CONTROLLED); //-1 is default value player->SetWatchedFactionIndex(-1); |
