chore(Core/Misc): nullptr cleanup (#11467)

This commit is contained in:
Kitzunu
2022-04-21 19:17:20 +02:00
committed by GitHub
parent eb91bbfc56
commit 1501445b0a
23 changed files with 60 additions and 69 deletions

View File

@@ -620,7 +620,7 @@ public:
continue;
}
if (updateQueue[qp] == nullptr)
if (!updateQueue[qp])
{
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().GetCounter(), qp);
error = true;
@@ -688,7 +688,7 @@ public:
continue;
}
if (updateQueue[qp] == nullptr)
if (!updateQueue[qp])
{
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->GetGUID().GetCounter(), qp);
error = true;
@@ -737,7 +737,7 @@ public:
Item* test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
if (test == nullptr)
if (!test)
{
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for {} are incorrect, the player doesn't have any item at that position!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString()));
error = true;