From 13819597ef078096086f03e6faf93f161949799f Mon Sep 17 00:00:00 2001 From: fusion32 Date: Thu, 4 Sep 2025 01:40:34 -0300 Subject: fix small bug with experience distribution Before checking if players are in the same party, we need to check if they're in any party at all. I made a small wrapper `TPlayer::InPartyWith` to help prevent this mistake again. --- src/crcombat.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crcombat.cc') diff --git a/src/crcombat.cc b/src/crcombat.cc index d6cc410..ef4b2f7 100644 --- a/src/crcombat.cc +++ b/src/crcombat.cc @@ -916,7 +916,7 @@ void TCombat::DistributeExperiencePoints(uint32 Exp){ int Amount = (int)((Exp * this->CombatList[i].Damage) / this->CombatDamage); if(Master->Type == PLAYER && Attacker->Type == PLAYER){ - if(((TPlayer*)Master)->GetPartyLeader(true) == ((TPlayer*)Attacker)->GetPartyLeader(true)){ + if(((TPlayer*)Master)->InPartyWith((TPlayer*)Attacker, true)){ continue; } -- cgit v1.2.3