SE_ApplySpell and SE_TriggerSpell will now be applied based on which effect slot they are used in (instead of always before all spell effects are checked).

Note: If a spell has multiple SE_TriggerSpell effects within it. Only one will be able to trigger. (If you want multiple spells use SE_ApplySpell)
This commit is contained in:
KayenEQ
2014-09-23 09:15:02 -04:00
parent ec01e6c69b
commit c03a70651c
5 changed files with 29 additions and 18 deletions
+11
View File
@@ -188,6 +188,8 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
if (!IsPowerDistModSpell(spell_id))
SetSpellPowerDistanceMod(0);
bool SE_SpellTrigger_HasCast = false;
// iterate through the effects in the spell
for (i = 0; i < EFFECT_COUNT; i++)
@@ -2739,6 +2741,15 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
}
break;
}
case SE_SpellTrigger: {
if (!SE_SpellTrigger_HasCast) {
if (caster && caster->TrySpellTrigger(this, spell_id, i))
SE_SpellTrigger_HasCast = true;
}
break;
}
// Handled Elsewhere
case SE_ImmuneFleeing: