diff options
Diffstat (limited to 'src/server/game/Handlers/ItemHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/ItemHandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index c8f33fab7a3..6dd5fd3b3a7 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -336,7 +336,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPackets::Item::DestroyItem& dest return; } - if (item->GetTemplate()->GetFlags() & ITEM_FLAG_NO_USER_DESTROY) + if (item->GetTemplate()->HasFlag(ITEM_FLAG_NO_USER_DESTROY)) { _player->SendEquipError(EQUIP_ERR_DROP_BOUND_ITEM, nullptr, nullptr); return; @@ -435,7 +435,7 @@ void WorldSession::HandleSellItemOpcode(WorldPackets::Item::SellItem& packet) // prevent selling item for sellprice when the item is still refundable // this probably happens when right clicking a refundable item, the client sends both // CMSG_SELL_ITEM and CMSG_REFUND_ITEM (unverified) - if (pItem->HasItemFlag(ITEM_FIELD_FLAG_REFUNDABLE)) + if (pItem->IsRefundable()) return; // Therefore, no feedback to client // special case at auto sell (sell all) @@ -646,8 +646,8 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid) continue; // Only display items in vendor lists for the team the player is on - if ((itemTemplate->GetFlags2() & ITEM_FLAG2_FACTION_HORDE && _player->GetTeam() == ALLIANCE) || - (itemTemplate->GetFlags2() & ITEM_FLAG2_FACTION_ALLIANCE && _player->GetTeam() == HORDE)) + if ((itemTemplate->HasFlag(ITEM_FLAG2_FACTION_HORDE) && _player->GetTeam() == ALLIANCE) || + (itemTemplate->HasFlag(ITEM_FLAG2_FACTION_ALLIANCE) && _player->GetTeam() == HORDE)) continue; // Items sold out are not displayed in list @@ -674,7 +674,7 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid) item.StackCount = itemTemplate->GetBuyCount(); item.Price = price; item.DoNotFilterOnVendor = vendorItem->IgnoreFiltering; - item.Refundable = itemTemplate->GetFlags() & ITEM_FLAG_ITEM_PURCHASE_RECORD && vendorItem->ExtendedCost && itemTemplate->GetMaxStackSize() == 1; + item.Refundable = itemTemplate->HasFlag(ITEM_FLAG_ITEM_PURCHASE_RECORD) && vendorItem->ExtendedCost && itemTemplate->GetMaxStackSize() == 1; item.Item.ItemID = vendorItem->item; if (!vendorItem->BonusListIDs.empty()) @@ -815,7 +815,7 @@ void WorldSession::HandleWrapItem(WorldPackets::Item::WrapItem& packet) return; } - if (!(gift->GetTemplate()->GetFlags() & ITEM_FLAG_IS_WRAPPER)) // cheating: non-wrapper wrapper + if (!gift->GetTemplate()->HasFlag(ITEM_FLAG_IS_WRAPPER)) // cheating: non-wrapper wrapper { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, nullptr); return; @@ -1005,7 +1005,7 @@ void WorldSession::HandleSocketGems(WorldPackets::Item::SocketGems& socketGems) ItemTemplate const* iGemProto = gems[i]->GetTemplate(); // unique item (for new and already placed bit removed enchantments - if (iGemProto->GetFlags() & ITEM_FLAG_UNIQUE_EQUIPPABLE) + if (iGemProto->HasFlag(ITEM_FLAG_UNIQUE_EQUIPPABLE)) { for (uint32 j = 0; j < MAX_GEM_SOCKETS; ++j) { |