mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge remote branch 'origin/master' into 330
Conflicts: src/game/ObjectMgr.h
This commit is contained in:
commit
7c6cae1af7
58 changed files with 1937 additions and 990 deletions
|
|
@ -93,6 +93,7 @@ extern ScriptMapMap sQuestStartScripts;
|
|||
extern ScriptMapMap sSpellScripts;
|
||||
extern ScriptMapMap sGameObjectScripts;
|
||||
extern ScriptMapMap sEventScripts;
|
||||
extern ScriptMapMap sGossipScripts;
|
||||
|
||||
struct SpellClickInfo
|
||||
{
|
||||
|
|
@ -162,7 +163,7 @@ typedef UNORDERED_MAP<uint32,QuestLocale> QuestLocaleMap;
|
|||
typedef UNORDERED_MAP<uint32,NpcTextLocale> NpcTextLocaleMap;
|
||||
typedef UNORDERED_MAP<uint32,PageTextLocale> PageTextLocaleMap;
|
||||
typedef UNORDERED_MAP<int32,MangosStringLocale> MangosStringLocaleMap;
|
||||
typedef UNORDERED_MAP<uint32,NpcOptionLocale> NpcOptionLocaleMap;
|
||||
typedef UNORDERED_MAP<uint32,GossipMenuItemsLocale> GossipMenuItemsLocaleMap;
|
||||
typedef UNORDERED_MAP<uint32,PointOfInterestLocale> PointOfInterestLocaleMap;
|
||||
|
||||
typedef std::multimap<uint32,uint32> QuestRelations;
|
||||
|
|
@ -216,6 +217,38 @@ struct PointOfInterest
|
|||
std::string icon_name;
|
||||
};
|
||||
|
||||
struct GossipMenuItems
|
||||
{
|
||||
uint32 menu_id;
|
||||
uint32 id;
|
||||
uint8 option_icon;
|
||||
std::string option_text;
|
||||
uint32 option_id;
|
||||
uint32 npc_option_npcflag;
|
||||
uint32 action_menu_id;
|
||||
uint32 action_poi_id;
|
||||
uint32 action_script_id;
|
||||
bool box_coded;
|
||||
uint32 box_money;
|
||||
std::string box_text;
|
||||
uint16 cond_1;
|
||||
uint16 cond_2;
|
||||
uint16 cond_3;
|
||||
};
|
||||
|
||||
struct GossipMenus
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 text_id;
|
||||
uint16 cond_1;
|
||||
uint16 cond_2;
|
||||
};
|
||||
|
||||
typedef std::multimap<uint32,GossipMenus> GossipMenusMap;
|
||||
typedef std::pair<GossipMenusMap::const_iterator, GossipMenusMap::const_iterator> GossipMenusMapBounds;
|
||||
typedef std::multimap<uint32,GossipMenuItems> GossipMenuItemsMap;
|
||||
typedef std::pair<GossipMenuItemsMap::const_iterator, GossipMenuItemsMap::const_iterator> GossipMenuItemsMapBounds;
|
||||
|
||||
struct QuestPOIPoint
|
||||
{
|
||||
int32 x;
|
||||
|
|
@ -223,6 +256,16 @@ struct QuestPOIPoint
|
|||
|
||||
QuestPOIPoint() : x(0), y(0) {}
|
||||
QuestPOIPoint(int32 _x, int32 _y) : x(_x), y(_y) {}
|
||||
uint32 npc_option_npcflag;
|
||||
uint32 action_menu_id;
|
||||
uint32 action_poi_id;
|
||||
uint32 action_script_id;
|
||||
bool box_coded;
|
||||
uint32 box_money;
|
||||
std::string box_text;
|
||||
uint16 cond_1;
|
||||
uint16 cond_2;
|
||||
uint16 cond_3;
|
||||
};
|
||||
|
||||
struct QuestPOI
|
||||
|
|
@ -277,9 +320,10 @@ enum ConditionType
|
|||
CONDITION_AD_COMMISSION_AURA = 10, // 0 0, for condition true while one from AD commission aura active
|
||||
CONDITION_NO_AURA = 11, // spell_id effindex
|
||||
CONDITION_ACTIVE_EVENT = 12, // event_id
|
||||
CONDITION_AREA_FLAG = 13 // area_flag area_flag_not
|
||||
};
|
||||
|
||||
#define MAX_CONDITION 13 // maximum value in ConditionType enum
|
||||
#define MAX_CONDITION 14 // maximum value in ConditionType enum
|
||||
|
||||
struct PlayerCondition
|
||||
{
|
||||
|
|
@ -301,7 +345,6 @@ struct PlayerCondition
|
|||
|
||||
// NPC gossip text id
|
||||
typedef UNORDERED_MAP<uint32, uint32> CacheNpcTextIdMap;
|
||||
typedef std::list<GossipOption> CacheNpcOptionList;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemMap;
|
||||
typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellMap;
|
||||
|
|
@ -539,6 +582,7 @@ class ObjectMgr
|
|||
void LoadQuestStartScripts();
|
||||
void LoadEventScripts();
|
||||
void LoadSpellScripts();
|
||||
void LoadGossipScripts();
|
||||
|
||||
bool LoadMangosStrings(DatabaseType& db, char const* table, int32 min_value, int32 max_value);
|
||||
bool LoadMangosStrings() { return LoadMangosStrings(WorldDatabase,"mangos_string",MIN_MANGOS_STRING_ID,MAX_MANGOS_STRING_ID); }
|
||||
|
|
@ -559,7 +603,7 @@ class ObjectMgr
|
|||
void LoadQuestLocales();
|
||||
void LoadNpcTextLocales();
|
||||
void LoadPageTextLocales();
|
||||
void LoadNpcOptionLocales();
|
||||
void LoadGossipMenuItemsLocales();
|
||||
void LoadPointOfInterestLocales();
|
||||
void LoadInstanceTemplate();
|
||||
void LoadMailLevelRewards();
|
||||
|
|
@ -592,8 +636,11 @@ class ObjectMgr
|
|||
void LoadWeatherZoneChances();
|
||||
void LoadGameTele();
|
||||
|
||||
void LoadNpcOptions();
|
||||
void LoadNpcTextId();
|
||||
|
||||
void LoadGossipMenu();
|
||||
void LoadGossipMenuItems();
|
||||
|
||||
void LoadVendors();
|
||||
void LoadTrainerSpell();
|
||||
|
||||
|
|
@ -704,10 +751,10 @@ class ObjectMgr
|
|||
if(itr==mPageTextLocaleMap.end()) return NULL;
|
||||
return &itr->second;
|
||||
}
|
||||
NpcOptionLocale const* GetNpcOptionLocale(uint32 entry) const
|
||||
GossipMenuItemsLocale const* GetGossipMenuItemsLocale(uint32 entry) const
|
||||
{
|
||||
NpcOptionLocaleMap::const_iterator itr = mNpcOptionLocaleMap.find(entry);
|
||||
if(itr==mNpcOptionLocaleMap.end()) return NULL;
|
||||
GossipMenuItemsLocaleMap::const_iterator itr = mGossipMenuItemsLocaleMap.find(entry);
|
||||
if(itr==mGossipMenuItemsLocaleMap.end()) return NULL;
|
||||
return &itr->second;
|
||||
}
|
||||
PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const
|
||||
|
|
@ -786,8 +833,6 @@ class ObjectMgr
|
|||
bool AddGameTele(GameTele& data);
|
||||
bool DeleteGameTele(const std::string& name);
|
||||
|
||||
CacheNpcOptionList const& GetNpcOptions() const { return m_mCacheNpcOptionList; }
|
||||
|
||||
uint32 GetNpcGossip(uint32 entry) const
|
||||
{
|
||||
CacheNpcTextIdMap::const_iterator iter = m_mCacheNpcTextIdMap.find(entry);
|
||||
|
|
@ -835,6 +880,16 @@ class ObjectMgr
|
|||
return ItemRequiredTargetMapBounds(m_ItemRequiredTarget.lower_bound(uiItemEntry),m_ItemRequiredTarget.upper_bound(uiItemEntry));
|
||||
}
|
||||
|
||||
GossipMenusMapBounds GetGossipMenusMapBounds(uint32 uiMenuId) const
|
||||
{
|
||||
return GossipMenusMapBounds(m_mGossipMenusMap.lower_bound(uiMenuId),m_mGossipMenusMap.upper_bound(uiMenuId));
|
||||
}
|
||||
|
||||
GossipMenuItemsMapBounds GetGossipMenuItemsMapBounds(uint32 uiMenuId) const
|
||||
{
|
||||
return GossipMenuItemsMapBounds(m_mGossipMenuItemsMap.lower_bound(uiMenuId),m_mGossipMenuItemsMap.upper_bound(uiMenuId));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// first free id for selected id type
|
||||
|
|
@ -876,7 +931,9 @@ class ObjectMgr
|
|||
|
||||
RepOnKillMap mRepOnKill;
|
||||
|
||||
PointOfInterestMap mPointsOfInterest;
|
||||
GossipMenusMap m_mGossipMenusMap;
|
||||
GossipMenuItemsMap m_mGossipMenuItemsMap;
|
||||
PointOfInterestMap mPointsOfInterest;
|
||||
|
||||
QuestPOIMap mQuestPOIMap;
|
||||
|
||||
|
|
@ -942,7 +999,7 @@ class ObjectMgr
|
|||
NpcTextLocaleMap mNpcTextLocaleMap;
|
||||
PageTextLocaleMap mPageTextLocaleMap;
|
||||
MangosStringLocaleMap mMangosStringLocaleMap;
|
||||
NpcOptionLocaleMap mNpcOptionLocaleMap;
|
||||
GossipMenuItemsLocaleMap mGossipMenuItemsLocaleMap;
|
||||
PointOfInterestLocaleMap mPointOfInterestLocaleMap;
|
||||
RespawnTimes mCreatureRespawnTimes;
|
||||
RespawnTimes mGORespawnTimes;
|
||||
|
|
@ -951,7 +1008,6 @@ class ObjectMgr
|
|||
typedef std::vector<PlayerCondition> ConditionStore;
|
||||
ConditionStore mConditions;
|
||||
|
||||
CacheNpcOptionList m_mCacheNpcOptionList;
|
||||
CacheNpcTextIdMap m_mCacheNpcTextIdMap;
|
||||
CacheVendorItemMap m_mCacheVendorItemMap;
|
||||
CacheTrainerSpellMap m_mCacheTrainerSpellMap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue