public void OnRecvChatStamp(int fromClientId, Coop_Model_RoomChatStamp model) { CoopClient coopClient = clients.FindByClientId(fromClientId); if (!(coopClient == null)) { Player player = coopClient.GetPlayer(); if (Object.op_Implicit(player)) { player.ChatSayStamp(model.stampId); } else if (QuestManager.IsValidInGameExplore()) { ExplorePlayerStatus explorePlayerStatus = MonoBehaviourSingleton <QuestManager> .I.GetExplorePlayerStatus(model.userId); if (MonoBehaviourSingleton <UIInGameMessageBar> .IsValid() && MonoBehaviourSingleton <UIInGameMessageBar> .I.get_isActiveAndEnabled() && explorePlayerStatus != null) { MonoBehaviourSingleton <UIInGameMessageBar> .I.Announce(explorePlayerStatus.userName, model.stampId); } } if (chatConnection != null) { if (Object.op_Implicit(player)) { chatConnection.OnReceiveStamp(coopClient.userId, player.charaName, model.stampId); } else if (coopClient != null) { chatConnection.OnReceiveStamp(coopClient.userId, coopClient.GetPlayerName(), model.stampId); } } } }
public void UpdatePlayerStatus(CoopClient coopClient) { ExplorePlayerStatus playerStatus = GetPlayerStatus(coopClient); Player player = coopClient.GetPlayer(); if (playerStatus != null && Object.op_Implicit(player)) { playerStatus.SyncFromPlayer(player); } }
public Player FindPlayer(Predicate <Player> predicate) { int i = 0; for (int num = clientList.Length; i < num; i++) { CoopClient coopClient = clientList[i]; if (!(coopClient == null)) { Player player = coopClient.GetPlayer(); if (player != null && predicate(player)) { return(player); } } } return(null); }