Changeset 131 for trunk/src/game/Spell.cpp
- Timestamp:
- 11/19/08 13:38:58 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Spell.cpp
r122 r131 923 923 if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI()) 924 924 ((Creature*)m_caster)->AI()->SpellHitTarget(unit, m_spellInfo); 925 926 if(int32 spell_triggered = spellmgr.GetSpellLinked(m_spellInfo->Id, 1)) 927 { 928 if(spell_triggered > 0) 929 m_caster->CastSpell(unit, spell_triggered, true); 930 else 931 unit->RemoveAurasDueToSpell(-spell_triggered); 932 } 925 933 } 926 934 … … 1287 1295 radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); 1288 1296 1297 uint32 EffectChainTarget = m_spellInfo->EffectChainTarget[i]; 1298 uint32 unMaxTargets = m_spellInfo->MaxAffectedTargets; 1289 1299 if(m_originalCaster) 1300 { 1290 1301 if(Player* modOwner = m_originalCaster->GetSpellModOwner()) 1302 { 1291 1303 modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius,this); 1292 1293 uint32 EffectChainTarget = m_spellInfo->EffectChainTarget[i];1294 if(m_originalCaster)1295 if(Player* modOwner = m_originalCaster->GetSpellModOwner())1296 1304 modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, EffectChainTarget, this); 1297 1298 uint32 unMaxTargets = m_spellInfo->MaxAffectedTargets; 1305 } 1306 } 1307 1299 1308 switch(cur) 1300 1309 { … … 1552 1561 m_targets.setDestination(goScriptTarget->GetPositionX(),goScriptTarget->GetPositionY(),goScriptTarget->GetPositionZ()); 1553 1562 } 1563 else 1564 { 1565 if(creatureScriptTarget) 1566 TagUnitMap.push_back(creatureScriptTarget); 1567 else if(goScriptTarget) 1568 AddGOTarget(goScriptTarget, i); 1569 } 1554 1570 }break; 1555 1556 1571 1557 1572 // dummy … … 2176 2191 } 2177 2192 } 2193 } 2194 2195 if(int32 spell_triggered = spellmgr.GetSpellLinked(m_spellInfo->Id, 0)) 2196 { 2197 if(spell_triggered > 0) 2198 m_caster->CastSpell(m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster, spell_triggered, true); 2199 else 2200 m_caster->RemoveAurasDueToSpell(-spell_triggered); 2178 2201 } 2179 2202