private bool setUpClientsList() { var getPlayerListCall = new GetPlayerList(1000, 0); if (!controller.CallMethod(getPlayerListCall, 5000)) { return(false); } if (getPlayerListCall.HadFault) { return(false); } // Server Account is always first. var serverHost = getPlayerListCall.ReturnValue.First().Value; ServerHost = getClientInfo(serverHost.Login, serverHost.NickName, (uint)serverHost.PlayerId); currentClients.Clear(); currentClients.AddRange(getPlayerListCall.ReturnValue.Skip(1).Select(clientInfo => getClientInfo(clientInfo.Value.Login, clientInfo.Value.NickName, (uint)clientInfo.Value.PlayerId))); return(true); }
public static void RemovePlayer(Player removedPlayer) { GetPlayerList.Remove(removedPlayer); OnRemovePlayer.Invoke(removedPlayer); }