[server] Implement/match CGangZonePool::ShowForAll(...)

This commit is contained in:
RD42 2024-09-21 22:22:45 +08:00
parent 3dbbbb89b3
commit 7c2b514eb2
2 changed files with 14 additions and 0 deletions

View File

@ -51,3 +51,16 @@ void CGangZonePool::ShowForPlayer(PLAYERID playerId, WORD wZone, DWORD dwColor)
pNetGame->SendToPlayer(RPC_ScrAddGangZone, &bsParams, playerId, 2);
}
void CGangZonePool::ShowForAll(WORD wZone, DWORD dwColor)
{
RakNet::BitStream bsParams;
bsParams.Write(wZone);
bsParams.Write(m_fGangZone[wZone][0]);
bsParams.Write(m_fGangZone[wZone][1]);
bsParams.Write(m_fGangZone[wZone][2]);
bsParams.Write(m_fGangZone[wZone][3]);
dwColor = RGBA_ABGR(dwColor);
bsParams.Write(dwColor);
pNetGame->BroadcastData(RPC_ScrAddGangZone, &bsParams, INVALID_PLAYER_ID, 2);
}

View File

@ -15,6 +15,7 @@ public:
WORD New(float fMinX, float fMinY, float fMaxX, float fMaxY);
void Delete(WORD wZone);
void ShowForPlayer(PLAYERID playerId, WORD wZone, DWORD dwColor);
void ShowForAll(WORD wZone, DWORD dwColor);
};
//----------------------------------------------------