diff --git a/zone/attack.cpp b/zone/attack.cpp index a15e74416..1d9f4a2f5 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3930,6 +3930,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_DAMAGE_GIVEN) ) || ( + attacker && attacker->IsNPC() && parse->HasQuestSub(attacker->CastToNPC()->GetNPCTypeID(), EVENT_DAMAGE_GIVEN) ) @@ -3941,6 +3942,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_DAMAGE_TAKEN) ) || ( + attacker && attacker->IsNPC() && parse->HasQuestSub(attacker->CastToNPC()->GetNPCTypeID(), EVENT_DAMAGE_TAKEN) ) @@ -4070,7 +4072,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons bool is_immune_to_frontal_stun = false; - if (IsBot() || IsClient() || IsMerc()) { + if (IsOfClientBotMerc()) { if ( IsPlayerClass(GetClass()) && RuleI(Combat, FrontalStunImmunityClasses) & GetPlayerClassBit(GetClass()) @@ -4206,10 +4208,11 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons (IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) { a->force = EQ::skills::GetSkillMeleePushForce(skill_used); if (IsNPC()) { - if (attacker->IsNPC()) + if (attacker && attacker->IsNPC()) { a->force = 0.0f; // 2013 change that disabled NPC vs NPC push - else + } else { a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC + } if (ForcedMovement == 0 && a->force != 0.0f && position_update_melee_push_timer.Check()) { m_Delta.x += a->force * g_Math.FastSin(a->hit_heading); m_Delta.y += a->force * g_Math.FastCos(a->hit_heading);