Пример #1
0
    public void SetSolderinfo()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            if (!soldierInfo.IsValid())
            {
                base.SetShowLayer(i, false);
            }
            else
            {
                this.m_itSolPortrait[i].SetSolImageTexure(eCharImageType.SMALL, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade());
                this.m_pbSolHP[i].Value = (float)soldierInfo.GetHP() / (float)soldierInfo.GetMaxHP();
                this.SetToolTip(i, soldierInfo);
                this.m_pbSolHP[i].Visible = false;
                this.m_pbBG[i].Visible    = false;
            }
        }
    }
Пример #2
0
    private int COMPARE_INITIATIVE_NEW(NkSoldierInfo a, NkSoldierInfo b)
    {
        int index  = this.m_SoldierInfoSortList.FindIndex((NkSoldierInfo value) => value.GetSolID() == a.GetSolID());
        int index2 = this.m_SoldierInfoSortList.FindIndex((NkSoldierInfo value) => value.GetSolID() == b.GetSolID());

        return(this.m_SolInitiativeList[index].CompareTo(this.m_SolInitiativeList[index2]));
    }
Пример #3
0
    private NkSoldierInfo CreateDummySoldier()
    {
        NkSoldierInfo nkSoldierInfo = new NkSoldierInfo();

        if (base.ShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
        {
            nkSoldierInfo.SetCharKind(1053);
            nkSoldierInfo.SetGrade(6);
        }
        else if (base.ShowType == SOLCOMPOSE_TYPE.EXTRACT)
        {
            nkSoldierInfo.SetCharKind(1004);
            nkSoldierInfo.SetGrade(5);
        }
        else if (base.ShowType == SOLCOMPOSE_TYPE.COMPOSE)
        {
            nkSoldierInfo.SetCharKind(1004);
            nkSoldierInfo.SetGrade(4);
        }
        nkSoldierInfo.SetLevel(50);
        nkSoldierInfo.SetSolID(123456L);
        nkSoldierInfo.SetSolSubData(3, 0L);
        nkSoldierInfo.SetExp(nkSoldierInfo.GetCurBaseExp());
        return(nkSoldierInfo);
    }
Пример #4
0
 private void SetNormalCostumeStat(int labelIdx, NkSoldierInfo soldierInfo, CostumeStatSetter.COSTUME_STAT stat)
 {
     if (soldierInfo == null)
     {
         return;
     }
     COSTUME_STAT_LABEL[] statLabels = this._owner._variables._statLabels;
     if (statLabels == null || statLabels.Length <= labelIdx)
     {
         return;
     }
     statLabels[labelIdx]._costumeStatPercent.Visible = false;
     statLabels[labelIdx]._postStatLabel.Visible      = false;
     statLabels[labelIdx]._costumeStatLabel.Visible   = true;
     statLabels[labelIdx]._costumeNormalStat.Visible  = true;
     if (stat == CostumeStatSetter.COSTUME_STAT.ATTACK)
     {
         statLabels[labelIdx]._costumeNormalStat.Text = soldierInfo.GetMinDamage_NotAdjustCostume().ToString() + "~" + soldierInfo.GetMaxDamage_NotAdjustCostume().ToString();
     }
     else if (stat == CostumeStatSetter.COSTUME_STAT.DEFENSE)
     {
         statLabels[labelIdx]._costumeNormalStat.Text = soldierInfo.GetPhysicalDefense_NotAdjustCostume().ToString();
     }
     else if (stat == CostumeStatSetter.COSTUME_STAT.HP)
     {
         statLabels[labelIdx]._costumeNormalStat.Text = soldierInfo.GetMaxHP_NotAdjustCostume().ToString();
     }
 }
Пример #5
0
    public override bool CheckCondition(long i64Param, ref long i64ParamVal)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        int num = 0;

        if (charPersonInfo == null)
        {
            return(false);
        }
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            for (int j = 0; j < 6; j++)
            {
                ITEM equipItem = soldierInfo.GetEquipItem(j);
                if (equipItem != null)
                {
                    if ((long)equipItem.m_nItemUnique == base.GetParam())
                    {
                        num++;
                    }
                }
            }
        }
        return((long)num >= base.GetParamVal());
    }
Пример #6
0
    private void BtClickUpListBox(IUIObject obj)
    {
        NkSoldierInfo nkSoldierInfo = obj.Data as NkSoldierInfo;

        if (nkSoldierInfo == null)
        {
            return;
        }
        long      num       = 0L;
        charSpend charSpend = NrTSingleton <NrBaseTableManager> .Instance.GetCharSpend(nkSoldierInfo.GetLevel().ToString());

        if (charSpend != null)
        {
            num = charSpend.iResurrection_spend;
        }
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("175"),
            "targetname",
            nkSoldierInfo.GetName(),
            "count",
            num.ToString()
        });

        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.OnReviveCharOk), nkSoldierInfo, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("174"), empty, eMsgType.MB_OK_CANCEL, 2);
    }
Пример #7
0
    public void AddReviveCount(long nSolID)
    {
        this.nReviveCount++;
        BATTLE_CONSTANT_Manager instance = BATTLE_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        int num = (int)instance.GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_RESURRECTION_COUNT);

        if (this.nReviveCount >= num)
        {
            if (this.m_nlDeadSolList.Count > 0)
            {
                this.m_nlDeadSolList.Clear();
            }
            return;
        }
        for (int i = 0; i < this.m_nlDeadSolList.Count; i++)
        {
            IUIObject     item          = this.m_nlDeadSolList.GetItem(i);
            NkSoldierInfo nkSoldierInfo = item.Data as NkSoldierInfo;
            if (nkSoldierInfo != null)
            {
                if (nkSoldierInfo.GetSolID() == nSolID)
                {
                    this.m_nlDeadSolList.RemoveItem(i, true);
                    return;
                }
            }
        }
    }
Пример #8
0
    public void SetAwakeningStat(GS_SOLAWAKENING_STAT_ACK ACK)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo != null)
        {
            int statSTR = soldierInfo.GetStatSTR();
            int statDEX = soldierInfo.GetStatDEX();
            int statVIT = soldierInfo.GetStatVIT();
            int statINT = soldierInfo.GetStatINT();
            this.ShowBaseSolStat(this.m_lbCurStat[0], statSTR, this.m_iAwakeningStat[0], this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[1], statDEX, this.m_iAwakeningStat[1], this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[2], statVIT, this.m_iAwakeningStat[2], this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[3], statINT, this.m_iAwakeningStat[3], this.m_strBaseTextColor);
        }
        int i;

        for (i = 0; i < 4; i++)
        {
            this.m_iAwakeningStat[i] = ACK.i32AwakeningStat[i];
            this.m_lbIncStat[i].SetText(string.Empty);
            this.m_fTextAniTime[i] = Time.time + (float)(i + 1) * this.TEXT_AIN_TIME;
        }
        this.m_fTextAniTimeRingSlot = Time.time + (float)(i + 1) * this.TEXT_AIN_TIME;
        this.m_bRingSlotOpen        = ACK.bRingSlotOpen;
        this.ShowSolInfo(true);
    }
Пример #9
0
    public int GetBaseStat(int iStat)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            return(0);
        }
        int result = 0;

        switch (iStat)
        {
        case 0:
            result = soldierInfo.GetStatSTR();
            break;

        case 1:
            result = soldierInfo.GetStatDEX();
            break;

        case 2:
            result = soldierInfo.GetStatVIT();
            break;

        case 3:
            result = soldierInfo.GetStatINT();
            break;
        }
        return(result);
    }
Пример #10
0
    private void ChangeSolInfo(IUIObject obj, int index)
    {
        if (index >= this.mSortList.Count)
        {
            return;
        }
        NkSoldierInfo nkSoldierInfo = this.mSortList[index];

        if (nkSoldierInfo == null)
        {
            return;
        }
        NewListItem newListItem = this.UpdateSolList(nkSoldierInfo);

        if (newListItem == null)
        {
            return;
        }
        this.ComposeNewListBox.UpdateContents(index, newListItem);
        int index2 = index % this.ComposeNewListBox.Count;
        UIListItemContainer item = this.ComposeNewListBox.GetItem(index2);

        if (null != item)
        {
            if (this.IsContainSelect(nkSoldierInfo.GetSolID()))
            {
                item.SetSelected(true);
            }
            else
            {
                item.SetSelected(false);
            }
        }
    }
Пример #11
0
    public bool IsAwakeningReset()
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            Debug.LogError("m_SelectSol is null");
            return(false);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION.n16SubData_0;
        AWAKENING_TRY_INFO awakeningTryInfo = this.GetAwakeningTryInfo((int)n16SubData_, soldierInfo.GetSeason());

        if (awakeningTryInfo == null)
        {
            return(false);
        }
        int num = NkUserInventory.GetInstance().Get_First_ItemCnt(awakeningTryInfo.i32ResetItemUnique);

        if (awakeningTryInfo.i32ResetItemNum > num)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("273"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        return(true);
    }
Пример #12
0
    public static int COMPARE_NAME(NkSoldierInfo a, NkSoldierInfo b)
    {
        string name  = a.GetCharKindInfo().GetName();
        string name2 = b.GetCharKindInfo().GetName();

        return(string.Compare(name, name2));
    }
Пример #13
0
    public void ClickDetailInfo(IUIObject obj)
    {
        UIListItemContainer selectItem = this.m_nlbItemList.GetSelectItem();

        if (null == selectItem)
        {
            return;
        }
        if (selectItem.Data == null)
        {
            return;
        }
        ITEM iTEM = selectItem.data as ITEM;

        if (iTEM != null)
        {
            AuctionMainDlg.ShowItemDetailInfo(iTEM, (G_ID)base.WindowID);
        }
        else
        {
            NkSoldierInfo nkSoldierInfo = selectItem.data as NkSoldierInfo;
            if (nkSoldierInfo != null)
            {
                AuctionMainDlg.ShowSolDetailInfo(nkSoldierInfo, this);
            }
        }
    }
Пример #14
0
    public NkSoldierInfo AddSolInfo(SOLDIER_INFO solInfo, SOLDIER_BATTLESKILL_INFO pkBattleSkill, bool bReadyEquipItem)
    {
        NkSoldierInfo nkSoldierInfo = new NkSoldierInfo();

        nkSoldierInfo.Set(solInfo);
        if (pkBattleSkill != null)
        {
            nkSoldierInfo.SetBattleSkillInfo(pkBattleSkill);
        }
        if (this.IsSameSolExist(solInfo.SolID))
        {
            NkSoldierInfo soldierInfo = this.GetSoldierInfo(solInfo.SolID);
            if (soldierInfo != null)
            {
                NrEquipItemInfo equipItemInfo = nkSoldierInfo.GetEquipItemInfo();
                if (equipItemInfo != null)
                {
                    equipItemInfo.Set(soldierInfo.GetEquipItemInfo());
                }
            }
            this.RemoveSol(nkSoldierInfo.GetSolID());
            bReadyEquipItem = true;
        }
        nkSoldierInfo.SetReceivedEquipItem(bReadyEquipItem);
        nkSoldierInfo.UpdateSoldierStatInfo();
        this.m_SolWarehouseList.Add(nkSoldierInfo);
        return(nkSoldierInfo);
    }
Пример #15
0
    public void ClickbuSolButton(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        int num = (int)obj.Data;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(num);

        if (soldierInfo == null || !soldierInfo.IsValid())
        {
            return;
        }
        SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg;

        if (solMilitaryGroupDlg != null)
        {
            solMilitaryGroupDlg.SetSoldierSelectByBattle(num);
        }
    }
    private bool IsValidChangeBattlePos()
    {
        BATTLE_POS_GRID info = BASE_BATTLE_POS_Manager.GetInstance().GetInfo(0);

        if (info == null)
        {
            return(false);
        }
        BATTLE_POS_GRID bATTLE_POS_GRID = new BATTLE_POS_GRID();

        bATTLE_POS_GRID.Set(info, 0, false);
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo nkSoldierInfo = this.m_kBattlePosSolList[i];
            if (nkSoldierInfo != null && nkSoldierInfo.IsValid())
            {
                if (nkSoldierInfo.GetBattlePos() >= 0)
                {
                    NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nkSoldierInfo.GetCharKind());

                    if (charKindInfo != null)
                    {
                        if (!BASE_BATTLE_POS_Manager.GetInstance().IsEnablePos(charKindInfo, nkSoldierInfo.GetBattlePos(), bATTLE_POS_GRID))
                        {
                            return(false);
                        }
                        bATTLE_POS_GRID.SetBUID((short)nkSoldierInfo.GetSolPosIndex(), (byte)nkSoldierInfo.GetBattlePos(), charKindInfo.GetBattleSizeX(), charKindInfo.GetBattleSizeY());
                    }
                }
            }
        }
        return(true);
    }
Пример #17
0
    public void RightbuSolButton(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        int solindex = (int)obj.Data;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(solindex);

        if (soldierInfo == null || !soldierInfo.IsValid())
        {
            return;
        }
        SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg;

        if (solMilitaryGroupDlg != null)
        {
            solMilitaryGroupDlg.RefreshSolList();
        }
    }
    public void SetClearData()
    {
        this.nSelectedBattelPos           = -1;
        this.BattlePosSolName.Text        = string.Empty;
        this.BattlePosSolWeapon1.Visible  = false;
        this.BattlePosSolWeapon2.Visible  = false;
        this.BattlePosSelectedPos.Visible = false;
        for (int i = 0; i < 6; i++)
        {
            this.m_kBattlePosSolList[i] = new NkSoldierInfo();
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        for (int j = 0; j < 6; j++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(j);
            if (soldierInfo != null && soldierInfo.IsValid())
            {
                this.m_kBattlePosSolList[(int)soldierInfo.GetSolPosIndex()].Set(soldierInfo);
            }
        }
    }
Пример #19
0
    public void OnReviveCharOk(object a_oObject)
    {
        NkSoldierInfo nkSoldierInfo = a_oObject as NkSoldierInfo;

        if (nkSoldierInfo == null)
        {
            return;
        }
        long      num       = 0L;
        charSpend charSpend = NrTSingleton <NrBaseTableManager> .Instance.GetCharSpend(nkSoldierInfo.GetLevel().ToString());

        if (charSpend != null)
        {
            num = charSpend.iResurrection_spend;
        }
        if (num > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        long solID = nkSoldierInfo.GetSolID();
        GS_BATTLE_REVIVE_SOLDIER_REQ gS_BATTLE_REVIVE_SOLDIER_REQ = new GS_BATTLE_REVIVE_SOLDIER_REQ();

        gS_BATTLE_REVIVE_SOLDIER_REQ.nReviveSolID = solID;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BATTLE_REVIVE_SOLDIER_REQ, gS_BATTLE_REVIVE_SOLDIER_REQ);
    }
Пример #20
0
    private int[] GetStat(NkSoldierInfo pSoldierinfo, short nLevel, int nGrade = -1)
    {
        NrCharKindInfo charKindInfo = pSoldierinfo.GetCharKindInfo();

        int[] array    = new int[4];
        int   solgrade = (nGrade != -1) ? nGrade : ((int)pSoldierinfo.GetGrade());

        array[0]  = charKindInfo.GetGradePlusSTR(solgrade);
        array[1]  = charKindInfo.GetGradePlusVIT(solgrade);
        array[2]  = charKindInfo.GetGradePlusDEX(solgrade);
        array[3]  = charKindInfo.GetGradePlusINT(solgrade);
        array[0] += charKindInfo.GetIncSTR(solgrade, (int)nLevel);
        array[1] += charKindInfo.GetIncVIT(solgrade, (int)nLevel);
        array[2] += charKindInfo.GetIncDEX(solgrade, (int)nLevel);
        array[3] += charKindInfo.GetIncINT(solgrade, (int)nLevel);
        TsLog.Log("Grade : {4} Level : {5} ,STR : {0} VIT : {1} DEX: {2} INT:{3}", new object[]
        {
            array[0],
            array[1],
            array[2],
            array[3],
            nGrade,
            nLevel
        });
        return(array);
    }
Пример #21
0
 public void InitCostumeStat(CharCostumeInfo_Data costumeData, NkSoldierInfo soldierInfo)
 {
     this.ClearStatLabels();
     this._owner._variables._charStatBGGradation.Visible = true;
     this.SetNormalCostumeStatInfo(ref costumeData, ref soldierInfo);
     this.SetCostumeStatInfo(ref costumeData, ref soldierInfo);
 }
Пример #22
0
    public void ReFreshItem()
    {
        if (this.m_SetItem == null)
        {
            return;
        }
        ITEM iTEM = new ITEM();

        if (this.m_SetItem.m_nPosType == 10)
        {
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            if (nrCharUser == null)
            {
                return;
            }
            NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(this.m_SolID);
            if (soldierInfoFromSolID != null)
            {
                iTEM = soldierInfoFromSolID.GetEquipItemInfo().GetItem(this.m_SetItem.m_nItemPos);
            }
        }
        else
        {
            iTEM         = NkUserInventory.GetInstance().GetItem(this.m_SetItem.m_nPosType, this.m_SetItem.m_nItemPos);
            this.m_SolID = 0L;
        }
        this.m_SetItem = iTEM;
        this.SetSolID(this.m_SolID);
        this.Set_Value(iTEM);
    }
Пример #23
0
        private void SetCostumeStatInfo(ref CharCostumeInfo_Data costumeData, ref NkSoldierInfo soldierInfo)
        {
            if (costumeData.IsNormalCostume())
            {
                return;
            }
            this.SetCostumeStatListTitle(ref costumeData);
            int num = 0;

            if (costumeData.m_ATKBonusRate != 0)
            {
                this.SetCostumeSoldierStat(num, costumeData.m_ATKBonusRate, soldierInfo, CostumeStatSetter.COSTUME_STAT.ATTACK);
                num++;
            }
            if (costumeData.m_DefBonusRate != 0)
            {
                this.SetCostumeSoldierStat(num, costumeData.m_DefBonusRate, soldierInfo, CostumeStatSetter.COSTUME_STAT.DEFENSE);
                num++;
            }
            if (costumeData.m_HPBonusRate != 0)
            {
                this.SetCostumeSoldierStat(num, costumeData.m_HPBonusRate, soldierInfo, CostumeStatSetter.COSTUME_STAT.HP);
                num++;
            }
        }
Пример #24
0
    public bool IsChangeChar(E_CHAR_TRIBE eCharTribe)
    {
        if (this.m_lNeedMoney > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(false);
        }
        NkSoldierInfo leaderSoldierInfo = charPersonInfo.GetLeaderSoldierInfo();

        if (leaderSoldierInfo == null)
        {
            return(false);
        }
        int changeCharKindFormIndex = CharChangeMainDlg.GetChangeCharKindFormIndex(eCharTribe);

        if (changeCharKindFormIndex == leaderSoldierInfo.GetCharKind())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("212"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (leaderSoldierInfo.IsEquipItem())
        {
            CharChangeMainDlg.ShowMessageBoxEquipItem();
            return(false);
        }
        return(true);
    }
Пример #25
0
    private void SendAllInitiative()
    {
        bool flag = false;
        GS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ gS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ = new GS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ();

        for (int i = 0; i < this.m_SoldierInfoSortList.Count; i++)
        {
            if (i >= 16)
            {
                break;
            }
            NkSoldierInfo nkSoldierInfo = this.m_SoldierInfoSortList[i];
            if (nkSoldierInfo != null && nkSoldierInfo.IsValid())
            {
                gS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ.nSolID[i]           = nkSoldierInfo.GetSolID();
                gS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ.nInitiativeValue[i] = this.m_SolInitiativeList[i];
                gS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ.bOnlySkill[i]       = this.m_SolOnlySkillList[i];
                flag = true;
            }
        }
        if (flag)
        {
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ, gS_SET_SOLDIER_INITIATIVE_AND_ONLYSKILL_REQ);
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("742"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
    }
Пример #26
0
    public void SetRequestInjury(long nSolID)
    {
        if (this.m_BatchUserSol == null)
        {
            return;
        }
        if (this.m_eStatus == eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_NONE)
        {
            return;
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        for (int i = 0; i < this.m_nMyBatchSolNum; i++)
        {
            if (this.m_BatchUserSol[i].m_nSolID == nSolID)
            {
                NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(nSolID);
                if (soldierInfoFromSolID != null)
                {
                    if (!soldierInfoFromSolID.IsInjuryStatus())
                    {
                        this.m_BatchUserSol[i].m_bInjury        = false;
                        this.m_BatchUserSol[i].m_eRequestInjury = INJURY_CURE_LEVEL.INJURY_CURE_LEVEL_NONE;
                    }
                    else if (this.m_BatchUserSol[i].m_eRequestInjury == INJURY_CURE_LEVEL.INJURY_CURE_LEVEL_ITEM)
                    {
                        this.m_BatchUserSol[i].m_eRequestInjury = INJURY_CURE_LEVEL.INJURY_CURE_LEVEL_NONE;
                    }
                }
            }
        }
    }
Пример #27
0
 public void SoltInitiativeBatch(bool OpenFirst)
 {
     if (this.m_SoldierInfoSortList.Count <= 0)
     {
         return;
     }
     if (OpenFirst)
     {
         this.m_SoldierInfoSortList.Sort(new Comparison <NkSoldierInfo>(this.CompareInitiative_High));
         for (int i = 0; i < this.m_SoldierInfoSortList.Count; i++)
         {
             NkSoldierInfo nkSoldierInfo = this.m_SoldierInfoSortList[i];
             if (nkSoldierInfo != null)
             {
                 this.m_SolInitiativeList.Add(nkSoldierInfo.GetInitiativeValue());
                 short item = 0;
                 if (nkSoldierInfo.IsAtbCommonFlag(8L))
                 {
                     item = 1;
                 }
                 this.m_SolOnlySkillList.Add(item);
             }
         }
     }
     else
     {
         this.m_SoldierInfoSortList.Sort(new Comparison <NkSoldierInfo>(this.CompareInitiative_HighNew));
     }
 }
Пример #28
0
    private void ShowCostumeChangeMessage(ref NkSoldierInfo soldierInfo)
    {
        if (soldierInfo == null)
        {
            return;
        }
        if (!(NrTSingleton <FormsManager> .Instance.GetForm(G_ID.COSTUMEROOM_DLG) is CostumeRoom_Dlg))
        {
            return;
        }
        int costumeUnique = (int)soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
        CharCostumeInfo_Data costumeData = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeData(costumeUnique);

        if (costumeData == null || costumeData.IsNormalCostume())
        {
            return;
        }
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("863"),
            "itemname",
            NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeName(costumeUnique)
        });

        Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
    }
    public void SetMythEvolutionOK(long i64SolID)
    {
        this.m_i64SolID = i64SolID;
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(this.m_i64SolID);

        if (soldierInfo == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        int num = soldierInfo.GetSeason() + 1;

        if (num < 0)
        {
            return;
        }
        MYTH_EVOLUTION myth_EvolutionSeason = NrTSingleton <NrTableMyth_EvolutionManager> .Instance.GetMyth_EvolutionSeason((byte)num);

        if (myth_EvolutionSeason != null)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3452"),
                "itemnum1",
                myth_EvolutionSeason.m_i32SpendItemNum1,
                "itemnum2",
                myth_EvolutionSeason.m_i32SpendItemNum2
            });

            this.m_Label_EvolutionCheck.SetText(empty);
        }
    }
Пример #30
0
    public override string GetGameGuideText()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(string.Empty);
        }
        NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(this.destSolID);

        if (soldierInfoFromSolID == null)
        {
            return(string.Empty);
        }
        string textFromToolTip = NrTSingleton <NrTextMgr> .Instance.GetTextFromToolTip(this.m_strTalkKey);

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromToolTip, new object[]
        {
            textFromToolTip,
            "solname",
            soldierInfoFromSolID.GetName(),
            "grade1",
            ItemManager.ChangeRankToColorString(this.destItem.m_nOption[2]),
            "itemname1",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.destItem.m_nItemUnique),
            "grade2",
            ItemManager.ChangeRankToColorString(this.srcItem.m_nOption[2]),
            "itemname2",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.srcItem.m_nItemUnique)
        });

        return(textFromToolTip);
    }