Display area announcement to invoking player as well

Also clarified that shard- and world-level announcements will not be
implemented as they are not applicable to our single-shard server.
This commit is contained in:
dongresource 2020-12-01 23:32:45 +01:00
parent 840cba6a9e
commit fed3eca378

View File

@ -880,12 +880,12 @@ void ChatManager::announcementHandler(CNSocket* sock, CNPacketData* data) {
switch (announcement->iAreaType) {
case 0: // area (all players in viewable chunks)
sock->sendPacket((void*)&msg, P_FE2CL_GM_REP_PC_ANNOUNCE, sizeof(sP_FE2CL_GM_REP_PC_ANNOUNCE));
PlayerManager::sendToViewable(sock, (void*)&msg, P_FE2CL_GM_REP_PC_ANNOUNCE, sizeof(sP_FE2CL_GM_REP_PC_ANNOUNCE));
break;
case 1: // shard
break; //stubbed for now
case 2: // world
break; // stubbed for now
break; // not applicable to OpenFusion
case 3: // global (all players)
for (it = PlayerManager::players.begin(); it != PlayerManager::players.end(); it++) {
CNSocket* allSock = it->first;