aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_character.cpp8
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp18
-rw-r--r--src/server/scripts/Commands/cs_go.cpp4
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp19
-rw-r--r--src/server/scripts/Commands/cs_group.cpp2
-rw-r--r--src/server/scripts/Commands/cs_guild.cpp14
-rw-r--r--src/server/scripts/Commands/cs_list.cpp22
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp8
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp46
-rw-r--r--src/server/scripts/Commands/cs_quest.cpp2
-rw-r--r--src/server/scripts/Commands/cs_send.cpp6
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp40
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp12
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp33
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_dalaran.cpp2
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp4
-rw-r--r--src/server/scripts/World/action_ip_logger.cpp9
21 files changed, 130 insertions, 129 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp
index b31c0b11d39..1b664204784 100644
--- a/src/server/scripts/Commands/cs_character.cpp
+++ b/src/server/scripts/Commands/cs_character.cpp
@@ -909,11 +909,11 @@ public:
guidStr = strtok(NULL, " ");
}
- uint32 guid = 0;
+ ObjectGuid::LowType guid = UI64LIT(0);
if (guidStr)
{
- guid = uint32(atoi(guidStr));
+ guid = strtoull(guidStr, nullptr, 10);
if (!guid)
{
handler->PSendSysMessage(LANG_INVALID_CHARACTER_GUID);
@@ -969,7 +969,7 @@ public:
ObjectGuid guid;
// character name can't start from number
if (isNumeric(playerStr))
- guid = ObjectGuid(HIGHGUID_PLAYER, uint32(atoi(playerStr)));
+ guid = ObjectGuid(HIGHGUID_PLAYER, strtoull(playerStr, nullptr, 10));
else
{
std::string name = handler->extractPlayerNameFromLink(playerStr);
@@ -990,7 +990,7 @@ public:
return false;
}
- switch (PlayerDumpWriter().WriteDump(fileStr, uint32(guid.GetCounter())))
+ switch (PlayerDumpWriter().WriteDump(fileStr, guid.GetCounter()))
{
case DUMP_SUCCESS:
handler->PSendSysMessage(LANG_COMMAND_EXPORT_SUCCESS);
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index f93208a4186..678dd91c87d 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -373,7 +373,7 @@ public:
GameObject* obj = handler->GetNearbyGameObject();
if (!obj)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, UI64LIT(0));
handler->SetSentErrorMessage(true);
ifs.close();
return false;
@@ -385,7 +385,7 @@ public:
GameObject* obj = handler->GetNearbyGameObject();
if (!obj)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, UI64LIT(0));
handler->SetSentErrorMessage(true);
ifs.close();
return false;
@@ -928,7 +928,7 @@ public:
Map* map = handler->GetSession()->GetPlayer()->GetMap();
- if (!v->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_VEHICLE), map, handler->GetSession()->GetPlayer()->GetPhaseMask(), entry, x, y, z, o, nullptr, id))
+ if (!v->Create(sObjectMgr->GetGenerator<HIGHGUID_VEHICLE>()->Generate(), map, handler->GetSession()->GetPlayer()->GetPhaseMask(), entry, x, y, z, o, nullptr, id))
{
delete v;
return false;
@@ -987,10 +987,10 @@ public:
if (!e || !f)
return false;
- uint32 guid = (uint32)atoi(e);
+ ObjectGuid::LowType guid = strtoull(e, nullptr, 10);
uint32 index = (uint32)atoi(f);
- Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, 0, guid));
+ Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, guid));
if (!i)
return false;
@@ -1000,7 +1000,7 @@ public:
uint32 value = i->GetUInt32Value(index);
- handler->PSendSysMessage("Item %u: value at %u is %u", guid, index, value);
+ handler->PSendSysMessage("Item " UI64FMTD ": value at %u is %u", guid, index, value);
return true;
}
@@ -1017,11 +1017,11 @@ public:
if (!e || !f || !g)
return false;
- uint32 guid = (uint32)atoi(e);
+ ObjectGuid::LowType guid = strtoull(e, nullptr, 10);
uint32 index = (uint32)atoi(f);
uint32 value = (uint32)atoi(g);
- Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, 0, guid));
+ Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, guid));
if (!i)
return false;
@@ -1043,7 +1043,7 @@ public:
if (!e)
return false;
- uint32 guid = (uint32)atoi(e);
+ ObjectGuid::LowType guid = strtoull(e, nullptr, 10);
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, guid));
diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp
index a7fa77fbe97..cd0e1dd9ea3 100644
--- a/src/server/scripts/Commands/cs_go.cpp
+++ b/src/server/scripts/Commands/cs_go.cpp
@@ -135,7 +135,7 @@ public:
float z = fields[2].GetFloat();
float o = fields[3].GetFloat();
uint32 mapId = fields[4].GetUInt16();
- uint32 guid = fields[5].GetUInt32();
+ ObjectGuid::LowType guid = fields[5].GetUInt64();
uint32 id = fields[6].GetUInt32();
Transport* transport = NULL;
@@ -278,7 +278,7 @@ public:
if (!id)
return false;
- int32 guid = atoi(id);
+ ObjectGuid::LowType guid = strtoull(id, nullptr, 10);
if (!guid)
return false;
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index cacb9e1f543..7086aa82e6f 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 = strtoull(id, nullptr, 10);
if (!guidLow)
return false;
@@ -150,7 +150,7 @@ public:
Map* map = player->GetMap();
GameObject* object = new GameObject;
- uint32 guidLow = sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT);
+ ObjectGuid::LowType guidLow = sObjectMgr->GetGenerator<HIGHGUID_GAMEOBJECT>()->Generate();
if (!object->Create(guidLow, objectInfo->entry, map, 0, x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
{
@@ -293,14 +293,15 @@ public:
bool found = false;
float x, y, z, o;
- uint32 guidLow, id, phase;
+ ObjectGuid::LowType guidLow;
+ uint32 id, phase;
uint16 mapId;
uint32 poolId;
do
{
Field* fields = result->Fetch();
- guidLow = fields[0].GetUInt32();
+ guidLow = fields[0].GetUInt64();
id = fields[1].GetUInt32();
x = fields[2].GetFloat();
y = fields[3].GetFloat();
@@ -353,7 +354,7 @@ public:
if (!id)
return false;
- uint32 guidLow = atoi(id);
+ ObjectGuid::LowType guidLow = strtoull(id, nullptr, 10);
if (!guidLow)
return false;
@@ -401,7 +402,7 @@ public:
if (!id)
return false;
- uint32 guidLow = atoi(id);
+ ObjectGuid::LowType guidLow = strtoull(id, nullptr, 10);
if (!guidLow)
return false;
@@ -450,7 +451,7 @@ public:
if (!id)
return false;
- uint32 guidLow = atoi(id);
+ ObjectGuid::LowType guidLow = strtoull(id, nullptr, 10);
if (!guidLow)
return false;
@@ -569,7 +570,7 @@ public:
do
{
Field* fields = result->Fetch();
- uint32 guid = fields[0].GetUInt32();
+ ObjectGuid::LowType guid = fields[0].GetUInt64();
uint32 entry = fields[1].GetUInt32();
float x = fields[2].GetFloat();
float y = fields[3].GetFloat();
@@ -638,7 +639,7 @@ public:
if (!id)
return false;
- uint32 guidLow = atoi(id);
+ ObjectGuid::LowType guidLow = strtoull(id, nullptr, 10);
if (!guidLow)
return false;
diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp
index 3d524b79e79..5112a2f2e2c 100644
--- a/src/server/scripts/Commands/cs_group.cpp
+++ b/src/server/scripts/Commands/cs_group.cpp
@@ -269,7 +269,7 @@ public:
const char* onlineState = "";
// Parse the guid to uint32...
- ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args)));
+ ObjectGuid parseGUID(HIGHGUID_PLAYER, strtoull(args, nullptr, 10));
// ... and try to extract a player out of it.
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, nameTarget))
diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp
index bbf7feb9aa8..977e6ceb1e3 100644
--- a/src/server/scripts/Commands/cs_guild.cpp
+++ b/src/server/scripts/Commands/cs_guild.cpp
@@ -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;
@@ -254,15 +254,9 @@ public:
if (args && args[0] != '\0')
{
if (isNumeric(args))
- {
- uint32 guildId = uint32(atoi(args));
- guild = sGuildMgr->GetGuildById(guildId);
- }
+ guild = sGuildMgr->GetGuildById(strtoull(args, nullptr, 10));
else
- {
- std::string guildName = args;
- guild = sGuildMgr->GetGuildByName(guildName);
- }
+ guild = sGuildMgr->GetGuildByName(args);
}
else if (Player* target = handler->getSelectedPlayerOrSelf())
guild = target->GetGuild();
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index 2afac2ab0c2..44e4f8714cd 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].GetUInt64();
float x = fields[1].GetFloat();
float y = fields[2].GetFloat();
float z = fields[3].GetFloat();
@@ -235,9 +235,9 @@ public:
do
{
Field* fields = result->Fetch();
- uint32 itemGuid = fields[0].GetUInt32();
- uint32 itemSender = fields[1].GetUInt32();
- uint32 itemReceiver = fields[2].GetUInt32();
+ ObjectGuid::LowType itemGuid = fields[0].GetUInt64();
+ ObjectGuid::LowType itemSender = fields[1].GetUInt64();
+ ObjectGuid::LowType itemReceiver = fields[2].GetUInt64();
uint32 itemSenderAccountId = fields[3].GetUInt32();
std::string itemSenderName = fields[4].GetString();
uint32 itemReceiverAccount = fields[5].GetUInt32();
@@ -398,7 +398,7 @@ public:
do
{
Field* fields = result->Fetch();
- uint32 guid = fields[0].GetUInt32();
+ ObjectGuid::LowType guid = fields[0].GetUInt64();
float x = fields[1].GetFloat();
float y = fields[2].GetFloat();
float z = fields[3].GetFloat();
@@ -476,7 +476,7 @@ public:
if (!*args)
return false;
- ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args)));
+ ObjectGuid parseGUID(HIGHGUID_PLAYER, strtoull(args, nullptr, 10));
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName))
{
@@ -487,7 +487,7 @@ public:
return false;
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_COUNT);
- stmt->setUInt32(0, targetGuid.GetCounter());
+ stmt->setUInt64(0, targetGuid.GetCounter());
PreparedQueryResult queryResult = CharacterDatabase.Query(stmt);
if (queryResult)
{
@@ -499,7 +499,7 @@ public:
handler->PSendSysMessage(LANG_ACCOUNT_LIST_BAR);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_INFO);
- stmt->setUInt32(0, targetGuid.GetCounter());
+ stmt->setUInt64(0, targetGuid.GetCounter());
PreparedQueryResult queryResult = CharacterDatabase.Query(stmt);
if (queryResult)
@@ -508,9 +508,9 @@ public:
{
Field* queryFields = queryResult->Fetch();
uint32 messageId = queryFields[0].GetUInt32();
- uint32 senderId = queryFields[1].GetUInt32();
+ ObjectGuid::LowType senderId = queryFields[1].GetUInt64();
std::string sender = queryFields[2].GetString();
- uint32 receiverId = queryFields[3].GetUInt32();
+ ObjectGuid::LowType receiverId = queryFields[3].GetUInt64();
std::string receiver = queryFields[4].GetString();
std::string subject = queryFields[5].GetString();
uint64 deliverTime = queryFields[6].GetUInt32();
@@ -536,7 +536,7 @@ public:
{
uint32 item_guid = (*result2)[0].GetUInt32();
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_ITEMS);
- stmt->setUInt32(0, item_guid);
+ stmt->setUInt64(0, item_guid);
PreparedQueryResult result3 = CharacterDatabase.Query(stmt);
if (result3)
{
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index c1aee9620b8..f07dc7c18c9 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1390,7 +1390,7 @@ public:
PreparedStatement* stmt = NULL;
// To make sure we get a target, we convert our guid to an omniversal...
- ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args)));
+ ObjectGuid parseGUID(HIGHGUID_PLAYER, strtoull(args, nullptr, 10));
// ... and make sure we get a target, somehow.
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName))
@@ -1479,7 +1479,7 @@ public:
std::string zoneName = handler->GetTrinityString(LANG_UNKNOWN);
// Guild data print variables defined so that they exist, but are not necessarily used
- ObjectGuid::LowType guildId = 0;
+ ObjectGuid::LowType guildId = UI64LIT(0);
uint8 guildRankId = 0;
std::string guildName;
std::string guildRank;
@@ -1735,7 +1735,7 @@ public:
// Mail Data - an own query, because it may or may not be useful.
// SQL: "SELECT SUM(CASE WHEN (checked & 1) THEN 1 ELSE 0 END) AS 'readmail', COUNT(*) AS 'totalmail' FROM mail WHERE `receiver` = ?"
PreparedStatement* stmt4 = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PINFO_MAILS);
- stmt4->setUInt32(0, lowguid);
+ stmt4->setUInt64(0, lowguid);
PreparedQueryResult result6 = CharacterDatabase.Query(stmt4);
if (result6)
{
@@ -2124,7 +2124,7 @@ public:
return false;
}
- int32 guid = atoi(guidStr);
+ ObjectGuid::LowType guid = strtoull(guidStr, nullptr, 10);
if (!guid)
{
handler->SendSysMessage(LANG_BAD_VALUE);
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 57506661cf4..feba03d259e 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -261,7 +261,7 @@ public:
if (Transport* trans = chr->GetTransport())
{
- uint32 guid = sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT);
+ ObjectGuid::LowType guid = sObjectMgr->GetGenerator<HIGHGUID_UNIT>()->Generate();
CreatureData& data = sObjectMgr->NewOrExistCreatureData(guid);
data.id = id;
data.phaseMask = chr->GetPhaseMask();
@@ -279,7 +279,7 @@ public:
}
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GetGenerator<HIGHGUID_UNIT>()->Generate(), map, chr->GetPhaseMask(), id, x, y, z, o))
{
delete creature;
return false;
@@ -290,7 +290,7 @@ public:
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
- uint32 db_guid = creature->GetDBTableGUIDLow();
+ ObjectGuid::LowType db_guid = creature->GetDBTableGUIDLow();
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells()
// current "creature" variable is deleted and created fresh new, otherwise old values might trigger asserts or cause undefined behavior
@@ -374,7 +374,7 @@ public:
char* guidStr = strtok((char*)args, " ");
char* waitStr = strtok((char*)NULL, " ");
- uint32 lowGuid = atoi((char*)guidStr);
+ ObjectGuid::LowType lowGuid = strtoull(guidStr, nullptr, 10);
Creature* creature = NULL;
@@ -409,7 +409,7 @@ public:
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_MOVEMENT_TYPE);
stmt->setUInt8(0, uint8(WAYPOINT_MOTION_TYPE));
- stmt->setUInt32(1, lowGuid);
+ stmt->setUInt64(1, lowGuid);
WorldDatabase.Execute(stmt);
@@ -522,7 +522,7 @@ public:
if (!cId)
return false;
- uint32 lowguid = atoi(cId);
+ ObjectGuid::LowType lowguid = strtoull(cId, nullptr, 10);
if (!lowguid)
return false;
@@ -799,7 +799,7 @@ public:
do
{
Field* fields = result->Fetch();
- uint32 guid = fields[0].GetUInt32();
+ ObjectGuid::LowType guid = fields[0].GetUInt64();
uint32 entry = fields[1].GetUInt32();
float x = fields[2].GetFloat();
float y = fields[3].GetFloat();
@@ -825,7 +825,7 @@ public:
//move selected creature
static bool HandleNpcMoveCommand(ChatHandler* handler, char const* args)
{
- uint32 lowguid = 0;
+ ObjectGuid::LowType lowguid = UI64LIT(0);
Creature* creature = handler->getSelectedCreature();
@@ -836,7 +836,7 @@ public:
if (!cId)
return false;
- lowguid = atoi(cId);
+ lowguid = strtoull(cId, nullptr, 10);
/* FIXME: impossible without entry
if (lowguid)
@@ -902,7 +902,7 @@ public:
stmt->setFloat(1, y);
stmt->setFloat(2, z);
stmt->setFloat(3, o);
- stmt->setUInt32(4, lowguid);
+ stmt->setUInt64(4, lowguid);
WorldDatabase.Execute(stmt);
@@ -986,7 +986,7 @@ public:
if (!guid_str)
return false;
- uint32 lowguid = 0;
+ ObjectGuid::LowType lowguid = UI64LIT(0);
Creature* creature = NULL;
if (dontdel_str)
@@ -1028,7 +1028,7 @@ public:
}
else // case .setmovetype #creature_guid $move_type (with selected creature)
{
- lowguid = atoi((char*)guid_str);
+ lowguid = strtoull(guid_str, nullptr, 10);
/* impossible without entry
if (lowguid)
@@ -1142,14 +1142,14 @@ public:
mtype = RANDOM_MOTION_TYPE;
Creature* creature = handler->getSelectedCreature();
- uint32 guidLow = 0;
+ ObjectGuid::LowType guidLow = UI64LIT(0);
if (creature)
guidLow = creature->GetDBTableGUIDLow();
else
return false;
- creature->SetRespawnRadius((float)option);
+ creature->SetRespawnRadius(option);
creature->SetDefaultMovementType(mtype);
creature->GetMotionMaster()->Initialize();
if (creature->IsAlive()) // dead creature will reset movement generator at respawn
@@ -1162,7 +1162,7 @@ public:
stmt->setFloat(0, option);
stmt->setUInt8(1, uint8(mtype));
- stmt->setUInt32(2, guidLow);
+ stmt->setUInt64(2, guidLow);
WorldDatabase.Execute(stmt);
@@ -1191,7 +1191,7 @@ public:
}
Creature* creature = handler->getSelectedCreature();
- uint32 guidLow = 0;
+ ObjectGuid::LowType guidLow = UI64LIT(0);
if (creature)
guidLow = creature->GetDBTableGUIDLow();
@@ -1201,7 +1201,7 @@ public:
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_SPAWN_TIME_SECS);
stmt->setUInt32(0, uint32(spawnTime));
- stmt->setUInt32(1, guidLow);
+ stmt->setUInt64(1, guidLow);
WorldDatabase.Execute(stmt);
@@ -1323,7 +1323,7 @@ public:
return false;
}
- ObjectGuid receiver_guid(HIGHGUID_PLAYER, uint32(atol(receiver_str)));
+ ObjectGuid receiver_guid(HIGHGUID_PLAYER, strtoull(receiver_str, nullptr, 10));
// check online security
Player* receiver = ObjectAccessor::FindPlayer(receiver_guid);
@@ -1455,7 +1455,7 @@ public:
if (!*args)
return false;
- uint32 leaderGUID = (uint32) atoi((char*)args);
+ ObjectGuid::LowType leaderGUID = strtoull(args, nullptr, 10);
Creature* creature = handler->getSelectedCreature();
if (!creature || !creature->GetDBTableGUIDLow())
@@ -1465,7 +1465,7 @@ public:
return false;
}
- uint32 lowguid = creature->GetDBTableGUIDLow();
+ ObjectGuid::LowType lowguid = creature->GetDBTableGUIDLow();
if (creature->GetFormation())
{
handler->PSendSysMessage("Selected creature is already member of group %u", creature->GetFormation()->GetId());
@@ -1489,8 +1489,8 @@ public:
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_CREATURE_FORMATION);
- stmt->setUInt32(0, leaderGUID);
- stmt->setUInt32(1, lowguid);
+ stmt->setUInt64(0, leaderGUID);
+ stmt->setUInt64(1, lowguid);
stmt->setFloat(2, group_member->follow_dist);
stmt->setFloat(3, group_member->follow_angle);
stmt->setUInt32(4, uint32(group_member->groupAI));
@@ -1507,7 +1507,7 @@ public:
if (!*args)
return false;
- uint32 linkguid = (uint32) atoi((char*)args);
+ ObjectGuid::LowType linkguid = strtoull(args, nullptr, 10);
Creature* creature = handler->getSelectedCreature();
diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp
index 6abc7032d0d..b5186bdb948 100644
--- a/src/server/scripts/Commands/cs_quest.cpp
+++ b/src/server/scripts/Commands/cs_quest.cpp
@@ -243,7 +243,7 @@ public:
// prepare Quest Tracker datas
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_QUEST_TRACK_GM_COMPLETE);
stmt->setUInt32(0, quest->GetQuestId());
- stmt->setUInt32(1, player->GetGUID().GetCounter());
+ stmt->setUInt64(1, player->GetGUID().GetCounter());
// add to Quest Tracker
CharacterDatabase.Execute(stmt);
diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp
index 1c13403a5a5..8c0ba551423 100644
--- a/src/server/scripts/Commands/cs_send.cpp
+++ b/src/server/scripts/Commands/cs_send.cpp
@@ -77,7 +77,7 @@ public:
std::string text = msgText;
// from console show not existed sender
- MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
+ MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : UI64LIT(0), MAIL_STATIONERY_GM);
/// @todo Fix poor design
SQLTransaction trans = CharacterDatabase.BeginTransaction();
@@ -176,7 +176,7 @@ public:
}
// from console show not existed sender
- MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
+ MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : UI64LIT(0), MAIL_STATIONERY_GM);
// fill mail
MailDraft draft(subject, text);
@@ -236,7 +236,7 @@ public:
std::string text = msgText;
// from console show not existed sender
- MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
+ MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : UI64LIT(0), MAIL_STATIONERY_GM);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index f8ef57e53c4..2222a929538 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 = UI64LIT(0);
Creature* target = handler->getSelectedCreature();
// Did player provide a path_id?
@@ -183,7 +183,7 @@ public:
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_CREATURE_ADDON_BY_GUID);
- stmt->setUInt32(0, guidLow);
+ stmt->setUInt64(0, guidLow);
PreparedQueryResult result = WorldDatabase.Query(stmt);
@@ -192,13 +192,13 @@ public:
stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_ADDON_PATH);
stmt->setUInt32(0, pathid);
- stmt->setUInt32(1, guidLow);
+ stmt->setUInt64(1, guidLow);
}
else
{
stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_CREATURE_ADDON);
- stmt->setUInt32(0, guidLow);
+ stmt->setUInt64(0, guidLow);
stmt->setUInt32(1, pathid);
}
@@ -207,7 +207,7 @@ public:
stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_MOVEMENT_TYPE);
stmt->setUInt8(0, uint8(WAYPOINT_MOTION_TYPE));
- stmt->setUInt32(1, guidLow);
+ stmt->setUInt64(1, guidLow);
WorldDatabase.Execute(stmt);
@@ -246,8 +246,8 @@ public:
return true;
}
- uint32 guidLow = target->GetDBTableGUIDLow();
- if (guidLow == 0)
+ ObjectGuid::LowType guidLow = target->GetDBTableGUIDLow();
+ if (!guidLow)
{
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Target is not saved to DB.");
return true;
@@ -261,14 +261,14 @@ public:
}
stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CREATURE_ADDON);
- stmt->setUInt32(0, guidLow);
+ stmt->setUInt64(0, guidLow);
WorldDatabase.Execute(stmt);
target->UpdateWaypointID(0);
stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_MOVEMENT_TYPE);
stmt->setUInt8(0, uint8(IDLE_MOTION_TYPE));
- stmt->setUInt32(1, guidLow);
+ stmt->setUInt64(1, guidLow);
WorldDatabase.Execute(stmt);
target->LoadPath(0);
@@ -577,7 +577,7 @@ public:
// Check the creature
stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_BY_WPGUID);
- stmt->setUInt32(0, wpGuid.GetCounter());
+ stmt->setUInt64(0, wpGuid.GetCounter());
PreparedQueryResult result = WorldDatabase.Query(stmt);
if (!result)
@@ -674,7 +674,7 @@ public:
}
// re-create
Creature* wpCreature2 = new Creature();
- if (!wpCreature2->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), VISUAL_WAYPOINT, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
+ if (!wpCreature2->Create(sObjectMgr->GetGenerator<HIGHGUID_UNIT>()->Generate(), map, chr->GetPhaseMask(), VISUAL_WAYPOINT, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
{
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, VISUAL_WAYPOINT);
delete wpCreature2;
@@ -790,7 +790,7 @@ public:
}
stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_ALL_BY_WPGUID);
- stmt->setUInt32(0, target->GetGUID().GetCounter());
+ stmt->setUInt64(0, target->GetGUID().GetCounter());
PreparedQueryResult result = WorldDatabase.Query(stmt);
if (!result)
@@ -849,7 +849,7 @@ public:
do
{
Field* fields = result2->Fetch();
- uint32 wpguid = fields[0].GetUInt32();
+ ObjectGuid::LowType wpguid = fields[0].GetUInt64();
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpguid));
if (!creature)
@@ -858,7 +858,7 @@ public:
hasError = true;
stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CREATURE);
- stmt->setUInt32(0, wpguid);
+ stmt->setUInt64(0, wpguid);
WorldDatabase.Execute(stmt);
}
else
@@ -894,7 +894,7 @@ public:
float o = chr->GetOrientation();
Creature* wpCreature = new Creature();
- if (!wpCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
+ if (!wpCreature->Create(sObjectMgr->GetGenerator<HIGHGUID_UNIT>()->Generate(), map, chr->GetPhaseMask(), id, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
delete wpCreature;
@@ -906,7 +906,7 @@ public:
// Set "wpguid" column to the visual waypoint
stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_DATA_WPGUID);
- stmt->setUInt32(0, wpCreature->GetGUID().GetCounter());
+ stmt->setUInt64(0, wpCreature->GetGUID().GetCounter());
stmt->setUInt32(1, pathid);
stmt->setUInt32(2, point);
WorldDatabase.Execute(stmt);
@@ -959,7 +959,7 @@ public:
Map* map = chr->GetMap();
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GetGenerator<HIGHGUID_UNIT>()->Generate(), map, chr->GetPhaseMask(), id, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
delete creature;
@@ -1011,7 +1011,7 @@ public:
Map* map = chr->GetMap();
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GetGenerator<HIGHGUID_UNIT>()->Generate(), map, chr->GetPhaseMask(), id, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_NOTCREATED, id);
delete creature;
@@ -1054,7 +1054,7 @@ public:
do
{
Field* fields = result->Fetch();
- uint32 guid = fields[0].GetUInt32();
+ ObjectGuid::LowType guid = fields[0].GetUInt64();
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, guid));
if (!creature)
{
@@ -1062,7 +1062,7 @@ public:
hasError = true;
stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CREATURE);
- stmt->setUInt32(0, guid);
+ stmt->setUInt64(0, guid);
WorldDatabase.Execute(stmt);
}
else
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
index d7e4d8f76b2..c9621bdf161 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
@@ -381,7 +381,7 @@ class instance_halls_of_reflection : public InstanceMapScript
_teamInInstance = player->GetTeam();
}
- if (Transport* gunship = sTransportMgr->CreateTransport(_teamInInstance == HORDE ? GO_ORGRIMS_HAMMER : GO_THE_SKYBREAKER, 0, instance))
+ if (Transport* gunship = sTransportMgr->CreateTransport(_teamInInstance == HORDE ? GO_ORGRIMS_HAMMER : GO_THE_SKYBREAKER, UI64LIT(0), instance))
gunship->EnableMovement(GetBossState(DATA_THE_LICH_KING_ESCAPE) == DONE);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
index 1c5ef133b89..a0f871eacff 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
@@ -1000,7 +1000,7 @@ class npc_high_overlord_saurfang_igb : public CreatureScript
Talk(SAY_SAURFANG_INTRO_2);
break;
case EVENT_INTRO_SUMMON_SKYBREAKER:
- sTransportMgr->CreateTransport(GO_THE_SKYBREAKER_H, 0, me->GetMap());
+ sTransportMgr->CreateTransport(GO_THE_SKYBREAKER_H, UI64LIT(0), me->GetMap());
break;
case EVENT_INTRO_H_3:
Talk(SAY_SAURFANG_INTRO_3);
@@ -1270,7 +1270,7 @@ class npc_muradin_bronzebeard_igb : public CreatureScript
Talk(SAY_MURADIN_INTRO_2);
break;
case EVENT_INTRO_SUMMON_ORGRIMS_HAMMER:
- sTransportMgr->CreateTransport(GO_ORGRIMS_HAMMER_A, 0, me->GetMap());
+ sTransportMgr->CreateTransport(GO_ORGRIMS_HAMMER_A, UI64LIT(0), me->GetMap());
break;
case EVENT_INTRO_A_3:
Talk(SAY_MURADIN_INTRO_3);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index 9324379e9d6..01ec8594f75 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -648,7 +648,7 @@ class npc_spinestalker : public CreatureScript
// Increase add count
if (!me->isDead())
{
- _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
+ _instance->SetGuidData(DATA_SINDRAGOSA_FROSTWYRMS, ObjectGuid(HIGHGUID_UNIT, me->GetEntry(), me->GetDBTableGUIDLow())); // this cannot be in Reset because reset also happens on evade
Reset();
}
}
@@ -671,7 +671,7 @@ class npc_spinestalker : public CreatureScript
void JustRespawned() override
{
ScriptedAI::JustRespawned();
- _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
+ _instance->SetGuidData(DATA_SINDRAGOSA_FROSTWYRMS, ObjectGuid(HIGHGUID_UNIT, me->GetEntry(), me->GetDBTableGUIDLow())); // this cannot be in Reset because reset also happens on evade
}
void JustDied(Unit* /*killer*/) override
@@ -784,7 +784,7 @@ class npc_rimefang : public CreatureScript
// Increase add count
if (!me->isDead())
{
- _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
+ _instance->SetGuidData(DATA_SINDRAGOSA_FROSTWYRMS, ObjectGuid(HIGHGUID_UNIT, me->GetEntry(), me->GetDBTableGUIDLow())); // this cannot be in Reset because reset also happens on evade
Reset();
}
}
@@ -807,7 +807,7 @@ class npc_rimefang : public CreatureScript
void JustRespawned() override
{
ScriptedAI::JustRespawned();
- _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
+ _instance->SetGuidData(DATA_SINDRAGOSA_FROSTWYRMS, ObjectGuid(HIGHGUID_UNIT, me->GetEntry(), me->GetDBTableGUIDLow())); // this cannot be in Reset because reset also happens on evade
}
void JustDied(Unit* /*killer*/) override
@@ -951,7 +951,7 @@ class npc_sindragosa_trash : public CreatureScript
if (!me->isDead())
{
if (me->GetEntry() == NPC_FROSTWING_WHELP)
- _instance->SetData(_frostwyrmId, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
+ _instance->SetGuidData(_frostwyrmId, ObjectGuid(HIGHGUID_UNIT, me->GetEntry(), me->GetDBTableGUIDLow())); // this cannot be in Reset because reset also happens on evade
Reset();
}
}
@@ -974,7 +974,7 @@ class npc_sindragosa_trash : public CreatureScript
// Increase add count
if (me->GetEntry() == NPC_FROSTWING_WHELP)
- _instance->SetData(_frostwyrmId, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
+ _instance->SetGuidData(_frostwyrmId, ObjectGuid(HIGHGUID_UNIT, me->GetEntry(), me->GetDBTableGUIDLow())); // this cannot be in Reset because reset also happens on evade
}
void SetData(uint32 type, uint32 data) override
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 22fa44541a1..abe178a874d 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -545,7 +545,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
case EVENT_MURADIN_RUN:
case EVENT_SAURFANG_RUN:
if (Creature* factionNPC = ObjectAccessor::GetCreature(*me, _factionNPC))
- factionNPC->GetMotionMaster()->MovePath(factionNPC->GetDBTableGUIDLow()*10, false);
+ factionNPC->GetMotionMaster()->MovePath(factionNPC->GetDBTableGUIDLow() * 10, false);
me->setActive(false);
_damnedKills = 3;
break;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index fb257995842..69349241160 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -989,7 +989,7 @@ class instance_icecrown_citadel : public InstanceMapScript
{
SetBossState(DATA_ICECROWN_GUNSHIP_BATTLE, NOT_STARTED);
uint32 gunshipEntry = TeamInInstance == HORDE ? GO_ORGRIMS_HAMMER_H : GO_THE_SKYBREAKER_A;
- if (Transport* gunship = sTransportMgr->CreateTransport(gunshipEntry, 0, instance))
+ if (Transport* gunship = sTransportMgr->CreateTransport(gunshipEntry, UI64LIT(0), instance))
GunshipGUID = gunship->GetGUID();
}
}
@@ -1010,15 +1010,6 @@ class instance_icecrown_citadel : public InstanceMapScript
case DATA_ORB_WHISPERER_ACHIEVEMENT:
IsOrbWhispererEligible = data ? true : false;
break;
- case DATA_SINDRAGOSA_FROSTWYRMS:
- FrostwyrmGUIDs.insert(data);
- break;
- case DATA_SPINESTALKER:
- SpinestalkerTrash.insert(data);
- break;
- case DATA_RIMEFANG:
- RimefangTrash.insert(data);
- break;
case DATA_COLDFLAME_JETS:
ColdflameJetsState = data;
if (ColdflameJetsState == DONE)
@@ -1069,6 +1060,22 @@ class instance_icecrown_citadel : public InstanceMapScript
}
}
+ void SetGuidData(uint32 type, ObjectGuid guid) override
+ {
+ switch (type)
+ {
+ case DATA_SINDRAGOSA_FROSTWYRMS:
+ FrostwyrmGUIDs.insert(guid.GetCounter());
+ break;
+ case DATA_SPINESTALKER:
+ SpinestalkerTrash.insert(guid.GetCounter());
+ break;
+ case DATA_RIMEFANG:
+ RimefangTrash.insert(guid.GetCounter());
+ break;
+ }
+ }
+
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) override
{
switch (criteria_id)
@@ -1469,9 +1476,9 @@ class instance_icecrown_citadel : public InstanceMapScript
uint32 TeamInInstance;
uint32 ColdflameJetsState;
uint32 UpperSpireTeleporterActiveState;
- std::set<uint32> FrostwyrmGUIDs;
- std::set<uint32> SpinestalkerTrash;
- std::set<uint32> RimefangTrash;
+ std::set<ObjectGuid::LowType> FrostwyrmGUIDs;
+ std::set<ObjectGuid::LowType> SpinestalkerTrash;
+ std::set<ObjectGuid::LowType> RimefangTrash;
uint32 BloodQuickeningState;
uint32 HeroicAttempts;
uint16 BloodQuickeningMinutes;
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
index d8612e1f5dd..c063996da8d 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
@@ -74,7 +74,7 @@ public:
void SpawnGameObject(uint32 entry, Position& pos)
{
GameObject* go = new GameObject;
- if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, instance,
+ if (!go->Create(sObjectMgr->GetGenerator<HIGHGUID_GAMEOBJECT>()->Generate(), entry, instance,
PHASEMASK_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(),
0, 0, 0, 0, 120, GO_STATE_READY))
{
diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp
index 27d3e6dadc6..ce2cef9798a 100644
--- a/src/server/scripts/Northrend/zone_dalaran.cpp
+++ b/src/server/scripts/Northrend/zone_dalaran.cpp
@@ -184,7 +184,7 @@ class npc_minigob_manabonk : public CreatureScript
{
SQLTransaction trans = CharacterDatabase.BeginTransaction();
int16 deliverDelay = irand(MAIL_DELIVER_DELAY_MIN, MAIL_DELIVER_DELAY_MAX);
- MailDraft(MAIL_MINIGOB_ENTRY, true).SendMailTo(trans, MailReceiver(player), MailSender(MAIL_CREATURE, me->GetEntry()), MAIL_CHECK_MASK_NONE, deliverDelay);
+ MailDraft(MAIL_MINIGOB_ENTRY, true).SendMailTo(trans, MailReceiver(player), MailSender(MAIL_CREATURE, uint64(me->GetEntry())), MAIL_CHECK_MASK_NONE, deliverDelay);
CharacterDatabase.CommitTransaction(trans);
}
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
index 49250c9d638..9cf862e5fdc 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
@@ -166,7 +166,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
return true;
}
- if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
+ if (!go->Create(sObjectMgr->GetGenerator<HIGHGUID_GAMEOBJECT>()->Generate(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
{
delete go;
return true;
@@ -203,7 +203,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
return true;
}
- if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
+ if (!go->Create(sObjectMgr->GetGenerator<HIGHGUID_GAMEOBJECT>()->Generate(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
{
delete go;
return true;
diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp
index 8cc8652b3db..9d2aa868234 100644
--- a/src/server/scripts/World/action_ip_logger.cpp
+++ b/src/server/scripts/World/action_ip_logger.cpp
@@ -96,7 +96,6 @@ class AccountActionIpLogger : public AccountScript
// We declare all the required variables
uint32 playerGuid = accountId;
- uint32 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.
@@ -141,7 +140,7 @@ class AccountActionIpLogger : public AccountScript
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING);
stmt->setUInt32(0, playerGuid);
- stmt->setUInt32(1, characterGuid);
+ stmt->setUInt32(1, 0);
stmt->setUInt8(2, aType);
stmt->setUInt32(3, playerGuid);
stmt->setString(4, systemNote.c_str());
@@ -152,7 +151,7 @@ class AccountActionIpLogger : public AccountScript
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FACL_IP_LOGGING);
stmt->setUInt32(0, playerGuid);
- stmt->setUInt32(1, characterGuid);
+ stmt->setUInt32(1, 0);
stmt->setUInt8(2, aType);
stmt->setUInt32(3, playerGuid);
stmt->setString(4, systemNote.c_str());
@@ -233,7 +232,7 @@ class CharacterActionIpLogger : public PlayerScript
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_CHAR_IP_LOGGING);
stmt->setUInt32(0, playerGuid);
- stmt->setUInt32(1, player->GetGUID().GetCounter());
+ stmt->setUInt64(1, player->GetGUID().GetCounter());
stmt->setUInt8(2, aType);
stmt->setString(3, currentIp.c_str()); // We query the ip here.
stmt->setString(4, systemNote.c_str());
@@ -291,7 +290,7 @@ public:
PreparedStatement* stmt2 = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING);
stmt2->setUInt32(0, playerGuid);
- stmt2->setUInt32(1, guid.GetCounter());
+ stmt2->setUInt64(1, guid.GetCounter());
stmt2->setUInt8(2, aType);
stmt2->setUInt32(3, playerGuid);
stmt2->setString(4, systemNote.c_str());