Change many uint32 to ObjectGuid::LowType in line with 6.x changes.

(cherry picked from commit b1032ed620)

Conflicts:
	src/server/game/AuctionHouse/AuctionHouseMgr.h
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/DynamicObject/DynamicObject.cpp
	src/server/game/Entities/DynamicObject/DynamicObject.h
	src/server/game/Entities/GameObject/GameObject.cpp
	src/server/game/Entities/GameObject/GameObject.h
	src/server/game/Entities/Object/ObjectGuid.h
	src/server/game/Entities/Pet/Pet.cpp
	src/server/game/Entities/Pet/Pet.h
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Transport/Transport.h
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Guilds/Guild.h
	src/server/game/Guilds/GuildMgr.cpp
	src/server/game/Guilds/GuildMgr.h
	src/server/game/Mails/Mail.h
	src/server/game/Maps/Map.cpp
	src/server/game/Maps/TransportMgr.cpp
	src/server/game/Maps/TransportMgr.h
	src/server/game/OutdoorPvP/OutdoorPvP.h
This commit is contained in:
pete318 authored and ariel- committed 2016-01-11 01:50:53 -03:00
1 parent b20c9ae283
commit 6664a3acc3
81 files changed
+415 -415

No files matched your search

+1 -1
View File
@@ -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)
+1 -1
View File
@@ -909,7 +909,7 @@ public:
guidStr = strtok(NULL, " ");
}
uint32 guid = 0;
ObjectGuid::LowType guid = 0;
if (guidStr)
{
+3 -3
View File
@@ -994,7 +994,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));
@@ -1024,7 +1024,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);
@@ -1050,7 +1050,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));
+10 -9
View File
@@ -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, 0, 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;
@@ -449,7 +450,7 @@ public:
if (!id)
return false;
uint32 guidLow = atoi(id);
ObjectGuid::LowType guidLow = atoi(id);
if (!guidLow)
return false;
@@ -514,7 +515,7 @@ public:
if (!id)
return false;
uint32 guidLow = atoi(id);
ObjectGuid::LowType guidLow = atoi(id);
if (!guidLow)
return false;
@@ -568,7 +569,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();
@@ -637,7 +638,7 @@ public:
if (!id)
return false;
uint32 guidLow = atoi(id);
ObjectGuid::LowType guidLow = atoi(id);
if (!guidLow)
return false;
+2 -2
View File
@@ -160,7 +160,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;
@@ -186,7 +186,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;
+5 -5
View File
@@ -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);
+1 -1
View File
@@ -1280,7 +1280,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);
+3 -3
View File
@@ -1485,7 +1485,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;
@@ -1674,7 +1674,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)
@@ -2496,7 +2496,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);
+12 -12
View File
@@ -262,7 +262,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->GetPhaseMask();
@@ -292,7 +292,7 @@ public:
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
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
@@ -376,7 +376,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);
@@ -497,7 +497,7 @@ public:
if (!cId)
return false;
uint32 lowguid = atoi(cId);
ObjectGuid::LowType lowguid = atoi(cId);
if (!lowguid)
return false;
@@ -774,7 +774,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();
@@ -800,7 +800,7 @@ public:
//move selected creature
static bool HandleNpcMoveCommand(ChatHandler* handler, char const* args)
{
uint32 lowguid = 0;
ObjectGuid::LowType lowguid = 0;
Creature* creature = handler->getSelectedCreature();
@@ -949,7 +949,7 @@ public:
if (!guid_str)
return false;
uint32 lowguid = 0;
ObjectGuid::LowType lowguid = 0;
Creature* creature = NULL;
if (dontdel_str)
@@ -1136,7 +1136,7 @@ public:
mtype = RANDOM_MOTION_TYPE;
Creature* creature = handler->getSelectedCreature();
uint32 guidLow = 0;
ObjectGuid::LowType guidLow = 0;
if (creature)
guidLow = creature->GetSpawnId();
@@ -1185,7 +1185,7 @@ public:
}
Creature* creature = handler->getSelectedCreature();
uint32 guidLow = 0;
ObjectGuid::LowType guidLow = 0;
if (creature)
guidLow = creature->GetSpawnId();
@@ -1449,7 +1449,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())
@@ -1459,7 +1459,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());
@@ -1501,7 +1501,7 @@ public:
if (!*args)
return false;
uint32 linkguid = (uint32) atoi((char*)args);
ObjectGuid::LowType linkguid = (uint32) atoi((char*)args);
Creature* creature = handler->getSelectedCreature();
+2 -2
View File
@@ -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?
@@ -1048,7 +1048,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)
{
@@ -808,7 +808,7 @@ public:
private:
int8 _phase;
uint32 _moveTimer;
uint32 _eventStarterGuidLow;
ObjectGuid::LowType _eventStarterGuidLow;
GuidList _explosivesGuids;
EventMap _events;
};
@@ -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
@@ -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.