/// <inheritdoc /> public override Task HandleMessage(IPeerMessageContext <PSOBBGamePacketPayloadClient> context, BlockOtherPlayerLeaveGameEventPayload payload) { if (Logger.IsInfoEnabled) { Logger.Warn($"Recieved Player GameLeave From EntityId: {payload.Identifier}."); } //We should just broadcast that a player left the lobby. OnRemotePlayerLeftLobby?.Invoke(this, new RemotePlayerLeaveLobbyEventArgs(EntityGuid.ComputeEntityGuid(EntityType.Player, payload.Identifier))); return(Task.CompletedTask); }
/// <inheritdoc /> public override Task HandleMessage(IPeerMessageContext <PSOBBGamePacketPayloadClient> context, BlockOtherPlayerLeaveLobbyEventPayload payload) { if (Logger.IsInfoEnabled) { Logger.Info($"Player with Id: {payload.ClientId} left Lobby. CurrentLeader: {payload.LeaderId}"); } //TODO: So, we don't really want to do this INPLACE. But we're kinda forced to remove players INPLACE. Because of Sega's index/id design //we can't queue it up to be handled at another time becuase a new player WITH THAT ID, might join. So dumb but can't be avoided. OnRemotePlayerLeftLobby?.Invoke(this, new RemotePlayerLeaveLobbyEventArgs(EntityGuid.ComputeEntityGuid(EntityType.Player, payload.ClientId))); return(Task.CompletedTask); }