diff options
Diffstat (limited to 'src/server/game/Handlers/ItemHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/ItemHandler.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 9d3b120f0ba..66f9beb12d2 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -338,7 +338,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPackets::Item::DestroyItem& dest if (item->GetTemplate()->GetFlags() & ITEM_FLAG_NO_USER_DESTROY) { - _player->SendEquipError(EQUIP_ERR_DROP_BOUND_ITEM, NULL, NULL); + _player->SendEquipError(EQUIP_ERR_DROP_BOUND_ITEM, nullptr, nullptr); return; } @@ -375,11 +375,11 @@ void WorldSession::HandleReadItem(WorldPackets::Item::ReadItem& readItem) SendPacket(packet.Write());*/ TC_LOG_INFO("network", "STORAGE: Unable to read item"); - _player->SendEquipError(msg, item, NULL); + _player->SendEquipError(msg, item, nullptr); } } else - _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); + _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr); } void WorldSession::HandleSellItemOpcode(WorldPackets::Item::SellItem& packet) @@ -505,7 +505,7 @@ void WorldSession::HandleBuybackItem(WorldPackets::Item::BuyBackItem& packet) if (!creature) { TC_LOG_DEBUG("network", "WORLD: HandleBuybackItem - Unit (%s) not found or you can not interact with him.", packet.VendorGUID.ToString().c_str()); - _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, ObjectGuid::Empty); + _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, ObjectGuid::Empty); return; } @@ -532,7 +532,7 @@ void WorldSession::HandleBuybackItem(WorldPackets::Item::BuyBackItem& packet) _player->MoveItemToInventory(dest, pItem, true); } else - _player->SendEquipError(msg, pItem, NULL); + _player->SendEquipError(msg, pItem, nullptr); return; } else @@ -590,7 +590,7 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid) if (!vendor) { TC_LOG_DEBUG("network", "WORLD: SendListInventory - %s not found or you can not interact with him.", vendorGuid.ToString().c_str()); - _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, ObjectGuid::Empty); + _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, ObjectGuid::Empty); return; } @@ -801,63 +801,63 @@ void WorldSession::HandleWrapItem(WorldPackets::Item::WrapItem& packet) Item* gift = _player->GetItemByPos(giftContainerSlot, giftSlot); if (!gift) { - _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, NULL); + _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, nullptr); return; } if (!(gift->GetTemplate()->GetFlags() & ITEM_FLAG_IS_WRAPPER)) // cheating: non-wrapper wrapper { - _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, NULL); + _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, nullptr); return; } Item* item = _player->GetItemByPos(itemContainerSlot, itemSlot); if (!item) { - _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, item, NULL); + _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, item, nullptr); return; } if (item == gift) // not possable with pacjket from real client { - _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, NULL); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, nullptr); return; } if (item->IsEquipped()) { - _player->SendEquipError(EQUIP_ERR_CANT_WRAP_EQUIPPED, item, NULL); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_EQUIPPED, item, nullptr); return; } if (!item->GetGiftCreator().IsEmpty()) // HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED); { - _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, NULL); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, nullptr); return; } if (item->IsBag()) { - _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BAGS, item, NULL); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BAGS, item, nullptr); return; } if (item->IsSoulBound()) { - _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BOUND, item, NULL); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BOUND, item, nullptr); return; } if (item->GetMaxStackCount() != 1) { - _player->SendEquipError(EQUIP_ERR_CANT_WRAP_STACKABLE, item, NULL); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_STACKABLE, item, nullptr); return; } // maybe not correct check (it is better than nothing) if (item->GetTemplate()->GetMaxCount() > 0) { - _player->SendEquipError(EQUIP_ERR_CANT_WRAP_UNIQUE, item, NULL); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_UNIQUE, item, nullptr); return; } @@ -1006,7 +1006,7 @@ void WorldSession::HandleSocketGems(WorldPackets::Item::SocketGems& socketGems) { if (iGemProto->GetId() == gems[j]->GetEntry()) { - _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, NULL); + _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, nullptr); return; } } @@ -1014,7 +1014,7 @@ void WorldSession::HandleSocketGems(WorldPackets::Item::SocketGems& socketGems) { if (int32(iGemProto->GetId()) == oldGemData[j]->ItemID) { - _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, NULL); + _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, nullptr); return; } } @@ -1047,7 +1047,7 @@ void WorldSession::HandleSocketGems(WorldPackets::Item::SocketGems& socketGems) if (limit_newcount > 0 && uint32(limit_newcount) > _player->GetItemLimitCategoryQuantity(limitEntry)) { - _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, NULL); + _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, nullptr); return; } } @@ -1058,7 +1058,7 @@ void WorldSession::HandleSocketGems(WorldPackets::Item::SocketGems& socketGems) { if (InventoryResult res = _player->CanEquipUniqueItem(gems[i], slot, std::max(limit_newcount, 0))) { - _player->SendEquipError(res, itemTarget, NULL); + _player->SendEquipError(res, itemTarget, nullptr); return; } } |