public void ButtonClick_CompleteCombinationBatch(IUIObject obj)
        {
            SolCombinationInfo_Data solCombinationInfo_Data = (SolCombinationInfo_Data)obj.Data;

            if (solCombinationInfo_Data == null)
            {
                Debug.LogError("ERROR, BatchButtonMaker.cs, ButtonClick_CompleteCombinationBatch(), combinationData is Null");
                return;
            }
            int combinationSolCount = solCombinationInfo_Data.GetCombinationSolCount();
            int maxBatchCount       = SoldierBatch_AutoBatchTool.GetMaxBatchCount();

            if (maxBatchCount < combinationSolCount)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("416"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("287");

            string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("288");

            msgBoxUI.SetMsg(new YesDelegate(this.YesClick_CompleteCombination), solCombinationInfo_Data, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2);
        }
    public static void AutoBatch()
    {
        clTempBattlePos[] autoBatchPos = SoldierBatch_SolList.GetAutoBatchPos(SoldierBatch_AutoBatchTool.GetMaxBatchCount(), SoldierBatch.SOLDIER_BATCH_MODE, null);
        if (autoBatchPos == null)
        {
            return;
        }
        Queue <long> queue = new Queue <long>();

        for (int i = 0; i < autoBatchPos.Length; i++)
        {
            queue.Enqueue(autoBatchPos[i].m_nSolID);
        }
        SoldierBatch_AutoBatchTool.BatchSoldiers(queue);
    }
        public void YesClick_CompleteCombination(object obj)
        {
            SolCombinationInfo_Data solCombinationInfo_Data = (SolCombinationInfo_Data)obj;

            if (solCombinationInfo_Data == null)
            {
                return;
            }
            Queue <long>  queue = new Queue <long>();
            List <string> solCombinationCharCodeList = solCombinationInfo_Data.GetSolCombinationCharCodeList();

            foreach (string current in solCombinationCharCodeList)
            {
                int charKindByCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(current);

                long num = 0L;
                if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MINE_MAKEUP)
                {
                    num = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetBestPowerSoldierID_InMineBattlePossibleSol(charKindByCode);
                }
                else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_NEWEXPLORATION)
                {
                    List <NkSoldierInfo> solList = SoldierBatch_SolList.GetSolList(eSOLDIER_BATCH_MODE.MODE_NEWEXPLORATION);
                    if (solList != null)
                    {
                        foreach (NkSoldierInfo current2 in solList)
                        {
                            if (current2.GetCharKind() == charKindByCode)
                            {
                                num = current2.GetSolID();
                                break;
                            }
                        }
                    }
                }
                else
                {
                    num = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetBestPowerSoldierID_InBattleReadyAndReadySol(charKindByCode);
                }
                if (num != 0L)
                {
                    queue.Enqueue(num);
                }
            }
            SoldierBatch_AutoBatchTool.BatchSoldiers(queue);
        }
 public void OnClickAutoBatch(IUIObject obj)
 {
     SoldierBatch_AutoBatchTool.AutoBatch();
 }
 public static void BatchSoldiers(Queue <long> soldierIDQueue)
 {
     SoldierBatch_AutoBatchTool.ResetGridPosition();
     NmMainFrameWork.GetMainFrameWork().StartCoroutine(SoldierBatch_AutoBatchTool.SyncBatchSolCombinationInEmptyGrid(soldierIDQueue));
 }
Beispiel #6
0
 private void OnClickAutoBatch(IUIObject Obj)
 {
     SoldierBatch_AutoBatchTool.AutoBatch();
 }