diff options
| author | pete318 <pete318@hotmail.com> | 2015-10-11 00:17:46 +0100 |
|---|---|---|
| committer | pete318 <pete318@hotmail.com> | 2015-10-12 23:10:41 +0200 |
| commit | b1032ed6203a5839906fab7137484b0ef8f0e58f (patch) | |
| tree | 79e418a6fb2a65e50814db850fa910790f48a9cf /src/server/scripts | |
| parent | f179c4180fec834c2d588f27994452649bdbe87c (diff) | |
Change many uint32 to ObjectGuid::LowType in line with 6.x changes.
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_ban.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_character.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_gobject.cpp | 19 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_guild.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_list.cpp | 10 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 24 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_wp.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/isle_of_conquest.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/World/action_ip_logger.cpp | 6 |
13 files changed, 46 insertions, 45 deletions
diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index fc246898186..ed7b31198db 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -300,7 +300,7 @@ public: return false; Player* target = ObjectAccessor::FindPlayerByName(args); - uint32 targetGuid = 0; + ObjectGuid::LowType targetGuid = 0; std::string name(args); if (!target) diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 405f6fde624..8714838879f 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -909,7 +909,7 @@ public: guidStr = strtok(NULL, " "); } - uint32 guid = 0; + ObjectGuid::LowType guid = 0; if (guidStr) { diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 422104fedd5..901043980c5 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -971,7 +971,7 @@ public: if (!e || !f) return false; - uint32 guid = (uint32)atoi(e); + ObjectGuid::LowType guid = (uint32)atoi(e); uint32 index = (uint32)atoi(f); Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HighGuid::Item, 0, guid)); @@ -1001,7 +1001,7 @@ public: if (!e || !f || !g) return false; - uint32 guid = (uint32)atoi(e); + ObjectGuid::LowType guid = (uint32)atoi(e); uint32 index = (uint32)atoi(f); uint32 value = (uint32)atoi(g); @@ -1027,7 +1027,7 @@ public: if (!e) return false; - uint32 guid = (uint32)atoi(e); + ObjectGuid::LowType guid = (uint32)atoi(e); Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HighGuid::Item, guid)); diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 0a45506c736..9710a7e634c 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -81,7 +81,7 @@ public: if (!id) return false; - uint32 guidLow = atoi(id); + ObjectGuid::LowType guidLow = atoi(id); if (!guidLow) return false; @@ -150,7 +150,7 @@ public: Map* map = player->GetMap(); GameObject* object = new GameObject; - uint32 guidLow = map->GenerateLowGuid<HighGuid::GameObject>(); + ObjectGuid::LowType guidLow = map->GenerateLowGuid<HighGuid::GameObject>(); if (!object->Create(guidLow, objectInfo->entry, map, player->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY)) { @@ -292,7 +292,8 @@ public: bool found = false; float x, y, z, o; - uint32 guidLow, id, phase; + ObjectGuid::LowType guidLow; + uint32 id, phase; uint16 mapId; uint32 poolId; @@ -352,7 +353,7 @@ public: if (!id) return false; - uint32 guidLow = atoi(id); + ObjectGuid::LowType guidLow = atoi(id); if (!guidLow) return false; @@ -400,7 +401,7 @@ public: if (!id) return false; - uint32 guidLow = atoi(id); + ObjectGuid::LowType guidLow = atoi(id); if (!guidLow) return false; @@ -459,7 +460,7 @@ public: if (!id) return false; - uint32 guidLow = atoi(id); + ObjectGuid::LowType guidLow = atoi(id); if (!guidLow) return false; @@ -533,7 +534,7 @@ public: if (!id) return false; - uint32 guidLow = atoi(id); + ObjectGuid::LowType guidLow = atoi(id); if (!guidLow) return false; @@ -587,7 +588,7 @@ public: do { Field* fields = result->Fetch(); - uint32 guid = fields[0].GetUInt32(); + ObjectGuid::LowType guid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); float x = fields[2].GetFloat(); float y = fields[3].GetFloat(); @@ -656,7 +657,7 @@ public: if (!id) return false; - uint32 guidLow = atoi(id); + ObjectGuid::LowType guidLow = atoi(id); if (!guidLow) return false; diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index a735e296f59..c2b9076017a 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -158,7 +158,7 @@ public: if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid)) return false; - uint32 guildId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(targetGuid); + ObjectGuid::LowType guildId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(targetGuid); if (!guildId) return false; @@ -184,7 +184,7 @@ public: if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &target_name)) return false; - uint32 guildId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(targetGuid); + ObjectGuid::LowType guildId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(targetGuid); if (!guildId) return false; diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index fb051832d7b..0de62f805de 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -109,7 +109,7 @@ public: do { Field* fields = result->Fetch(); - uint32 guid = fields[0].GetUInt32(); + ObjectGuid::LowType guid = fields[0].GetUInt32(); float x = fields[1].GetFloat(); float y = fields[2].GetFloat(); float z = fields[3].GetFloat(); @@ -235,8 +235,8 @@ public: do { Field* fields = result->Fetch(); - uint32 itemGuid = fields[0].GetUInt32(); - uint32 itemSender = fields[1].GetUInt32(); + ObjectGuid::LowType itemGuid = fields[0].GetUInt32(); + ObjectGuid::LowType itemSender = fields[1].GetUInt32(); uint32 itemReceiver = fields[2].GetUInt32(); uint32 itemSenderAccountId = fields[3].GetUInt32(); std::string itemSenderName = fields[4].GetString(); @@ -398,7 +398,7 @@ public: do { Field* fields = result->Fetch(); - uint32 guid = fields[0].GetUInt32(); + ObjectGuid::LowType guid = fields[0].GetUInt32(); float x = fields[1].GetFloat(); float y = fields[2].GetFloat(); float z = fields[3].GetFloat(); @@ -534,7 +534,7 @@ public: { do { - uint32 item_guid = (*result2)[0].GetUInt32(); + ObjectGuid::LowType item_guid = (*result2)[0].GetUInt32(); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_ITEMS); stmt->setUInt32(0, item_guid); PreparedQueryResult result3 = CharacterDatabase.Query(stmt); diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 56aa6d0bf92..cb2d467f8d7 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -1410,7 +1410,7 @@ public: do { Field* characterFields = result2->Fetch(); - uint32 guid = characterFields[0].GetUInt32(); + ObjectGuid::LowType guid = characterFields[0].GetUInt32(); std::string name = characterFields[1].GetString(); handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 21a55b1558a..725fdd4c27d 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1470,7 +1470,7 @@ public: // Account data print variables std::string userName = handler->GetTrinityString(LANG_ERROR); uint32 accId = 0; - uint32 lowguid = targetGuid.GetCounter(); + ObjectGuid::LowType lowguid = targetGuid.GetCounter(); std::string eMail = handler->GetTrinityString(LANG_ERROR); std::string regMail = handler->GetTrinityString(LANG_ERROR); uint32 security = 0; @@ -1659,7 +1659,7 @@ public: { Field* fields = result4->Fetch(); xp = fields[0].GetUInt32(); // Used for "current xp" output and "%u XP Left" calculation - uint32 gguid = fields[1].GetUInt32(); // We check if have a guild for the person, so we might not require to query it at all + ObjectGuid::LowType gguid = fields[1].GetUInt32(); // We check if have a guild for the person, so we might not require to query it at all xptotal = sObjectMgr->GetXPForLevel(level); if (gguid != 0) @@ -2487,7 +2487,7 @@ public: // If player found: delete his freeze aura Field* fields = result->Fetch(); - uint32 lowGuid = fields[0].GetUInt32(); + ObjectGuid::LowType lowGuid = fields[0].GetUInt32(); stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_AURA_FROZEN); stmt->setUInt32(0, lowGuid); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index dcf75d0c5db..8e7a1387a32 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -260,7 +260,7 @@ public: if (Transport* trans = chr->GetTransport()) { - uint32 guid = map->GenerateLowGuid<HighGuid::Unit>(); + ObjectGuid::LowType guid = map->GenerateLowGuid<HighGuid::Unit>(); CreatureData& data = sObjectMgr->NewOrExistCreatureData(guid); data.id = id; data.phaseMask = chr->GetPhaseMaskForSpawn(); @@ -286,7 +286,7 @@ public: creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn()); - uint32 db_guid = creature->GetSpawnId(); + ObjectGuid::LowType db_guid = creature->GetSpawnId(); // To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells() // current "creature" variable is deleted and created fresh new, otherwise old values might trigger asserts or cause undefined behavior @@ -368,7 +368,7 @@ public: char* guidStr = strtok((char*)args, " "); char* waitStr = strtok((char*)NULL, " "); - uint32 lowGuid = atoi((char*)guidStr); + ObjectGuid::LowType lowGuid = atoi((char*)guidStr); // attempt check creature existence by DB data CreatureData const* data = sObjectMgr->GetCreatureData(lowGuid); @@ -489,7 +489,7 @@ public: if (!cId) return false; - uint32 lowguid = atoi(cId); + ObjectGuid::LowType lowguid = atoi(cId); if (!lowguid) return false; @@ -764,7 +764,7 @@ public: do { Field* fields = result->Fetch(); - uint32 guid = fields[0].GetUInt32(); + ObjectGuid::LowType guid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); float x = fields[2].GetFloat(); float y = fields[3].GetFloat(); @@ -790,7 +790,7 @@ public: //move selected creature static bool HandleNpcMoveCommand(ChatHandler* handler, char const* args) { - uint32 lowguid = 0; + ObjectGuid::LowType lowguid = 0; Creature* creature = handler->getSelectedCreature(); @@ -939,7 +939,7 @@ public: if (!guid_str) return false; - uint32 lowguid = 0; + ObjectGuid::LowType lowguid = 0; Creature* creature = NULL; if (dontdel_str) @@ -1101,7 +1101,7 @@ public: mtype = RANDOM_MOTION_TYPE; Creature* creature = handler->getSelectedCreature(); - uint32 guidLow = 0; + ObjectGuid::LowType guidLow = 0; if (creature) guidLow = creature->GetSpawnId(); @@ -1150,7 +1150,7 @@ public: } Creature* creature = handler->getSelectedCreature(); - uint32 guidLow = 0; + ObjectGuid::LowType guidLow = 0; if (creature) guidLow = creature->GetSpawnId(); @@ -1414,7 +1414,7 @@ public: if (!*args) return false; - uint32 leaderGUID = (uint32) atoi((char*)args); + ObjectGuid::LowType leaderGUID = (uint32) atoi((char*)args); Creature* creature = handler->getSelectedCreature(); if (!creature || !creature->GetSpawnId()) @@ -1424,7 +1424,7 @@ public: return false; } - uint32 lowguid = creature->GetSpawnId(); + ObjectGuid::LowType lowguid = creature->GetSpawnId(); if (creature->GetFormation()) { handler->PSendSysMessage("Selected creature is already member of group %u", creature->GetFormation()->GetId()); @@ -1466,7 +1466,7 @@ public: if (!*args) return false; - uint32 linkguid = (uint32) atoi((char*)args); + ObjectGuid::LowType linkguid = (uint32) atoi((char*)args); Creature* creature = handler->getSelectedCreature(); diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 00b8bec51c8..9db1e5d68d8 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -150,7 +150,7 @@ public: path_number = strtok((char*)args, " "); uint32 pathid = 0; - uint32 guidLow = 0; + ObjectGuid::LowType guidLow = 0; Creature* target = handler->getSelectedCreature(); // Did player provide a path_id? @@ -1037,7 +1037,7 @@ public: do { Field* fields = result->Fetch(); - uint32 guid = fields[0].GetUInt32(); + ObjectGuid::LowType guid = fields[0].GetUInt32(); Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HighGuid::Unit, VISUAL_WAYPOINT, guid)); if (!creature) { diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index c4ab8f76487..0ae870b27ee 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -808,7 +808,7 @@ public: private: int8 _phase; uint32 _moveTimer; - uint32 _eventStarterGuidLow; + ObjectGuid::LowType _eventStarterGuidLow; GuidList _explosivesGuids; EventMap _events; }; diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index 79a20da9702..fccdc8098b6 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -206,7 +206,7 @@ class spell_ioc_parachute_ic : public SpellScriptLoader class StartLaunchEvent : public BasicEvent { public: - StartLaunchEvent(float x, float y, float z, uint32 lowGuid) : _x(x), _y(y), _z(z), _lowGuid(lowGuid) + StartLaunchEvent(float x, float y, float z, ObjectGuid::LowType lowGuid) : _x(x), _y(y), _z(z), _lowGuid(lowGuid) { } @@ -227,7 +227,7 @@ class StartLaunchEvent : public BasicEvent private: float _x, _y, _z; - uint32 _lowGuid; + ObjectGuid::LowType _lowGuid; }; class spell_ioc_launch : public SpellScriptLoader diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index 4a60a80ee5a..f0ffbe1c7f3 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -96,7 +96,7 @@ class AccountActionIpLogger : public AccountScript // We declare all the required variables uint32 playerGuid = accountId; - uint32 characterGuid = 0; + ObjectGuid::LowType characterGuid = 0; std::string systemNote = "ERROR"; // "ERROR" is a placeholder here. We change it later. // With this switch, we change systemNote so that we have a more accurate phrasing of what type it is. @@ -201,7 +201,7 @@ class CharacterActionIpLogger : public PlayerScript // We declare all the required variables uint32 playerGuid = player->GetSession()->GetAccountId(); - uint32 characterGuid = player->GetGUID().GetCounter(); + ObjectGuid::LowType characterGuid = player->GetGUID().GetCounter(); const std::string currentIp = player->GetSession()->GetRemoteAddress(); std::string systemNote = "ERROR"; // "ERROR" is a placeholder here. We change it... @@ -269,7 +269,7 @@ public: // Else, this script isn't loaded in the first place: We require no config check. // We declare all the required variables - uint32 characterGuid = guid.GetCounter(); // We have no access to any member function of Player* or WorldSession*. So use old-fashioned way. + ObjectGuid::LowType characterGuid = guid.GetCounter(); // We have no access to any member function of Player* or WorldSession*. So use old-fashioned way. // Query playerGuid/accountId, as we only have characterGuid std::string systemNote = "ERROR"; // "ERROR" is a placeholder here. We change it later. |
