diff --git a/zone/spells.cpp b/zone/spells.cpp index 05755f929..e8e3e2757 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -821,14 +821,12 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp } if (!spell_target) { - if (IsGroupSpell(spell_id)){ + if (IsGroupSpell(spell_id)) { return true; - } - else if (spells[spell_id].target_type == ST_Self) { + } else if (spells[spell_id].target_type == ST_Self) { spell_target = this; } - } - else { + } else { if (IsGroupSpell(spell_id) && spell_target != this) { ignore_on_casting = true; } @@ -942,7 +940,13 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp /* Requires target to be in same group or same raid in order to apply invisible. */ - if (check_on_casting && RuleB(Spells, InvisRequiresGroup) && IsInvisibleSpell(spell_id)) { + if ( + check_on_casting && + spells[spell_id].target_type != ST_Self && + GetTarget() != this && + RuleB(Spells, InvisRequiresGroup) && + IsInvisibleSpell(spell_id) + ) { if (IsClient() && spell_target && spell_target->IsClient()) { if (spell_target && spell_target->GetID() != GetID()) { bool cast_failed = true; @@ -954,8 +958,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp (target_group->GetID() == my_group->GetID())) { cast_failed = false; } - } - else if (spell_target->IsRaidGrouped()) { + } else if (spell_target->IsRaidGrouped()) { Raid *target_raid = spell_target->GetRaid(); Raid *my_raid = GetRaid(); if (target_raid &&