Show
Ignore:
Timestamp:
11/19/08 13:41:36 (17 years ago)
Author:
yumileroy
Message:

[svn] Fix hunter's frozen trap, half duration when pvp.
Use vector to store linked spell information to support multiple effects.

Original author: megamage
Date: 2008-11-03 17:20:35-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/SpellMgr.h

    r131 r157  
    649649typedef std::map<uint32, SpellExtraAttribute> SpellExtraAttrMap; 
    650650 
    651 struct SpellLinkedSpell 
    652 { 
    653     int32 spell; 
    654     uint32 type; 
    655 }; 
    656 typedef std::map<int32, SpellLinkedSpell> SpellLinkedMap; 
     651typedef std::map<int32, std::vector<int32> > SpellLinkedMap; 
    657652 
    658653class SpellMgr 
     
    863858        } 
    864859 
    865         int32 GetSpellLinked(int32 spell_id, uint32 type) const 
     860        const std::vector<int32> *GetSpellLinked(int32 spell_id) const 
    866861        { 
    867862            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; 
    872864        } 
    873865