Core/Text: Implemented locales_points_of_interest. (#225)
This commit is contained in:
parent
b8a30dd543
commit
b25dbaa96b
3 changed files with 488 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue