/// <summary> /// 파견보냈던 데이터 그대로 재파견. /// </summary> /// <param name="state"></param> private void ReDispatchStart() { // 파견보냈던 데이터의 크리쳐 정보를 지운다. _vDispatch DispatchInfo = UserInfo.Instance.DispatchInfoAck.vDispatch; for (int i = 0; i < DispatchInfo.Count; ++i) { CDispatch dispatch = DispatchInfo[i]; if (dispatch == null) { continue; } if (m_DispatchRewardInfo.kTeamIndex == dispatch.kTeamIndex) { dispatch.vCreatureKey.Clear(); break; } } for (int i = 0; i < m_DispatchCardList.Count; ++i) { DispatchCardItem cardItem = m_DispatchCardList[i]; if (cardItem == null) { continue; } if (cardItem.DispatchRecvData.kTeamIndex == m_DispatchRewardInfo.kTeamIndex) { cardItem.Init(m_DispatchRewardInfo); // 데이터 변경. OpenDispatchTeamWindow(m_DispatchRewardInfo, cardItem.DispatchTableData); m_DispatchTeamWindow.ReSetDispatchTeam(); //OnClickDispatchCard(cardItem); break; } } //_stDispatchStartReq stDispatchStartReq = new _stDispatchStartReq(); //stDispatchStartReq.kTeamIndex = m_DispatchRewardInfo.kTeamIndex; //stDispatchStartReq.kMissionCategory = m_DispatchRewardInfo.kMissionCategory; //stDispatchStartReq.kDispatchSubID = m_DispatchRewardInfo.kDispatchSubID; //stDispatchStartReq.vUseCreatureKey = new _vCreatureKey(); //for (int i = 0; i < m_DispatchRewardInfo.vCreatureKey.Count - 1; ++i) //{ // stDispatchStartReq.vUseCreatureKey.Add(m_DispatchRewardInfo.vCreatureKey[i]); //} //// 다시 보내는 데이터에는 친구 x //stDispatchStartReq.kUseFriendCharKey = 0; //CNetManager.Instance.DispatchProxy.DispatchStart(stDispatchStartReq); //UIControlManager.instance.ShowLoading(true); }
//=================================================================================== // // Method // //=================================================================================== private void OnClickDispatchCard(DispatchCardItem card) { if (m_DispatchMissionWindow == null) { m_DispatchMissionWindow = UIResourceMgr.CreatePrefab <DispatchMissionWindow>(BUNDLELIST.PREFABS_UI_DISPATCH, transform, "DispatchMissionWindow"); m_DispatchMissionWindow.Init(this); UIControlManager.instance.AddWindow(enUIType.DISPATCHMISSIONWINDOW, m_DispatchMissionWindow); } m_DispatchMissionWindow.SetData(card.DispatchRecvData); m_DispatchMissionWindow.OpenUI(); }
private void OnClickFirstItem_Tutorial(GameObject go) { for (int i = 0; i < m_DispatchCardList.Count; ++i) { DispatchCardItem cardItem = m_DispatchCardList[i]; if (cardItem == null) { continue; } if (0 == cardItem.DispatchRecvData.kTeamIndex) { cardItem.OnCliclTutorial(cardItem.gameObject); } } }
/// <summary> /// Rmi_DispatchCancel(_stDispatchCancelAck stAck) 패킷 받음. /// Rmi_DispatchFast(_stDispatchFastAck stAck) 패킷 받음. /// </summary> /// <param name="stAck"></param> public bool SetDispatchCardEmpty(byte kTeamIndex) { for (int i = 0; i < m_DispatchCardList.Count; ++i) { DispatchCardItem cardItem = m_DispatchCardList[i]; if (cardItem == null) { continue; } if (kTeamIndex == cardItem.DispatchRecvData.kTeamIndex) { cardItem.SetCard(OnClickDispatchCard); return(true); } } return(false); }
//=================================================================================== // // Default Method // //=================================================================================== public override void Init() { m_TitleLabel.text = StringTableManager.GetData(6722); // 6722 파견 m_TitleContentLabel.text = StringTableManager.GetData(6723); // 6723 임무 카드 // 서버에 값이 있는 만큼만 생성하고 없으면 empty 슬롯으로 초기화. _stDispatchInfoAck stDispatchInfoAck = UserInfo.Instance.DispatchInfoAck; if (stDispatchInfoAck == null) { #if DEBUG_LOG Debug.LogError("서버에서 파견정보 안줌!! - UserInfo.Instance.DispatchInfoAck is NULL"); #endif return; // error; } _vDispatch vDispatch = stDispatchInfoAck.vDispatch; if (vDispatch == null) { #if DEBUG_LOG Debug.LogError("서버에서 파견정보 안줌!! - stDispatchInfoAck.vDispatch is NULL"); #endif return; // error; } DestroyDispatchCard(); int iPanelDepth = m_DispatchCardScrollView.panel.depth; vDispatch.Sort((a, b) => a.kTeamIndex.CompareTo(b.kTeamIndex)); for (int i = 0; i < vDispatch.Count; ++i) { CDispatch Dispatch = vDispatch[i]; if (Dispatch == null) { #if DEBUG_LOG Debug.LogError(string.Format("서버에서 파견정보 안줌!! - stDispatchInfoAck.vDispatch Number : {0} is NULL", i)); #endif continue; } DispatchCardItem cardItem = UIResourceMgr.CreatePrefab <DispatchCardItem>(BUNDLELIST.PREFABS_UI_DISPATCH, m_DispatchCardGrid.transform, "DispatchCardItem"); cardItem.Init(Dispatch); if (Dispatch.kDispatchState == _enDispatchState.eDispatchState_None) // 빈 카드 생성. { cardItem.SetCard(OnClickDispatchCard); } else // 진행중, 성공, 대성공 카드 생성. { cardItem.SetCard(iPanelDepth); } m_DispatchCardList.Add(cardItem); } ResetPosition(); #if TUTORIAL SetTutorialButtonEvent(); #endif }