[svn] Fix broken spell target 38 (script target).

Implement linked spells, but will not enable it before testing.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-10-29 14:19:31 -05:00
parent 5e809c2a6b
commit febb2d6147
4 changed files with 72 additions and 51 deletions
+8 -3
View File
@@ -648,7 +648,12 @@ struct SpellExtraAttribute
typedef std::map<uint32, SpellExtraAttribute> SpellExtraAttrMap;
typedef std::map<int32, int32> SpellLinkedMap;
struct SpellLinkedSpell
{
int32 spell;
uint32 type;
};
typedef std::map<int32, SpellLinkedSpell> SpellLinkedMap;
class SpellMgr
{
@@ -857,11 +862,11 @@ class SpellMgr
return 0;
}
int32 GetSpellLinked(int32 spell_id) const
int32 GetSpellLinked(int32 spell_id, uint32 type) const
{
SpellLinkedMap::const_iterator itr = mSpellLinkedMap.find(spell_id);
if(itr != mSpellLinkedMap.end())
return itr->second;
return itr->second.type == type ? itr->second.spell : 0;
else
return 0;
}