Example #1
0
        private void SettingDirectionCharPortrait()
        {
            if (this._directionEffect == null)
            {
                Debug.LogError("ERROR, DirectionEffectSetter.cs, SettingDirectionCharPortrait(), CheckEffectAni is Null");
                return;
            }
            SolCombinationInfo_Data solCombinationDataByUniqeKey = NrTSingleton <NrSolCombinationSkillInfoManager> .Instance.GetSolCombinationDataByUniqeKey(this._solCombinationUniqeKey);

            if (solCombinationDataByUniqeKey == null || solCombinationDataByUniqeKey.m_szCombinationIsCharCode == null)
            {
                return;
            }
            int solCombinationCharCount = this.GetSolCombinationCharCount(solCombinationDataByUniqeKey.m_szCombinationIsCharCode);

            for (int i = 0; i < solCombinationCharCount; i++)
            {
                Transform child = NkUtil.GetChild(this._directionEffect.transform, "fx_hero_0" + (i + 1).ToString());
                if (!(child == null))
                {
                    child.gameObject.SetActive(true);
                    TsMeshCharPortraitSetter tsMeshCharPortraitSetter = child.gameObject.AddComponent <TsMeshCharPortraitSetter>();
                    tsMeshCharPortraitSetter.SetTexture(solCombinationDataByUniqeKey.m_szCombinationIsCharCode[i]);
                }
            }
        }
        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);
        }
Example #3
0
    public bool IsCompleteCombination(List <int> charKindList, SolCombinationInfo_Data combinationData)
    {
        if (charKindList == null)
        {
            return(false);
        }
        string[] szCombinationIsCharCode = combinationData.m_szCombinationIsCharCode;
        if (szCombinationIsCharCode == null)
        {
            Debug.LogError("ERROR, SolCombination_DLG.cs, CompleteCombinationCheck(), combinationCharCodeList is Null");
            return(false);
        }
        string[] array = szCombinationIsCharCode;
        for (int i = 0; i < array.Length; i++)
        {
            string text = array[i];
            if (!string.IsNullOrEmpty(text) && !(text == "0"))
            {
                int charKindByCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(text);

                if (!charKindList.Contains(charKindByCode))
                {
                    return(false);
                }
            }
        }
        return(true);
    }
Example #4
0
    public void SetData(int dataIdx, TsDataReader.Row dataRow)
    {
        SolCombinationInfo_Data solCombinationInfo_Data = new SolCombinationInfo_Data();

        solCombinationInfo_Data.SetData(dataRow);
        this._battleSolCombinationData.Add((long)dataIdx, solCombinationInfo_Data);
    }
Example #5
0
    private void ChangeCobinationInfo(IUIObject obj, int index)
    {
        if (index >= this._combinationInfo.Count)
        {
            return;
        }
        SolCombinationInfo_Data solCombinationInfo_Data = this._combinationInfo[index];

        if (solCombinationInfo_Data != null)
        {
            NewListItem item = this._solCombinationRowItemMaker.CreateSolCombinationItem(this.m_nlbCombinationList, this._gradeTextureKeyDic, this._charOwnSoldierKindList, solCombinationInfo_Data);
            this.m_nlbCombinationList.UpdateContents(index, item);
        }
    }
        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);
        }
Example #7
0
        private string GetEffecType()
        {
            SolCombinationInfo_Data solCombinationDataByUniqeKey = NrTSingleton <NrSolCombinationSkillInfoManager> .Instance.GetSolCombinationDataByUniqeKey(this._solCombinationUniqeKey);

            if (solCombinationDataByUniqeKey == null)
            {
                return(string.Empty);
            }
            if (solCombinationDataByUniqeKey.m_szCombinationIsCharCode == null)
            {
                return(string.Empty);
            }
            int solCombinationCharCount = this.GetSolCombinationCharCount(solCombinationDataByUniqeKey.m_szCombinationIsCharCode);

            if (solCombinationCharCount == 3)
            {
                return("FX_SOL_COMBINATION3");
            }
            if (solCombinationCharCount == 4)
            {
                return("FX_SOL_COMBINATION4");
            }
            return("FX_SOL_COMBINATION");
        }
 private bool IsButtonVisible(ref List <int> charOwnSoldierKindList, ref SolCombinationInfo_Data combinationData)
 {
     return(Scene.CurScene == Scene.Type.SOLDIER_BATCH && NrTSingleton <NrSolCombinationSkillInfoManager> .Instance.IsCompleteCombination(charOwnSoldierKindList, combinationData) && (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_BABEL_TOWER || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MYTHRAID || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_GUILDBOSS_MAKEUP || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MINE_MAKEUP || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_EXPEDITION_MAKEUP || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_NEWEXPLORATION || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON));
 }
        private void MakeCombinationSolPortrait(List <int> charOwnSoldierKindList, NewListItem item, SolCombinationInfo_Data combinationInfoData)
        {
            int num = 3;

            for (int i = 0; i < 5; i++)
            {
                int            num2  = i * num + 1;
                int            index = num2 + 1;
                NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(combinationInfoData.m_szCombinationIsCharCode[i]);

                if (charKindInfoFromCode == null)
                {
                    item.SetListItemData(index, false);
                    item.SetListItemData(num2, false);
                }
                else
                {
                    bool flag = charOwnSoldierKindList != null && charOwnSoldierKindList.Contains(charKindInfoFromCode.GetCharKind());
                    item.SetListItemData(index, !flag);
                    item.SetListItemData(num2, this.GetSolInfoByKind(charKindInfoFromCode), charKindInfoFromCode, new EZValueChangedDelegate(this.OnSelectSolPortrait), null);
                }
            }
        }
        public NewListItem CreateSolCombinationItem(NewListBox combinationRowBoxList, Dictionary <int, string> gradeTextureKeyDic, List <int> charOwnSoldierKindList, SolCombinationInfo_Data combinationData)
        {
            NewListItem newListItem = new NewListItem(combinationRowBoxList.ColumnNum, true, string.Empty);

            this.MakeCombinationSolPortrait(charOwnSoldierKindList, newListItem, combinationData);
            if (gradeTextureKeyDic.ContainsKey(combinationData.m_nCombinationGrade))
            {
                newListItem.SetListItemData(16, gradeTextureKeyDic[combinationData.m_nCombinationGrade], null, null, null);
            }
            newListItem.SetListItemData(17, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(combinationData.m_textTitleKey), null, null, null);
            newListItem.SetListItemData(18, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(combinationData.m_textDetailKey), null, null, null);
            newListItem.SetListItemData(19, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2706"), combinationData, new EZValueChangedDelegate(this.ButtonClick_CompleteCombinationBatch), null);
            newListItem.SetListItemData(19, this.IsButtonVisible(ref charOwnSoldierKindList, ref combinationData));
            return(newListItem);
        }
Example #11
0
 private bool IsShow(SolCombinationInfo_Data combinationData)
 {
     return(combinationData != null && 0 < combinationData.m_nCombinationIsShow);
 }
Example #12
0
 private bool IsCompleteCombinationByChecked(SolCombinationInfo_Data combinationData)
 {
     return(!this._isCompleteCombinationClicked || NrTSingleton <NrSolCombinationSkillInfoManager> .Instance.IsCompleteCombination(this._charOwnSoldierKindList, combinationData));
 }
Example #13
0
 private bool IsSelectedViewGradeByChecked(SolCombinationInfo_Data combinationData)
 {
     return(this._selectedViewGradeKey == this.ENTIRE_VIEW || this._selectedViewGradeKey == combinationData.m_nCombinationGrade);
 }