mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
Core/Text: Implemented locales_points_of_interest. (#225)
This commit is contained in:
@@ -171,13 +171,19 @@ void PlayerMenu::SendPointOfInterest(uint32 poiId) const
|
||||
return;
|
||||
}
|
||||
|
||||
std::string iconText = poi->icon_name;
|
||||
int32 locale = _session->GetSessionDbLocaleIndex();
|
||||
if (locale >= 0)
|
||||
if (PointOfInterestLocale const* localeData = sObjectMgr->GetPointOfInterestLocale(poiId))
|
||||
ObjectMgr::GetLocaleString(localeData->IconName, locale, iconText);
|
||||
|
||||
WorldPacket data(SMSG_GOSSIP_POI, 4 + 4 + 4 + 4 + 4 + 20); // guess size
|
||||
data << uint32(poi->flags);
|
||||
data << float(poi->x);
|
||||
data << float(poi->y);
|
||||
data << uint32(poi->icon);
|
||||
data << uint32(poi->data);
|
||||
data << poi->icon_name;
|
||||
data << iconText;
|
||||
|
||||
_session->SendPacket(&data);
|
||||
}
|
||||
|
||||
@@ -1074,6 +1074,12 @@ class ObjectMgr
|
||||
if (itr == _pageTextLocaleStore.end()) return NULL;
|
||||
return &itr->second;
|
||||
}
|
||||
PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const
|
||||
{
|
||||
PointOfInterestLocaleContainer::const_iterator itr = _pointOfInterestLocaleStore.find(poi_id);
|
||||
if (itr == _pointOfInterestLocaleStore.end()) return NULL;
|
||||
return &itr->second;
|
||||
}
|
||||
GameObjectData& NewGOData(uint32 guid) { return _gameObjectDataStore[guid]; }
|
||||
void DeleteGOData(uint32 guid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user