aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp8
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp4
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp4
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);