mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
[Bug Fix] Fix Sympathetic Procs for Bots/Mercenariess (#4086)
# Notes - Bots and Mercenaries were being rejected at the top of this method despite us allowing them to use this method where it's called.
This commit is contained in:
parent
3f46210639
commit
4ad46b54df
74
zone/mob.cpp
74
zone/mob.cpp
@ -6044,40 +6044,54 @@ bool Mob::TryFadeEffect(int slot)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mob::TrySympatheticProc(Mob *target, uint32 spell_id)
|
void Mob::TrySympatheticProc(Mob* target, uint32 spell_id)
|
||||||
{
|
{
|
||||||
if(target == nullptr || !IsValidSpell(spell_id) || !IsClient())
|
if (!target || !IsValidSpell(spell_id) || !IsOfClientBotMerc()) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint16 focus_spell = GetSympatheticFocusEffect(focusSympatheticProc,spell_id);
|
|
||||||
|
|
||||||
if(!IsValidSpell(focus_spell))
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint16 focus_trigger = GetSympatheticSpellProcID(focus_spell);
|
|
||||||
|
|
||||||
if(!IsValidSpell(focus_trigger))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// For beneficial spells, if the triggered spell is also beneficial then proc it on the target
|
|
||||||
// if the triggered spell is detrimental, then it will trigger on the caster(ie cursed items)
|
|
||||||
if(IsBeneficialSpell(spell_id))
|
|
||||||
{
|
|
||||||
if(IsBeneficialSpell(focus_trigger))
|
|
||||||
SpellFinished(focus_trigger, target);
|
|
||||||
|
|
||||||
else
|
|
||||||
SpellFinished(focus_trigger, this, EQ::spells::CastingSlot::Item, 0, -1, spells[focus_trigger].resist_difficulty);
|
|
||||||
}
|
}
|
||||||
// For detrimental spells, if the triggered spell is beneficial, then it will land on the caster
|
|
||||||
// if the triggered spell is also detrimental, then it will land on the target
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(IsBeneficialSpell(focus_trigger))
|
|
||||||
SpellFinished(focus_trigger, this);
|
|
||||||
|
|
||||||
else
|
const uint16 focus_spell = GetSympatheticFocusEffect(focusSympatheticProc, spell_id);
|
||||||
SpellFinished(focus_trigger, target, EQ::spells::CastingSlot::Item, 0, -1, spells[focus_trigger].resist_difficulty);
|
|
||||||
|
if (!IsValidSpell(focus_spell)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint16 focus_trigger = GetSympatheticSpellProcID(focus_spell);
|
||||||
|
|
||||||
|
if (!IsValidSpell(focus_trigger)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsBeneficialSpell(spell_id)) {
|
||||||
|
// For beneficial spells, if the triggered spell is also beneficial then proc it on the target
|
||||||
|
// if the triggered spell is detrimental, then it will trigger on the caster(ie cursed items)
|
||||||
|
if (IsBeneficialSpell(focus_trigger)) {
|
||||||
|
SpellFinished(focus_trigger, target);
|
||||||
|
} else {
|
||||||
|
SpellFinished(
|
||||||
|
focus_trigger,
|
||||||
|
this,
|
||||||
|
EQ::spells::CastingSlot::Item,
|
||||||
|
0,
|
||||||
|
-1,
|
||||||
|
spells[focus_trigger].resist_difficulty
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// For detrimental spells, if the triggered spell is beneficial, then it will land on the caster
|
||||||
|
// if the triggered spell is also detrimental, then it will land on the target
|
||||||
|
if (IsBeneficialSpell(focus_trigger)) {
|
||||||
|
SpellFinished(focus_trigger, this);
|
||||||
|
} else {
|
||||||
|
SpellFinished(
|
||||||
|
focus_trigger,
|
||||||
|
target,
|
||||||
|
EQ::spells::CastingSlot::Item,
|
||||||
|
0,
|
||||||
|
-1,
|
||||||
|
spells[focus_trigger].resist_difficulty
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckNumHitsRemaining(NumHit::MatchingSpells, -1, focus_spell);
|
CheckNumHitsRemaining(NumHit::MatchingSpells, -1, focus_spell);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user