Skip to content

Commit

Permalink
[Bug Fix] Attack Corpse Skill Up Fix (#3924)
Browse files Browse the repository at this point in the history
* [Bug] Attack Corpse Skillup Fix

Occasions where a corpse will allow skillups from attacks being turned on (even if no damage)

* requested changes
  • Loading branch information
fryguy503 committed Jan 9, 2024
1 parent f12c87a commit 0418dc4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zone/attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 0418dc4

Please sign in to comment.