Add support for localized item names (#134)

This commit is contained in:
Paul Lee
2023-09-28 04:13:55 +08:00
committed by GitHub
parent 44dca16e00
commit 4ab50a0d4c

View File

@@ -143,6 +143,12 @@ public:
tempStream << std::hex << ItemQualityColors[itemTemplate->Quality];
std::string itemQuality = tempStream.str();
std::string itemName = itemTemplate->Name1;
// get locale item name
int loc_idex = target->GetSession()->GetSessionDbLocaleIndex();
if (ItemLocale const* il = sObjectMgr->GetItemLocale(itemId))
ObjectMgr::GetLocaleString(il->Name, loc_idex, itemName);
std::string playerName = player->GetName();
std::string nameLink = handler->playerLink(playerName);