mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it.
This commit is contained in:
parent
2fa4cf41a7
commit
ce7b98c45e
21 changed files with 122 additions and 121 deletions
|
|
@ -332,7 +332,7 @@ bool ChatHandler::HandleDebugGetLootRecipientCommand(char* /*args*/)
|
|||
SendSysMessage("loot recipient: no loot recipient");
|
||||
else if(Player* recipient = target->GetLootRecipient())
|
||||
PSendSysMessage("loot recipient: %s with raw data %s from group %u",
|
||||
recipient->GetObjectGuid().GetString().c_str(),
|
||||
recipient->GetGuidStr().c_str(),
|
||||
target->GetLootRecipientGuid().GetString().c_str(),
|
||||
target->GetLootGroupRecipientId());
|
||||
else
|
||||
|
|
@ -403,7 +403,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
{
|
||||
if (item->GetState() == state)
|
||||
PSendSysMessage("%s bag: 255 slot: %u owner: %s",
|
||||
item->GetObjectGuid().GetString().c_str(), item->GetSlot(), item->GetOwnerGuid().GetString().c_str());
|
||||
item->GetGuidStr().c_str(), item->GetSlot(), item->GetOwnerGuid().GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -413,7 +413,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
Item* item2 = bag->GetItemByPos(j);
|
||||
if (item2 && item2->GetState() == state)
|
||||
PSendSysMessage("%s bag: %u slot: %u owner: %s",
|
||||
item2->GetObjectGuid().GetString().c_str(), item2->GetBagSlot(), item2->GetSlot(),
|
||||
item2->GetGuidStr().c_str(), item2->GetBagSlot(), item2->GetSlot(),
|
||||
item2->GetOwnerGuid().GetString().c_str());
|
||||
}
|
||||
}
|
||||
|
|
@ -441,7 +441,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
}
|
||||
|
||||
PSendSysMessage("%s bag: %u slot: %u - state: %s",
|
||||
item->GetObjectGuid().GetString().c_str(), bag_slot, item->GetSlot(), st.c_str());
|
||||
item->GetGuidStr().c_str(), bag_slot, item->GetSlot(), st.c_str());
|
||||
}
|
||||
if (updateQueue.empty())
|
||||
PSendSysMessage("updatequeue empty");
|
||||
|
|
@ -462,23 +462,23 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
if (item->GetSlot() != i)
|
||||
{
|
||||
PSendSysMessage("%s at slot %u has an incorrect slot value: %d",
|
||||
item->GetObjectGuid().GetString().c_str(), i, item->GetSlot());
|
||||
item->GetGuidStr().c_str(), i, item->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (item->GetOwnerGuid() != player->GetObjectGuid())
|
||||
{
|
||||
PSendSysMessage("%s at slot %u owner (%s) and inventory owner (%s) don't match!",
|
||||
item->GetObjectGuid().GetString().c_str(), item->GetSlot(),
|
||||
item->GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str());
|
||||
item->GetGuidStr().c_str(), item->GetSlot(),
|
||||
item->GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (Bag *container = item->GetContainer())
|
||||
{
|
||||
PSendSysMessage("%s at slot %u has a container %s from slot %u but shouldnt!",
|
||||
item->GetObjectGuid().GetString().c_str(), item->GetSlot(),
|
||||
container->GetObjectGuid().GetString().c_str(), container->GetSlot());
|
||||
item->GetGuidStr().c_str(), item->GetSlot(),
|
||||
container->GetGuidStr().c_str(), container->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
|
|
@ -488,29 +488,29 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
if (qp > updateQueue.size())
|
||||
{
|
||||
PSendSysMessage("%s at slot %u has a queuepos (%d) larger than the update queue size! ",
|
||||
item->GetObjectGuid().GetString().c_str(), item->GetSlot(), qp);
|
||||
item->GetGuidStr().c_str(), item->GetSlot(), qp);
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == NULL)
|
||||
{
|
||||
PSendSysMessage("%s at slot %u has a queuepos (%d) that points to NULL in the queue!",
|
||||
item->GetObjectGuid().GetString().c_str(), item->GetSlot(), qp);
|
||||
item->GetGuidStr().c_str(), item->GetSlot(), qp);
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item)
|
||||
{
|
||||
PSendSysMessage("%s at slot %u has a queuepos (%d) that points to %s in the queue (bag %u, slot %u)",
|
||||
item->GetObjectGuid().GetString().c_str(), item->GetSlot(), qp,
|
||||
updateQueue[qp]->GetObjectGuid().GetString().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot());
|
||||
item->GetGuidStr().c_str(), item->GetSlot(), qp,
|
||||
updateQueue[qp]->GetGuidStr().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
}
|
||||
else if (item->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
PSendSysMessage("%s at slot %u is not in queue but should be (state: %d)!",
|
||||
item->GetObjectGuid().GetString().c_str(), item->GetSlot(), item->GetState());
|
||||
item->GetGuidStr().c_str(), item->GetSlot(), item->GetState());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
|
|
@ -525,15 +525,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
if (item2->GetSlot() != j)
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u has an incorrect slot value: %u",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), j, item2->GetSlot());
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), j, item2->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (item2->GetOwnerGuid() != player->GetGUID())
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u owner (%s) and inventory owner (%s) don't match!",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(),
|
||||
item2->GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str());
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(),
|
||||
item2->GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
|
|
@ -541,15 +541,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
if (!container)
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u has no container!",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot());
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (container != bag)
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u has a different container %s from slot %u!",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(),
|
||||
container->GetObjectGuid().GetString().c_str(), container->GetSlot());
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(),
|
||||
container->GetGuidStr().c_str(), container->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
|
|
@ -559,29 +559,29 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
if (qp > updateQueue.size())
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u has a queuepos (%d) larger than the update queue size! ",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), qp);
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), qp);
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == NULL)
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u has a queuepos (%d) that points to NULL in the queue!",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), qp);
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), qp);
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item2)
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u has a queuepos (%d) that points to %s in the queue (bag %u slot %u)",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), qp,
|
||||
updateQueue[qp]->GetObjectGuid().GetString().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot());
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), qp,
|
||||
updateQueue[qp]->GetGuidStr().c_str(), updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
}
|
||||
else if (item2->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
PSendSysMessage("%s in bag %u at slot %u is not in queue but should be (state: %d)!",
|
||||
item2->GetObjectGuid().GetString().c_str(), bag->GetSlot(), item2->GetSlot(), item2->GetState());
|
||||
item2->GetGuidStr().c_str(), bag->GetSlot(), item2->GetSlot(), item2->GetState());
|
||||
error = true; continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -596,15 +596,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
if (item->GetOwnerGuid() != player->GetObjectGuid())
|
||||
{
|
||||
PSendSysMessage("queue(" SIZEFMTD "): %s has the owner (%s) and inventory owner (%s) don't match!",
|
||||
i, item->GetObjectGuid().GetString().c_str(),
|
||||
item->GetOwnerGuid().GetString().c_str(), player->GetObjectGuid().GetString().c_str());
|
||||
i, item->GetGuidStr().c_str(),
|
||||
item->GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (item->GetQueuePos() != i)
|
||||
{
|
||||
PSendSysMessage("queue(" SIZEFMTD "): %s has queuepos doesn't match it's position in the queue!",
|
||||
i, item->GetObjectGuid().GetString().c_str());
|
||||
i, item->GetGuidStr().c_str());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
|
|
@ -614,15 +614,15 @@ bool ChatHandler::HandleDebugGetItemStateCommand(char* args)
|
|||
if (test == NULL)
|
||||
{
|
||||
PSendSysMessage("queue(" SIZEFMTD "): %s has incorrect (bag %u slot %u) values, the player doesn't have an item at that position!",
|
||||
i, item->GetObjectGuid().GetString().c_str(), item->GetBagSlot(), item->GetSlot());
|
||||
i, item->GetGuidStr().c_str(), item->GetBagSlot(), item->GetSlot());
|
||||
error = true; continue;
|
||||
}
|
||||
|
||||
if (test != item)
|
||||
{
|
||||
PSendSysMessage("queue(" SIZEFMTD "): %s has incorrect (bag %u slot %u) values, the %s is there instead!",
|
||||
i, item->GetObjectGuid().GetString().c_str(), item->GetBagSlot(), item->GetSlot(),
|
||||
test->GetObjectGuid().GetString().c_str());
|
||||
i, item->GetGuidStr().c_str(), item->GetBagSlot(), item->GetSlot(),
|
||||
test->GetGuidStr().c_str());
|
||||
error = true; continue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue