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
50
zone/mob.cpp
50
zone/mob.cpp
@ -6044,40 +6044,54 @@ bool Mob::TryFadeEffect(int slot)
|
||||
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;
|
||||
}
|
||||
|
||||
uint16 focus_spell = GetSympatheticFocusEffect(focusSympatheticProc,spell_id);
|
||||
const uint16 focus_spell = GetSympatheticFocusEffect(focusSympatheticProc, spell_id);
|
||||
|
||||
if(!IsValidSpell(focus_spell))
|
||||
if (!IsValidSpell(focus_spell)) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint16 focus_trigger = GetSympatheticSpellProcID(focus_spell);
|
||||
const uint16 focus_trigger = GetSympatheticSpellProcID(focus_spell);
|
||||
|
||||
if(!IsValidSpell(focus_trigger))
|
||||
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(spell_id))
|
||||
{
|
||||
if(IsBeneficialSpell(focus_trigger))
|
||||
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 {
|
||||
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
|
||||
else
|
||||
{
|
||||
if(IsBeneficialSpell(focus_trigger))
|
||||
if (IsBeneficialSpell(focus_trigger)) {
|
||||
SpellFinished(focus_trigger, this);
|
||||
|
||||
else
|
||||
SpellFinished(focus_trigger, target, EQ::spells::CastingSlot::Item, 0, -1, spells[focus_trigger].resist_difficulty);
|
||||
} else {
|
||||
SpellFinished(
|
||||
focus_trigger,
|
||||
target,
|
||||
EQ::spells::CastingSlot::Item,
|
||||
0,
|
||||
-1,
|
||||
spells[focus_trigger].resist_difficulty
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
CheckNumHitsRemaining(NumHit::MatchingSpells, -1, focus_spell);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user