*(awe)some changes to triggering spell/aura effects:

*do not use original caster for trigger spell/trigger spell with value effects
 *correct caster selection for force cast/trigger spell/trigger spell with value spell effects

--HG--
branch : trunk
This commit is contained in:
QAston committed 2010-02-20 23:57:54 +01:00
1 parent 2e3f89b61f
commit 6323d7dc33
5 files changed
+45 -42

No files matched your search

+15
View File
@@ -419,6 +419,21 @@ uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, Spe
return powerCost;
}
Unit* GetTriggeredSpellCaster(SpellEntry const * spellInfo, Unit * caster, Unit * target)
{
for (uint8 i = 0 ; i < MAX_SPELL_EFFECTS; ++i)
{
if (SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET
|| SpellTargetType[spellInfo->EffectImplicitTargetB[i]] == TARGET_TYPE_UNIT_TARGET
|| SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_CHANNEL
|| SpellTargetType[spellInfo->EffectImplicitTargetB[i]] == TARGET_TYPE_CHANNEL
|| SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_DEST_TARGET
|| SpellTargetType[spellInfo->EffectImplicitTargetB[i]] == TARGET_TYPE_DEST_TARGET)
return caster;
}
return target;
}
AuraState GetSpellAuraState(SpellEntry const * spellInfo)
{
// Seals