public virtual bool OnRecvClientBattleRetire(Coop_Model_ClientBattleRetire model) { isBattleRetire = true; if (isPartyOwner) { MonoBehaviourSingleton <CoopManager> .I.coopRoom.ownerRetire = true; } if (QuestManager.IsValidInGame() && MonoBehaviourSingleton <UIDeadAnnounce> .IsValid()) { MonoBehaviourSingleton <UIDeadAnnounce> .I.Announce(UIDeadAnnounce.ANNOUNCE_TYPE.RETIRE, GetPlayer()); } if (!isStageHost) { CoopStageObjectUtility.TransfarOwnerForClientObjects(clientId, MonoBehaviourSingleton <CoopManager> .I.coopStage.hostClientId); } if (QuestManager.IsValidInGameExplore()) { MonoBehaviourSingleton <QuestManager> .I.RemoveExplorePlayerStatus(this); } if (MonoBehaviourSingleton <CoopManager> .I.coopRoom.NeedsForceLeave()) { MonoBehaviourSingleton <CoopNetworkManager> .I.Close(1000, "Bye!", null); } return(true); }
public void SendClientBattleRetire() { Coop_Model_ClientBattleRetire coop_Model_ClientBattleRetire = new Coop_Model_ClientBattleRetire(); coop_Model_ClientBattleRetire.id = 1003; Send(coop_Model_ClientBattleRetire, true, 0, null, null); }
protected override bool HandleCoopEvent(CoopPacket packet) { bool result = false; switch (packet.packetType) { case PACKET_TYPE.CLIENT_STATUS: { Coop_Model_ClientStatus model5 = packet.GetModel <Coop_Model_ClientStatus>(); result = coopClient.OnRecvClientStatus(model5, packet); break; } case PACKET_TYPE.CLIENT_LOADING_PROGRESS: { Coop_Model_ClientLoadingProgress model4 = packet.GetModel <Coop_Model_ClientLoadingProgress>(); result = coopClient.OnRecvClientLoadingProgress(model4); break; } case PACKET_TYPE.CLIENT_CHANGE_EQUIP: { Coop_Model_ClientChangeEquip model3 = packet.GetModel <Coop_Model_ClientChangeEquip>(); result = coopClient.OnRecvClientChangeEquip(model3); break; } case PACKET_TYPE.CLIENT_BATTLE_RETIRE: { Coop_Model_ClientBattleRetire model2 = packet.GetModel <Coop_Model_ClientBattleRetire>(); result = coopClient.OnRecvClientBattleRetire(model2); break; } case PACKET_TYPE.CLIENT_SERIES_PROGRESS: { Coop_Model_ClientSeriesProgress model = packet.GetModel <Coop_Model_ClientSeriesProgress>(); result = coopClient.OnRecvClientSeriesProgress(model); break; } } return(result); }