mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
Move area trigger storage from DBC to database (#742)
Renamed AreaTrigger + related stuff to AreaTriggerTeleport
This commit is contained in:
@@ -389,7 +389,7 @@ struct SpellClickInfo
|
||||
typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoContainer;
|
||||
typedef std::pair<SpellClickInfoContainer::const_iterator, SpellClickInfoContainer::const_iterator> SpellClickInfoMapBounds;
|
||||
|
||||
struct AreaTrigger
|
||||
struct AreaTriggerTeleport
|
||||
{
|
||||
uint32 target_mapId;
|
||||
float target_X;
|
||||
@@ -398,6 +398,20 @@ struct AreaTrigger
|
||||
float target_Orientation;
|
||||
};
|
||||
|
||||
struct AreaTrigger
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 map;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float radius;
|
||||
float length;
|
||||
float width;
|
||||
float height;
|
||||
float orientation;
|
||||
};
|
||||
|
||||
struct BroadcastText
|
||||
{
|
||||
BroadcastText() : Id(0), Language(0), EmoteId0(0), EmoteId1(0), EmoteId2(0),
|
||||
@@ -685,6 +699,8 @@ class ObjectMgr
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AreaTriggerTeleport> AreaTriggerTeleportContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AccessRequirement*> AccessRequirementContainer;
|
||||
@@ -812,6 +828,14 @@ class ObjectMgr
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AreaTriggerTeleport const* GetAreaTriggerTeleport(uint32 trigger) const
|
||||
{
|
||||
AreaTriggerTeleportContainer::const_iterator itr = _areaTriggerTeleportStore.find(trigger);
|
||||
if (itr != _areaTriggerTeleportStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AccessRequirement const* GetAccessRequirement(uint32 mapid, Difficulty difficulty) const
|
||||
{
|
||||
AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty));
|
||||
@@ -820,8 +844,8 @@ class ObjectMgr
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AreaTrigger const* GetGoBackTrigger(uint32 Map) const;
|
||||
AreaTrigger const* GetMapEntranceTrigger(uint32 Map) const;
|
||||
AreaTriggerTeleport const* GetGoBackTrigger(uint32 Map) const;
|
||||
AreaTriggerTeleport const* GetMapEntranceTrigger(uint32 Map) const;
|
||||
|
||||
uint32 GetAreaTriggerScriptId(uint32 trigger_id);
|
||||
SpellScriptsBounds GetSpellScriptsBounds(uint32 spell_id);
|
||||
@@ -984,6 +1008,7 @@ class ObjectMgr
|
||||
|
||||
void LoadGossipText();
|
||||
|
||||
void LoadAreaTriggers();
|
||||
void LoadAreaTriggerTeleports();
|
||||
void LoadAccessRequirements();
|
||||
void LoadQuestAreaTriggers();
|
||||
@@ -1333,6 +1358,7 @@ class ObjectMgr
|
||||
TavernAreaTriggerContainer _tavernAreaTriggerStore;
|
||||
GossipTextContainer _gossipTextStore;
|
||||
AreaTriggerContainer _areaTriggerStore;
|
||||
AreaTriggerTeleportContainer _areaTriggerTeleportStore;
|
||||
AreaTriggerScriptContainer _areaTriggerScriptStore;
|
||||
AccessRequirementContainer _accessRequirementStore;
|
||||
DungeonEncounterContainer _dungeonEncounterStore;
|
||||
|
||||
Reference in New Issue
Block a user