[7292] Implement storage for points of interest data in DB.

It can be in current state used for simplify scripting code that set POI and more advansed way later..
Call void PlayerMenu::SendPointOfInterest( float X, float Y, uint32 Icon, uint32 Flags, uint32 Data, char const * locName )
will removed after some time delay, and only void PlayerMenu::SendPointOfInterest( uint32 poi_id ) will exist.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
GriffonHeart 2009-02-17 23:21:54 +03:00 committed by VladimirMangos
parent 946e4fb036
commit 9b2a772413
14 changed files with 302 additions and 16 deletions

View file

@ -146,6 +146,7 @@ typedef UNORDERED_MAP<uint32,NpcTextLocale> NpcTextLocaleMap;
typedef UNORDERED_MAP<uint32,PageTextLocale> PageTextLocaleMap;
typedef UNORDERED_MAP<uint32,MangosStringLocale> MangosStringLocaleMap;
typedef UNORDERED_MAP<uint32,NpcOptionLocale> NpcOptionLocaleMap;
typedef UNORDERED_MAP<uint32,PointOfInterestLocale> PointOfInterestLocaleMap;
typedef std::multimap<uint32,uint32> QuestRelations;
@ -172,6 +173,17 @@ struct ReputationOnKillEntry
bool team_dependent;
};
struct PointOfInterest
{
uint32 entry;
float x;
float y;
uint32 icon;
uint32 flags;
uint32 data;
std::string icon_name;
};
struct PetCreateSpellEntry
{
uint32 spellid[4];
@ -292,6 +304,7 @@ class ObjectMgr
typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptMap;
typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillMap;
typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestMap;
typedef UNORDERED_MAP<uint32, WeatherZoneChances> WeatherZoneMap;
@ -431,6 +444,14 @@ class ObjectMgr
return NULL;
}
PointOfInterest const* GetPointOfInterest(uint32 id) const
{
PointOfInterestMap::const_iterator itr = mPointsOfInterest.find(id);
if(itr != mPointsOfInterest.end())
return &itr->second;
return NULL;
}
PetCreateSpellEntry const* GetPetCreateSpellEntry(uint32 id) const
{
PetCreateSpellMap::const_iterator itr = mPetCreateSpell.find(id);
@ -486,6 +507,7 @@ class ObjectMgr
void LoadNpcTextLocales();
void LoadPageTextLocales();
void LoadNpcOptionLocales();
void LoadPointOfInterestLocales();
void LoadInstanceTemplate();
void LoadGossipText();
@ -508,6 +530,7 @@ class ObjectMgr
void LoadFishingBaseSkillLevel();
void LoadReputationOnKill();
void LoadPointsOfInterest();
void LoadWeatherZoneChances();
void LoadGameTele();
@ -615,6 +638,12 @@ class ObjectMgr
if(itr==mNpcOptionLocaleMap.end()) return NULL;
return &itr->second;
}
PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const
{
PointOfInterestLocaleMap::const_iterator itr = mPointOfInterestLocaleMap.find(poi_id);
if(itr==mPointOfInterestLocaleMap.end()) return NULL;
return &itr->second;
}
GameObjectData const* GetGOData(uint32 guid) const
{
@ -768,6 +797,8 @@ class ObjectMgr
RepOnKillMap mRepOnKill;
PointOfInterestMap mPointsOfInterest;
WeatherZoneMap mWeatherZoneMap;
PetCreateSpellMap mPetCreateSpell;
@ -826,6 +857,7 @@ class ObjectMgr
PageTextLocaleMap mPageTextLocaleMap;
MangosStringLocaleMap mMangosStringLocaleMap;
NpcOptionLocaleMap mNpcOptionLocaleMap;
PointOfInterestLocaleMap mPointOfInterestLocaleMap;
RespawnTimes mCreatureRespawnTimes;
RespawnTimes mGORespawnTimes;