From 0418dc4aa397f7babe55e547dc2628e694c98158 Mon Sep 17 00:00:00 2001 From: Fryguy Date: Mon, 8 Jan 2024 23:32:18 -0500 Subject: [PATCH] [Bug Fix] Attack Corpse Skill Up Fix (#3924) * [Bug] Attack Corpse Skillup Fix Occasions where a corpse will allow skillups from attacks being turned on (even if no damage) * requested changes --- zone/attack.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index e12f449e9..f8344e496 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1463,9 +1463,9 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts, boo //SYNC WITH: tune.cpp, mob.h TuneClientAttack bool Mob::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts) { - if (!other) { + if (!other || (other && other->IsCorpse())) { SetTarget(nullptr); - LogError("A null Mob object was passed for evaluation!"); + LogError("A null or invalid Mob object was passed for evaluation!"); return false; } @@ -6322,8 +6322,9 @@ void NPC::SetAttackTimer() void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell) { - if (!target) + if (!target || (target && target->IsCorpse())) { return; + } Attack(target, hand, false, false, IsFromSpell);