mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user