mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Entities: Second part of removing GetGUIDLow() uses
This commit is contained in:
2
sql/updates/world/2014_10_22_01_world.sql
Normal file
2
sql/updates/world/2014_10_22_01_world.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
UPDATE `trinity_string` SET `content_default`='Creature (%s) No waypoint found - used ''wpguid''. Now trying to find it by its position...' WHERE `entry`=222;
|
||||
UPDATE `trinity_string` SET `content_default`='Creature (%s) No waypoints found.' WHERE `entry`=223;
|
||||
@@ -42,8 +42,8 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
|
||||
//TC_LOG_DEBUG("network", "WORLD: Received CMSG_DUEL_ACCEPTED");
|
||||
TC_LOG_DEBUG("network", "Player 1 is: %u (%s)", player->GetGUIDLow(), player->GetName().c_str());
|
||||
TC_LOG_DEBUG("network", "Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName().c_str());
|
||||
TC_LOG_DEBUG("network", "Player 1 is: %s (%s)", player->GetGUID().ToString().c_str(), player->GetName().c_str());
|
||||
TC_LOG_DEBUG("network", "Player 2 is: %s (%s)", plTarget->GetGUID().ToString().c_str(), plTarget->GetName().c_str());
|
||||
|
||||
time_t now = time(NULL);
|
||||
player->duel->startTimer = now;
|
||||
|
||||
@@ -132,9 +132,9 @@ public:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName);
|
||||
if (handler->GetSession())
|
||||
{
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) created Account %s (Email: '%s')",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) created Account %s (Email: '%s')",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
|
||||
accountName, email.c_str());
|
||||
}
|
||||
break;
|
||||
@@ -378,9 +378,9 @@ public:
|
||||
handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL);
|
||||
sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId());
|
||||
handler->SetSentErrorMessage(true);
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided email [%s] is not equal to registration email [%s].",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) Tried to change email, but the provided email [%s] is not equal to registration email [%s].",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
|
||||
email, oldEmail);
|
||||
return false;
|
||||
}
|
||||
@@ -390,9 +390,9 @@ public:
|
||||
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
|
||||
sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId());
|
||||
handler->SetSentErrorMessage(true);
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided password is wrong.",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) Tried to change email, but the provided password is wrong.",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -409,9 +409,9 @@ public:
|
||||
handler->SendSysMessage(LANG_NEW_EMAILS_NOT_MATCH);
|
||||
sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId());
|
||||
handler->SetSentErrorMessage(true);
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided password is wrong.",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) Tried to change email, but the provided password is wrong.",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -422,9 +422,9 @@ public:
|
||||
case AccountOpResult::AOR_OK:
|
||||
handler->SendSysMessage(LANG_COMMAND_EMAIL);
|
||||
sScriptMgr->OnEmailChange(handler->GetSession()->GetAccountId());
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Email from [%s] to [%s].",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) Changed Email from [%s] to [%s].",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
|
||||
oldEmail, email);
|
||||
break;
|
||||
case AccountOpResult::AOR_EMAIL_TOO_LONG:
|
||||
@@ -476,9 +476,9 @@ public:
|
||||
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
|
||||
sScriptMgr->OnFailedPasswordChange(handler->GetSession()->GetAccountId());
|
||||
handler->SetSentErrorMessage(true);
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the provided old password is wrong.",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) Tried to change password, but the provided old password is wrong.",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -489,9 +489,9 @@ public:
|
||||
handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL);
|
||||
sScriptMgr->OnFailedPasswordChange(handler->GetSession()->GetAccountId());
|
||||
handler->SetSentErrorMessage(true);
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the entered email [%s] is wrong.",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) Tried to change password, but the entered email [%s] is wrong.",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
|
||||
emailConfirmation);
|
||||
return false;
|
||||
}
|
||||
@@ -512,9 +512,9 @@ public:
|
||||
case AccountOpResult::AOR_OK:
|
||||
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
|
||||
sScriptMgr->OnPasswordChange(handler->GetSession()->GetAccountId());
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.",
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) Changed Password.",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
|
||||
break;
|
||||
case AccountOpResult::AOR_PASS_TOO_LONG:
|
||||
handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
|
||||
|
||||
@@ -143,8 +143,8 @@ public:
|
||||
std::string name = arena->GetName();
|
||||
arena->Disband();
|
||||
if (handler->GetSession())
|
||||
TC_LOG_DEBUG("bg.arena", "GameMaster: %s [GUID: %u] disbanded arena team type: %u [Id: %u].",
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), arena->GetType(), teamId);
|
||||
TC_LOG_DEBUG("bg.arena", "GameMaster: %s [%s] disbanded arena team type: %u [Id: %u].",
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(), arena->GetType(), teamId);
|
||||
else
|
||||
TC_LOG_DEBUG("bg.arena", "Console: disbanded arena team type: %u [Id: %u].", arena->GetType(), teamId);
|
||||
|
||||
@@ -208,8 +208,8 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_RENAME, arena->GetId(), oldArenaStr, newArenaStr);
|
||||
if (handler->GetSession())
|
||||
TC_LOG_DEBUG("bg.arena", "GameMaster: %s [GUID: %u] rename arena team \"%s\"[Id: %u] to \"%s\"",
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), oldArenaStr, arena->GetId(), newArenaStr);
|
||||
TC_LOG_DEBUG("bg.arena", "GameMaster: %s [%s] rename arena team \"%s\"[Id: %u] to \"%s\"",
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(), oldArenaStr, arena->GetId(), newArenaStr);
|
||||
else
|
||||
TC_LOG_DEBUG("bg.arena", "Console: rename arena team \"%s\"[Id: %u] to \"%s\"", oldArenaStr, arena->GetId(), newArenaStr);
|
||||
|
||||
@@ -284,11 +284,12 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName().c_str(), arena->GetId(), oldCaptainNameData->m_name.c_str(), target->GetName().c_str());
|
||||
if (handler->GetSession())
|
||||
TC_LOG_DEBUG("bg.arena", "GameMaster: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team \"%s\"[Id: %u]",
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), target->GetName().c_str(), target->GetGUIDLow(), arena->GetName().c_str(), arena->GetId());
|
||||
TC_LOG_DEBUG("bg.arena", "GameMaster: %s [%s] promoted player: %s [%s] to leader of arena team \"%s\"[Id: %u]",
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
|
||||
target->GetName().c_str(), target->GetGUID().ToString().c_str(), arena->GetName().c_str(), arena->GetId());
|
||||
else
|
||||
TC_LOG_DEBUG("bg.arena", "Console: promoted player: %s [GUID: %u] to leader of arena team \"%s\"[Id: %u]",
|
||||
target->GetName().c_str(), target->GetGUIDLow(), arena->GetName().c_str(), arena->GetId());
|
||||
TC_LOG_DEBUG("bg.arena", "Console: promoted player: %s [%s] to leader of arena team \"%s\"[Id: %u]",
|
||||
target->GetName().c_str(), target->GetGUID().ToString().c_str(), arena->GetName().c_str(), arena->GetId());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
targetGuid = (*resultCharacter)[0].GetUInt32();
|
||||
}
|
||||
else
|
||||
targetGuid = target->GetGUIDLow();
|
||||
targetGuid = target->GetGUID().GetCounter();
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_BANINFO);
|
||||
stmt->setUInt32(0, targetGuid);
|
||||
|
||||
@@ -87,9 +87,9 @@ public:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName);
|
||||
if (handler->GetSession())
|
||||
{
|
||||
TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (GUID: %u) created Account %s",
|
||||
TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (%s) created Account %s",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
|
||||
accountName);
|
||||
}
|
||||
break;
|
||||
@@ -230,9 +230,9 @@ public:
|
||||
{
|
||||
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
|
||||
handler->SetSentErrorMessage(true);
|
||||
TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the provided old password is wrong.",
|
||||
TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (%s) Tried to change password, but the provided old password is wrong.",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -250,9 +250,9 @@ public:
|
||||
{
|
||||
case AccountOpResult::AOR_OK:
|
||||
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
|
||||
TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.",
|
||||
TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (%s) Changed Password.",
|
||||
handler->GetSession()->GetBattlenetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
|
||||
break;
|
||||
case AccountOpResult::AOR_PASS_TOO_LONG:
|
||||
handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
|
||||
|
||||
@@ -483,7 +483,7 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
|
||||
target->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE);
|
||||
stmt->setUInt32(1, target->GetGUIDLow());
|
||||
stmt->setUInt32(1, target->GetGUID().GetCounter());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -511,7 +511,7 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
|
||||
target->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION);
|
||||
stmt->setUInt32(1, target->GetGUIDLow());
|
||||
stmt->setUInt32(1, target->GetGUID().GetCounter());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -539,7 +539,7 @@ public:
|
||||
/// @todo add text into database
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
|
||||
target->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE);
|
||||
stmt->setUInt32(1, target->GetGUIDLow());
|
||||
stmt->setUInt32(1, target->GetGUID().GetCounter());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -500,8 +500,8 @@ public:
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage("Loot recipient for creature %s (GUID %u, DB GUID %u) is %s",
|
||||
target->GetName().c_str(), target->GetGUIDLow(), target->GetDBTableGUIDLow(),
|
||||
handler->PSendSysMessage("Loot recipient for creature %s (%s, DB GUID %u) is %s",
|
||||
target->GetName().c_str(), target->GetGUID().ToString().c_str(), target->GetDBTableGUIDLow(),
|
||||
target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName().c_str() : "offline") : "no loot recipient");
|
||||
return true;
|
||||
}
|
||||
@@ -596,7 +596,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bagSlot, item->GetSlot(), item->GetGUIDLow(), st.c_str());
|
||||
handler->PSendSysMessage("bag: %d slot: %d %s - state: %s", bagSlot, item->GetSlot(), item->GetGUID().ToString().c_str(), st.c_str());
|
||||
}
|
||||
if (updateQueue.empty())
|
||||
handler->PSendSysMessage("The player's updatequeue is empty");
|
||||
@@ -617,7 +617,7 @@ public:
|
||||
|
||||
if (item->GetSlot() != i)
|
||||
{
|
||||
handler->PSendSysMessage("Item with slot %d and guid %d has an incorrect slot value: %d", i, item->GetGUIDLow(), item->GetSlot());
|
||||
handler->PSendSysMessage("Item with slot %d and %s has an incorrect slot value: %d", i, item->GetGUID().ToString().c_str(), item->GetSlot());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -641,28 +641,28 @@ public:
|
||||
uint16 qp = item->GetQueuePos();
|
||||
if (qp > updateQueue.size())
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item with slot %d and %s has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUID().ToString().c_str(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == NULL)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item with slot %d and %s has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().ToString().c_str(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", item->GetSlot(), item->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
|
||||
handler->PSendSysMessage("The item with slot %d and %s has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, %s)", item->GetSlot(), item->GetGUID().ToString().c_str(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString().c_str());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (item->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUIDLow(), item->GetState());
|
||||
handler->PSendSysMessage("The item with slot %d and %s is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUID().ToString().c_str(), item->GetState());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -677,7 +677,7 @@ public:
|
||||
|
||||
if (item2->GetSlot() != j)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d and slot %d (guid: %d) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUIDLow(), item2->GetSlot());
|
||||
handler->PSendSysMessage("The item in bag %d and slot %d (%s) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUID().ToString().c_str(), item2->GetSlot());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -709,28 +709,28 @@ public:
|
||||
uint16 qp = item2->GetQueuePos();
|
||||
if (qp > updateQueue.size())
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having %s has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == NULL)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having %s has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item2)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having %s has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, %s)", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString().c_str());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (item2->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), item2->GetState());
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having %s is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), item2->GetState());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -805,14 +805,14 @@ public:
|
||||
ThreatContainer::StorageType const &threatList = target->getThreatManager().getThreatList();
|
||||
ThreatContainer::StorageType::const_iterator itr;
|
||||
uint32 count = 0;
|
||||
handler->PSendSysMessage("Threat list of %s (guid %u)", target->GetName().c_str(), target->GetGUIDLow());
|
||||
handler->PSendSysMessage("Threat list of %s (%s)", target->GetName().c_str(), target->GetGUID().ToString().c_str());
|
||||
for (itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
{
|
||||
Unit* unit = (*itr)->getTarget();
|
||||
if (!unit)
|
||||
continue;
|
||||
++count;
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUIDLow(), (*itr)->getThreat());
|
||||
handler->PSendSysMessage(" %u. %s (%s) - threat %f", count, unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), (*itr)->getThreat());
|
||||
}
|
||||
handler->SendSysMessage("End of threat list.");
|
||||
return true;
|
||||
@@ -825,13 +825,13 @@ public:
|
||||
target = handler->GetSession()->GetPlayer();
|
||||
HostileReference* ref = target->getHostileRefManager().getFirst();
|
||||
uint32 count = 0;
|
||||
handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName().c_str(), target->GetGUIDLow());
|
||||
handler->PSendSysMessage("Hostil reference list of %s (%s)", target->GetName().c_str(), target->GetGUID().ToString().c_str());
|
||||
while (ref)
|
||||
{
|
||||
if (Unit* unit = ref->GetSource()->GetOwner())
|
||||
{
|
||||
++count;
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUIDLow(), ref->getThreat());
|
||||
handler->PSendSysMessage(" %u. %s (%s) - threat %f", count, unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), ref->getThreat());
|
||||
}
|
||||
ref = ref->next();
|
||||
}
|
||||
@@ -1070,7 +1070,7 @@ public:
|
||||
static bool HandleDebugLoSCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
if (Unit* unit = handler->getSelectedUnit())
|
||||
handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName().c_str(), unit->GetGUIDLow(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
|
||||
handler->PSendSysMessage("Unit %s (%s) is %sin LoS", unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1520,7 +1520,7 @@ public:
|
||||
|
||||
if (!creature->GetDBTableGUIDLow())
|
||||
{
|
||||
handler->PSendSysMessage("Selected creature %u isn't in creature table", creature->GetGUIDLow());
|
||||
handler->PSendSysMessage("Selected %s isn't in creature table", creature->GetGUID().ToString().c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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->GetGUIDLow());
|
||||
stmt->setUInt32(1, player->GetGUID().GetCounter());
|
||||
|
||||
// add to Quest Tracker
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
std::string text = msgText;
|
||||
|
||||
// from console show not existed sender
|
||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM);
|
||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 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()->GetGUIDLow() : 0, MAIL_STATIONERY_GM);
|
||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 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()->GetGUIDLow() : 0, MAIL_STATIONERY_GM);
|
||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ public:
|
||||
// -> variable lowguid is filled with the GUID of the NPC
|
||||
uint32 pathid = 0;
|
||||
uint32 point = 0;
|
||||
uint32 wpGuid = 0;
|
||||
ObjectGuid wpGuid;
|
||||
Creature* target = handler->getSelectedCreature();
|
||||
PreparedStatement* stmt = NULL;
|
||||
|
||||
@@ -571,18 +571,18 @@ public:
|
||||
}
|
||||
|
||||
// The visual waypoint
|
||||
wpGuid = target->GetGUIDLow();
|
||||
wpGuid = target->GetGUID();
|
||||
|
||||
// User did select a visual waypoint?
|
||||
|
||||
// Check the creature
|
||||
stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_BY_WPGUID);
|
||||
stmt->setUInt32(0, wpGuid);
|
||||
stmt->setUInt32(0, wpGuid.GetCounter());
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDSEARCH, target->GetGUIDLow());
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDSEARCH, target->GetGUID().ToString().c_str());
|
||||
// Select waypoint number from database
|
||||
// Since we compare float values, we have to deal with
|
||||
// some difficulties.
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
|
||||
if (!queryResult)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDDBPROBLEM, wpGuid);
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDDBPROBLEM, wpGuid.ToString().c_str());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -630,13 +630,15 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp modify del, PathID: |r|cff00ffff%u|r", pathid);
|
||||
|
||||
if (wpGuid != 0)
|
||||
if (Creature* wpCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpGuid)))
|
||||
if (!wpGuid.IsEmpty())
|
||||
{
|
||||
if (Creature* wpCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(wpGuid))
|
||||
{
|
||||
wpCreature->CombatStop();
|
||||
wpCreature->DeleteFromDB();
|
||||
wpCreature->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
|
||||
stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_WAYPOINT_DATA);
|
||||
stmt->setUInt32(0, pathid);
|
||||
@@ -662,9 +664,9 @@ public:
|
||||
// What to do:
|
||||
// Move the visual spawnpoint
|
||||
// Respawn the owner of the waypoints
|
||||
if (wpGuid != 0)
|
||||
if (!wpGuid.IsEmpty())
|
||||
{
|
||||
if (Creature* wpCreature = map->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpGuid)))
|
||||
if (Creature* wpCreature = map->GetCreature(wpGuid))
|
||||
{
|
||||
wpCreature->CombatStop();
|
||||
wpCreature->DeleteFromDB();
|
||||
|
||||
Reference in New Issue
Block a user