diff options
author | Shauren <shauren.trinity@gmail.com> | 2015-05-04 12:39:36 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2015-05-04 12:39:36 +0200 |
commit | edbd44a67530f2938864fd054182553b3d5ab1ac (patch) | |
tree | 7648042a373a66cce81fb9721c77f163ac54fb08 /src/server/scripts/Commands | |
parent | 06caa18119ce3e2d7ff1308c9b65595d08993d47 (diff) |
Core/Creatures: Extended npcflags to uint64
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r-- | src/server/scripts/Commands/cs_modify.cpp | 10 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 48a514fd0db..3bcb6862b7f 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -313,7 +313,7 @@ public: { uint32 factionid = target->getFaction(); uint32 flag = target->GetUInt32Value(UNIT_FIELD_FLAGS); - uint32 npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS); + uint64 npcflag = target->GetUInt64Value(UNIT_NPC_FLAGS); uint32 dyflag = target->GetUInt32Value(OBJECT_DYNAMIC_FLAGS); handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUID().ToString().c_str(), factionid, flag, npcflag, dyflag); return true; @@ -330,11 +330,11 @@ public: char* pnpcflag = strtok(NULL, " "); - uint32 npcflag; + uint64 npcflag; if (!pnpcflag) - npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS); + npcflag = target->GetUInt64Value(UNIT_NPC_FLAGS); else - npcflag = atoi(pnpcflag); + npcflag = std::strtoull(pnpcflag, nullptr, 10); char* pdyflag = strtok(NULL, " "); @@ -355,7 +355,7 @@ public: target->setFaction(factionid); target->SetUInt32Value(UNIT_FIELD_FLAGS, flag); - target->SetUInt32Value(UNIT_NPC_FLAGS, npcflag); + target->SetUInt64Value(UNIT_NPC_FLAGS, npcflag); target->SetUInt32Value(OBJECT_DYNAMIC_FLAGS, dyflag); return true; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 5dc1696057e..81cad2db188 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -634,7 +634,7 @@ public: if (!*args) return false; - uint32 npcFlags = (uint32) atoi((char*)args); + uint64 npcFlags = std::strtoull(args, nullptr, 10); Creature* creature = handler->getSelectedCreature(); @@ -645,11 +645,11 @@ public: return false; } - creature->SetUInt32Value(UNIT_NPC_FLAGS, npcFlags); + creature->SetUInt64Value(UNIT_NPC_FLAGS, npcFlags); PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_NPCFLAG); - stmt->setUInt32(0, npcFlags); + stmt->setUInt64(0, npcFlags); stmt->setUInt32(1, creature->GetEntry()); WorldDatabase.Execute(stmt); @@ -726,7 +726,7 @@ public: CreatureTemplate const* cInfo = target->GetCreatureTemplate(); uint32 faction = target->getFaction(); - uint32 npcflags = target->GetUInt32Value(UNIT_NPC_FLAGS); + uint64 npcflags = target->GetUInt64Value(UNIT_NPC_FLAGS); uint32 mechanicImmuneMask = cInfo->MechanicImmuneMask; uint32 displayid = target->GetDisplayId(); uint32 nativeid = target->GetNativeDisplayId(); |