From 0ee5413941269cd2871400297c6f82ce9ff5a377 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Thu, 25 Jan 2024 22:15:40 +0800 Subject: [PATCH] [server] Implement `CPlayerPool::ResetPlayerScoresAndMoney` --- server/playerpool.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/playerpool.h b/server/playerpool.h index 2d9bf19..71c6602 100644 --- a/server/playerpool.h +++ b/server/playerpool.h @@ -35,6 +35,11 @@ public: BOOL Delete(PLAYERID playerId, BYTE byteReason); + void ResetPlayerScoresAndMoney() { + memset(&m_iPlayerScore[0],0,sizeof(int) * MAX_PLAYERS); + memset(&m_iPlayerMoney[0],0,sizeof(int) * MAX_PLAYERS); + memset(&m_iVirtualWorld[0],0,sizeof(int) * MAX_PLAYERS); + } }; #endif