diff options
author | megamage <none@none> | 2009-06-15 23:07:43 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-15 23:07:43 -0500 |
commit | 00f4a31b735f327b715ff12d82f78de33c95539e (patch) | |
tree | eedf5857ff1a8be6bbbb7eb98b005565a07b9cb5 /src/game/ObjectMgr.h | |
parent | 572a9191d970b9b960555c8a5d31efd3160a8b44 (diff) |
[8016] Work at npc click table data use. Author: VladimirMangos
* New fields in `npc_spellclick_spells` for allow set npc spell click mode from quest to infinity
or to another quest, or from reward quest.
* Not expect (and forbid set UNIT_NPC_FLAG_SPELLCLICK in DB and set it at `npc_spellclick_spells` loading.
* Apply some speedups for creature checks affected by spel click state
*Also add target position of 51852. By Roland
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.h')
-rw-r--r-- | src/game/ObjectMgr.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index a508c573ef6..0c032bc8ec3 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -102,12 +102,17 @@ extern ScriptMapMap sWaypointScripts; struct SpellClickInfo { uint32 spellId; - uint32 questId; - uint32 questStatus; + uint32 questStart; // quest start (quest must be active or rewarded for spell apply) + uint32 questEnd; // quest end (quest don't must be rewarded for spell apply) + bool questStartCanActive; // if true then quest start can be active (not only rewarded) uint8 castFlags; + + // helpers + bool IsFitToRequirements(Player const* player) const; }; typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoMap; +typedef std::pair<SpellClickInfoMap::const_iterator,SpellClickInfoMap::const_iterator> SpellClickInfoMapBounds; struct AreaTrigger { @@ -585,7 +590,6 @@ class ObjectMgr void LoadReputationOnKill(); void LoadPointsOfInterest(); - SpellClickInfoMap mSpellClickInfoMap; void LoadNPCSpellClickSpells(); void LoadWeatherZoneChances(); @@ -828,6 +832,11 @@ class ObjectMgr int GetOrNewIndexForLocale(LocaleConstant loc); + SpellClickInfoMapBounds GetSpellClickInfoMapBounds(uint32 creature_id) const + { + return SpellClickInfoMapBounds(mSpellClickInfoMap.lower_bound(creature_id),mSpellClickInfoMap.upper_bound(creature_id)); + } + ItemRequiredTargetMapBounds GetItemRequiredTargetMapBounds(uint32 uiItemEntry) const { return ItemRequiredTargetMapBounds(m_ItemRequiredTarget.lower_bound(uiItemEntry),m_ItemRequiredTarget.upper_bound(uiItemEntry)); @@ -921,6 +930,8 @@ class ObjectMgr ScriptNameMap m_scriptNames; + SpellClickInfoMap mSpellClickInfoMap; + ItemRequiredTargetMap m_ItemRequiredTarget; typedef std::vector<LocaleConstant> LocalForIndex; |