diff options
author | megamage <none@none> | 2009-06-08 17:25:02 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-08 17:25:02 -0500 |
commit | 4e130dcdfdd30b84fb5e0b0531c817c7b6c64ff9 (patch) | |
tree | 09f871f8eab58afe981e99fa74cef6bcf0777e7c /src/game/ObjectMgr.h | |
parent | 6578cce47133eb017a7ab6b14c91d6c5b80b226a (diff) |
[7980] Implement item use target requirements store and check (new table `item_required_target`). Author: NoFantasy
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Also implement this table reload
* Static Spell::SendCastResult function for call not from spell code.
Can be also used in scripts where need send explicitly spell cast error to client.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.h')
-rw-r--r-- | src/game/ObjectMgr.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index ae1222cccfb..b8d282569f1 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -160,6 +160,8 @@ typedef UNORDERED_MAP<uint32,NpcOptionLocale> NpcOptionLocaleMap; typedef UNORDERED_MAP<uint32,PointOfInterestLocale> PointOfInterestLocaleMap; typedef std::multimap<uint32,uint32> QuestRelations; +typedef std::multimap<uint32,ItemRequiredTarget> ItemRequiredTargetMap; +typedef std::pair<ItemRequiredTargetMap::const_iterator, ItemRequiredTargetMap::const_iterator> ItemRequiredTargetMapBounds; struct PetLevelInfo { @@ -534,6 +536,7 @@ class ObjectMgr void LoadGameobjects(); void LoadGameobjectRespawnTimes(); void LoadItemPrototypes(); + void LoadItemRequiredTarget(); void LoadItemLocales(); void LoadQuestLocales(); void LoadNpcTextLocales(); @@ -805,6 +808,12 @@ class ObjectMgr uint32 GetScriptId(const char *name); int GetOrNewIndexForLocale(LocaleConstant loc); + + ItemRequiredTargetMapBounds GetItemRequiredTargetMapBounds(uint32 uiItemEntry) const + { + return ItemRequiredTargetMapBounds(m_ItemRequiredTarget.lower_bound(uiItemEntry),m_ItemRequiredTarget.upper_bound(uiItemEntry)); + } + protected: // first free id for selected id type @@ -867,6 +876,8 @@ class ObjectMgr ScriptNameMap m_scriptNames; + ItemRequiredTargetMap m_ItemRequiredTarget; + typedef std::vector<LocaleConstant> LocalForIndex; LocalForIndex m_LocalForIndex; |