public void SetCoopMode(COOP_MODE_TYPE coop_mode, int client_id) { if ((coop_mode == COOP_MODE_TYPE.NONE || coop_mode == COOP_MODE_TYPE.ORIGINAL) && client_id != 0) { Log.Error(LOG.INGAME, "StageObject::SetCoopMode() Err ( client_id is invalid. )"); } if (coop_mode == COOP_MODE_TYPE.ORIGINAL && !CoopStageObjectUtility.CanControll(this)) { Log.Error(LOG.INGAME, "StageObject::SetCoopMode. field block obj({0}) to {1}", this, coop_mode); } else { if (coopMode != 0) { bool flag = false; if (CoopManager.IsValidInCoop()) { flag = true; } if (!flag) { Log.Error(LOG.INGAME, "StageObject::SetCoopMode() Err ( not coop )"); return; } } coopMode = coop_mode; coopClientId = client_id; } }
public override void OnChangeEnableControll(bool enable) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (enable && !CoopStageObjectUtility.CanControll(player)) { Log.Error(LOG.INGAME, "NpcController:OnChangeEnableControll. field block enable. obj={0}", player); enable = false; } base.OnChangeEnableControll(enable); if (enable) { if (isStart && this.get_enabled() && player != null && mainCoroutine == null) { startWaitTime = parameter.startWaitTime; mainCoroutine = AIMain(); this.StartCoroutine(mainCoroutine); } } else { if (mainCoroutine != null) { this.StopAllCoroutines(); mainCoroutine = null; } if (isGuard) { player.ActIdle(false, -1f); } } }
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 AddController <T>() where T : ControllerBase { //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (controller == null) { if (!CoopStageObjectUtility.CanControll(this)) { Log.Error(LOG.INGAME, "StageObject::AddController. field block obj({0},{1}) to {2}", this, coopMode, typeof(T)); } else { this.get_gameObject().AddComponent <T>(); } } }
public bool OnRecvRoomStageHostChanged(Coop_Model_RoomStageHostChanged model) { int hostClientId = MonoBehaviourSingleton <CoopManager> .I.coopStage.hostClientId; if (model.stgid == MonoBehaviourSingleton <CoopManager> .I.coopStage.stageId) { if (model.stghostid != 0) { CoopStageObjectUtility.TransfarOwnerForClientObjects(hostClientId, model.stghostid); } MonoBehaviourSingleton <CoopManager> .I.coopStage.SetHostClient(model.stghostid); } clients.ForEach(delegate(CoopClient c) { if (c.stageId == model.stgid) { c.SetStageHost(c.clientId == model.stghostid); } }); return(true); }