Changeset 157 for trunk/src/game/SpellMgr.h
- Timestamp:
- 11/19/08 13:41:36 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/SpellMgr.h
r131 r157 649 649 typedef std::map<uint32, SpellExtraAttribute> SpellExtraAttrMap; 650 650 651 struct SpellLinkedSpell 652 { 653 int32 spell; 654 uint32 type; 655 }; 656 typedef std::map<int32, SpellLinkedSpell> SpellLinkedMap; 651 typedef std::map<int32, std::vector<int32> > SpellLinkedMap; 657 652 658 653 class SpellMgr … … 863 858 } 864 859 865 int32 GetSpellLinked(int32 spell_id, uint32 type) const860 const std::vector<int32> *GetSpellLinked(int32 spell_id) const 866 861 { 867 862 SpellLinkedMap::const_iterator itr = mSpellLinkedMap.find(spell_id); 868 if(itr != mSpellLinkedMap.end()) 869 return itr->second.type == type ? itr->second.spell : 0; 870 else 871 return 0; 863 return itr != mSpellLinkedMap.end() ? &(itr->second) : NULL; 872 864 } 873 865