aboutsummaryrefslogtreecommitdiff
path: root/src/crcombat.cc
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-09-04 01:40:34 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-09-04 01:40:34 -0300
commit13819597ef078096086f03e6faf93f161949799f (patch)
tree6c4411a3412c53c0d5baf40f687abeeddacd41cd /src/crcombat.cc
parent81aa93cce828eee17fcbd0720f93c5fb2d08a325 (diff)
downloadgame-13819597ef078096086f03e6faf93f161949799f.tar.gz
game-13819597ef078096086f03e6faf93f161949799f.zip
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.
Diffstat (limited to 'src/crcombat.cc')
-rw-r--r--src/crcombat.cc2
1 files changed, 1 insertions, 1 deletions
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;
}