summaryrefslogtreecommitdiff
path: root/src/game/AuctionHouse/AuctionHouseMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/AuctionHouse/AuctionHouseMgr.cpp')
-rw-r--r--src/game/AuctionHouse/AuctionHouseMgr.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/AuctionHouse/AuctionHouseMgr.cpp b/src/game/AuctionHouse/AuctionHouseMgr.cpp
index 53ab75ab53..9d977d17c1 100644
--- a/src/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -522,6 +522,9 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
time_t curTime = sWorld->GetGameTime();
+ int loc_idx = player->GetSession()->GetSessionDbLocaleIndex();
+ int locdbc_idx = player->GetSession()->GetSessionDbcLocale();
+
for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
{
if (AsyncAuctionListingMgr::IsAuctionListingAllowed() == false) // pussywizard: World::Update is waiting for us...
@@ -577,6 +580,11 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
if (name.empty())
continue;
+ // local name
+ if (loc_idx >= 0)
+ if (ItemLocale const* il = sObjectMgr->GetItemLocale(proto->ItemId))
+ ObjectMgr::GetLocaleString(il->Name, loc_idx, name);
+
// 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
@@ -609,7 +617,7 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
// Append the suffix (ie: of the Monkey) to the name using localization
// or default enUS if localization is invalid
name += ' ';
- name += suffix[LOCALE_enUS];
+ name += suffix[locdbc_idx >= 0 ? locdbc_idx : LOCALE_enUS];
}
}