bind sight pets (#1942)

This commit is contained in:
KayenEQ 2022-01-23 20:27:32 -05:00 committed by GitHub
parent 3c09448e90
commit 936043a53c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3663,10 +3663,11 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, int reflect_effectivenes
return false;
}
if(spelltar->IsClient() && spelltar->CastToClient()->IsHoveringForRespawn())
if (spelltar->IsClient() && spelltar->CastToClient()->IsHoveringForRespawn()) {
return false;
}
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id)) {
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id) && !IsEffectInSpell(spell_id, SE_BindSight)) {
if(!IsClient() || !CastToClient()->GetGM()) {
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
return false;
@ -3935,7 +3936,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, int reflect_effectivenes
}
}
}
else if ( !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id)) // Detrimental spells - PVP check
else if ( !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id) && !IsEffectInSpell(spell_id, SE_BindSight)) // Detrimental spells - PVP check
{
LogSpells("Detrimental spell [{}] can't take hold [{}] -> [{}]", spell_id, GetName(), spelltar->GetName());
spelltar->MessageString(Chat::SpellFailure, YOU_ARE_PROTECTED, GetCleanName());