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

[svn] Fix broken spell target 38 (script target).
Implement linked spells, but will not enable it before testing.

Original author: megamage
Date: 2008-10-29 14:19:31-05:00

Files:
1 modified

Legend:

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

    r122 r131  
    649649typedef std::map<uint32, SpellExtraAttribute> SpellExtraAttrMap; 
    650650 
    651 typedef std::map<int32, int32> SpellLinkedMap; 
     651struct SpellLinkedSpell 
     652{ 
     653    int32 spell; 
     654    uint32 type; 
     655}; 
     656typedef std::map<int32, SpellLinkedSpell> SpellLinkedMap; 
    652657 
    653658class SpellMgr 
     
    858863        } 
    859864 
    860         int32 GetSpellLinked(int32 spell_id) const 
     865        int32 GetSpellLinked(int32 spell_id, uint32 type) const 
    861866        { 
    862867            SpellLinkedMap::const_iterator itr = mSpellLinkedMap.find(spell_id); 
    863868            if(itr != mSpellLinkedMap.end()) 
    864                 return itr->second; 
     869                return itr->second.type == type ? itr->second.spell : 0; 
    865870            else 
    866871                return 0;