[7980] Implement item use target requirements store and check (new table item_required_target). Author: NoFantasy
Signed-off-by: VladimirMangos <[email protected]> * 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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user