diff options
author | Shauren <shauren.trinity@gmail.com> | 2019-06-03 20:40:34 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-06-08 17:06:57 +0200 |
commit | 455959c6064af6f7863a6b4b57cb0ef1646bd8ef (patch) | |
tree | 7d7a7cdd3a44643ee5fc7d19521ced1c8b815c66 /src/server/game/AuctionHouse/AuctionHouseMgr.cpp | |
parent | 31fda79556e55375962a3c9e46f6dbdbf6e90d18 (diff) |
Core/PacketIO: Rewrite updatefield handling
Diffstat (limited to 'src/server/game/AuctionHouse/AuctionHouseMgr.cpp')
-rw-r--r-- | src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 6368980db42..f6d0de1a64f 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -718,41 +718,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPackets::AuctionHouse::Aucti if (name.empty()) continue; - // DO NOT use GetItemEnchantMod(proto->RandomProperty) as it may return a result - // that matches the search but it may not equal item->GetItemRandomPropertyId() - // used in BuildAuctionInfo() which then causes wrong items to be listed - int32 propRefID = item->GetItemRandomPropertyId(); - - if (propRefID) - { - // Append the suffix to the name (ie: of the Monkey) if one exists - // These are found in ItemRandomSuffix.dbc and ItemRandomProperties.dbc - // even though the DBC names seem misleading - - const char* suffix = nullptr; - - if (propRefID < 0) - { - const ItemRandomSuffixEntry* itemRandSuffix = sItemRandomSuffixStore.LookupEntry(-propRefID); - if (itemRandSuffix) - suffix = itemRandSuffix->Name->Str[player->GetSession()->GetSessionDbcLocale()]; - } - else - { - const ItemRandomPropertiesEntry* itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID); - if (itemRandProp) - suffix = itemRandProp->Name->Str[player->GetSession()->GetSessionDbcLocale()]; - } - - // dbc local name - if (suffix) - { - // Append the suffix (ie: of the Monkey) to the name using localization - // or default enUS if localization is invalid - name += ' '; - name += suffix; - } - } + // TODO: Generate name using ItemNameDescription // Perform the search (with or without suffix) if (!Utf8FitTo(name, searchedname)) @@ -852,9 +818,9 @@ void AuctionEntry::BuildAuctionInfo(std::vector<WorldPackets::AuctionHouse::Auct } uint8 i = 0; - for (ItemDynamicFieldGems const& gemData : item->GetGems()) + for (UF::SocketedGem const& gemData : item->m_itemData->Gems) { - if (gemData.ItemId) + if (gemData.ItemID) { WorldPackets::Item::ItemGemData gem; gem.Slot = i; |