diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-09-04 01:40:34 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-09-04 01:40:34 -0300 |
| commit | 13819597ef078096086f03e6faf93f161949799f (patch) | |
| tree | 6c4411a3412c53c0d5baf40f687abeeddacd41cd /src/operate.cc | |
| parent | 81aa93cce828eee17fcbd0720f93c5fb2d08a325 (diff) | |
| download | game-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/operate.cc')
| -rw-r--r-- | src/operate.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/operate.cc b/src/operate.cc index 92c5633..33cb6ac 100644 --- a/src/operate.cc +++ b/src/operate.cc @@ -4079,10 +4079,9 @@ void JoinParty(uint32 GuestID, uint32 HostID){ } if(Guest->GetPartyLeader(true) != 0){ - bool SameParty = Guest->GetPartyLeader(true) == Host->GetPartyLeader(true); SendMessage(Guest->Connection, TALK_INFO_MESSAGE, "You are already member of %s party.", - (SameParty ? "this" : "a")); + (Guest->InPartyWith(Host, true) ? "this" : "a")); return; } |
