mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-17 05:32:25 +00:00
Fix to SE_ApplyEffect - Will now trigger spell from this effect at correct time.
This commit is contained in:
parent
c160b8716f
commit
1f155690d8
20
zone/mob.cpp
20
zone/mob.cpp
@ -3083,26 +3083,6 @@ void Mob::TrySpellTrigger(Mob *target, uint32 spell_id)
|
||||
}
|
||||
}
|
||||
|
||||
void Mob::TryApplyEffect(Mob *target, uint32 spell_id)
|
||||
{
|
||||
if(target == nullptr || !IsValidSpell(spell_id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i = 0; i < EFFECT_COUNT; i++)
|
||||
{
|
||||
if (spells[spell_id].effectid[i] == SE_ApplyEffect)
|
||||
{
|
||||
if(MakeRandomInt(0, 100) <= spells[spell_id].base[i])
|
||||
{
|
||||
if(target)
|
||||
SpellFinished(spells[spell_id].base2[i], target, 10, 0, -1, spells[spell_id].ResistDiff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Mob::TryTriggerOnValueAmount(bool IsHP, bool IsMana, bool IsEndur, bool IsPet)
|
||||
{
|
||||
/*
|
||||
|
||||
@ -580,7 +580,6 @@ public:
|
||||
void TryTriggerOnCast(uint32 spell_id, bool aa_trigger);
|
||||
void TriggerOnCast(uint32 focus_spell, uint32 spell_id, bool aa_trigger);
|
||||
void TrySpellTrigger(Mob *target, uint32 spell_id);
|
||||
void TryApplyEffect(Mob *target, uint32 spell_id);
|
||||
void TryTriggerOnValueAmount(bool IsHP = false, bool IsMana = false, bool IsEndur = false, bool IsPet = false);
|
||||
void TryTwincast(Mob *caster, Mob *target, uint32 spell_id);
|
||||
void TrySympatheticProc(Mob *target, uint32 spell_id);
|
||||
|
||||
@ -2729,6 +2729,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
Message(10, "The power of your next illusion spell will flow to your grouped target in your place.");
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_ApplyEffect: {
|
||||
|
||||
if (caster && IsValidSpell(spells[spell_id].base2[i])){
|
||||
|
||||
if(MakeRandomInt(0, 100) <= spells[spell_id].base[i])
|
||||
caster->SpellFinished(spells[spell_id].base2[i], this, 10, 0, -1, spells[spell_id].ResistDiff);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Handled Elsewhere
|
||||
case SE_ImmuneFleeing:
|
||||
@ -2840,7 +2850,6 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
case SE_SkillDamageTaken:
|
||||
case SE_FcSpellVulnerability:
|
||||
case SE_SpellTrigger:
|
||||
case SE_ApplyEffect:
|
||||
case SE_FcTwincast:
|
||||
case SE_DelayDeath:
|
||||
case SE_CastOnFadeEffect:
|
||||
|
||||
@ -3648,7 +3648,6 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
}
|
||||
|
||||
TrySpellTrigger(spelltar, spell_id);
|
||||
TryApplyEffect(spelltar, spell_id);
|
||||
if (IsValidSpell(spells[spell_id].RecourseLink))
|
||||
SpellFinished(spells[spell_id].RecourseLink, this, 10, 0, -1, spells[spells[spell_id].RecourseLink].ResistDiff);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user