mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-19 08:30:34 +01:00
[svn] *** Source Mangos ***
*Load npc_options at server startup, use cached data at creature gossip menu init. * Also new .reload table command added *Implement npc_option localization support, also store in DB BoxText/BoxMoney/Coded * Use characters.guid instead low guid value from characters.data in charcter enum data prepering for client. * Fixed crash at .pinfo command use from console. * Fixed windows ad.exe build *Creature related code and DB cleanups. * Rename 2 creature_template fields to more clean names and related code update also. * Use enum values instead raw values for type_flags, use halper functions instead code repeating. * Move tamed pet creating code to new function. ** Small code changes to make things compliant with above changes. ** Another rev with big changes so test away. --HG-- branch : trunk
This commit is contained in:
@@ -75,6 +75,7 @@ struct GameTele
|
||||
};
|
||||
|
||||
typedef HM_NAMESPACE::hash_map<uint32, GameTele > GameTeleMap;
|
||||
typedef std::list<GossipOption> CacheNpcOptionList;
|
||||
|
||||
struct ScriptInfo
|
||||
{
|
||||
@@ -141,6 +142,7 @@ typedef HM_NAMESPACE::hash_map<uint32,QuestLocale> QuestLocaleMap;
|
||||
typedef HM_NAMESPACE::hash_map<uint32,NpcTextLocale> NpcTextLocaleMap;
|
||||
typedef HM_NAMESPACE::hash_map<uint32,PageTextLocale> PageTextLocaleMap;
|
||||
typedef HM_NAMESPACE::hash_map<uint32,TrinityStringLocale> TrinityStringLocaleMap;
|
||||
typedef HM_NAMESPACE::hash_map<uint32,NpcOptionLocale> NpcOptionLocaleMap;
|
||||
|
||||
typedef std::multimap<uint32,uint32> QuestRelations;
|
||||
|
||||
@@ -537,6 +539,7 @@ class ObjectMgr
|
||||
void LoadQuestLocales();
|
||||
void LoadNpcTextLocales();
|
||||
void LoadPageTextLocales();
|
||||
void LoadNpcOptionLocales();
|
||||
void LoadInstanceTemplate();
|
||||
|
||||
void LoadGossipText();
|
||||
@@ -567,6 +570,7 @@ class ObjectMgr
|
||||
void LoadWeatherZoneChances();
|
||||
void LoadGameTele();
|
||||
|
||||
void LoadNpcOptions();
|
||||
void LoadNpcTextId();
|
||||
void LoadVendors();
|
||||
void LoadTrainerSpell();
|
||||
@@ -664,6 +668,13 @@ class ObjectMgr
|
||||
if(itr==mPageTextLocaleMap.end()) return NULL;
|
||||
return &itr->second;
|
||||
}
|
||||
|
||||
NpcOptionLocale const* GetNpcOptionLocale(uint32 entry) const
|
||||
{
|
||||
NpcOptionLocaleMap::const_iterator itr = mNpcOptionLocaleMap.find(entry);
|
||||
if(itr==mNpcOptionLocaleMap.end()) return NULL;
|
||||
return &itr->second;
|
||||
}
|
||||
|
||||
GameObjectData const* GetGOData(uint32 guid) const
|
||||
{
|
||||
@@ -742,6 +753,8 @@ class ObjectMgr
|
||||
GameTeleMap const& GetGameTeleMap() const { return m_GameTeleMap; }
|
||||
bool AddGameTele(GameTele& data);
|
||||
bool DeleteGameTele(std::string name);
|
||||
|
||||
CacheNpcOptionList const& GetNpcOptions() const { return m_mCacheNpcOptionList; }
|
||||
|
||||
uint32 GetNpcGossip(uint32 entry) const
|
||||
{
|
||||
@@ -874,6 +887,7 @@ class ObjectMgr
|
||||
NpcTextLocaleMap mNpcTextLocaleMap;
|
||||
PageTextLocaleMap mPageTextLocaleMap;
|
||||
TrinityStringLocaleMap mTrinityStringLocaleMap;
|
||||
NpcOptionLocaleMap mNpcOptionLocaleMap;
|
||||
RespawnTimes mCreatureRespawnTimes;
|
||||
RespawnTimes mGORespawnTimes;
|
||||
|
||||
@@ -884,6 +898,7 @@ class ObjectMgr
|
||||
typedef std::vector<PlayerCondition> ConditionStore;
|
||||
ConditionStore mConditions;
|
||||
|
||||
CacheNpcOptionList m_mCacheNpcOptionList;
|
||||
CacheNpcTextIdMap m_mCacheNpcTextIdMap;
|
||||
CacheVendorItemMap m_mCacheVendorItemMap;
|
||||
CacheTrainerSpellMap m_mCacheTrainerSpellMap;
|
||||
|
||||
Reference in New Issue
Block a user