From cbc0c870bef973b8b024ac9880bd88a7c02de847 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 21 Sep 2024 22:24:16 +0800 Subject: [PATCH] [server] Implement/match `CGangZonePool::FlashForAll(...)` --- server/gangzonepool.cpp | 9 +++++++++ server/gangzonepool.h | 1 + 2 files changed, 10 insertions(+) diff --git a/server/gangzonepool.cpp b/server/gangzonepool.cpp index 18d953b..b4903a6 100644 --- a/server/gangzonepool.cpp +++ b/server/gangzonepool.cpp @@ -87,3 +87,12 @@ void CGangZonePool::FlashForPlayer(PLAYERID playerId, WORD wZone, DWORD dwColor) pNetGame->SendToPlayer(RPC_ScrFlashGangZone, &bsParams, playerId, 2); } +void CGangZonePool::FlashForAll(WORD wZone, DWORD dwColor) +{ + RakNet::BitStream bsParams; + bsParams.Write(wZone); + dwColor = RGBA_ABGR(dwColor); + bsParams.Write(dwColor); + pNetGame->BroadcastData(RPC_ScrFlashGangZone, &bsParams, INVALID_PLAYER_ID, 2); +} + diff --git a/server/gangzonepool.h b/server/gangzonepool.h index 89a83ec..fb831a6 100644 --- a/server/gangzonepool.h +++ b/server/gangzonepool.h @@ -19,6 +19,7 @@ public: void HideForPlayer(PLAYERID playerId, WORD wZone); void HideForAll(WORD wZone); void FlashForPlayer(PLAYERID playerId, WORD wZone, DWORD dwColor); + void FlashForAll(WORD wZone, DWORD dwColor); }; //----------------------------------------------------