diff options
Diffstat (limited to 'src/server/game/Handlers/ItemHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/ItemHandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 11ecb3ff584..0d18eedb5d0 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -293,7 +293,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData) return; } - if (pItem->GetTemplate()->Flags & ITEM_FLAG_NO_USER_DESTROY) + if (pItem->GetTemplate()->HasFlag(ITEM_FLAG_NO_USER_DESTROY)) { _player->SendEquipError(EQUIP_ERR_CANT_DROP_SOULBOUND, nullptr, nullptr); return; @@ -421,7 +421,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData) // 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->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE)) + if (pItem->IsRefundable()) return; // Therefore, no feedback to client // special case at auto sell (sell all) @@ -654,7 +654,7 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid) continue; // Only display items in vendor lists for the team the // player is on. If GM on, display all items. - if (!_player->IsGameMaster() && ((itemTemplate->Flags2 & ITEM_FLAG2_FACTION_HORDE && _player->GetTeam() == ALLIANCE) || (itemTemplate->Flags2 == ITEM_FLAG2_FACTION_ALLIANCE && _player->GetTeam() == HORDE))) + if (!_player->IsGameMaster() && ((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 @@ -971,7 +971,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData) return; } - if (!(gift->GetTemplate()->Flags & 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; @@ -1150,7 +1150,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) ItemTemplate const* iGemProto = Gems[i]->GetTemplate(); // unique item (for new and already placed bit removed enchantments - if (iGemProto->Flags & ITEM_FLAG_UNIQUE_EQUIPPABLE) + if (iGemProto->HasFlag(ITEM_FLAG_UNIQUE_EQUIPPABLE)) { for (int j = 0; j < MAX_GEM_SOCKETS; ++j) { |