Beispiel #1
0
    public void ClickNPCInvite(IUIObject obj)
    {
        UIListItemContainer selectItem = this.m_nlbNPCList.GetSelectItem();

        if (selectItem == null)
        {
            return;
        }
        if (selectItem.Data == null)
        {
            return;
        }
        AgitNPCData agitNPCData = (AgitNPCData)selectItem.Data;

        if (agitNPCData == null)
        {
            return;
        }
        AgitInfoData agitData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitData(this.m_i16NPCLevel.ToString());

        if (agitData == null)
        {
            return;
        }
        AgitInfoData agitData2 = NrTSingleton <NrBaseTableManager> .Instance.GetAgitData(NrTSingleton <NewGuildManager> .Instance.GetAgitLevel().ToString());

        if (agitData2 == null)
        {
            return;
        }
        NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID);

        if (memberInfoFromPersonID == null)
        {
            return;
        }
        if (memberInfoFromPersonID.GetRank() < NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_OFFICER)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("769"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (NrTSingleton <NewGuildManager> .Instance.GetFund() < (long)agitData.i32NPCCost)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("754"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (NrTSingleton <NewGuildManager> .Instance.GetAgitNPCSubDataCount() >= (int)agitData2.i8NPCNum)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("770"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        AGIT_NPC_SUB_DATA agitNPCSubDataFromNPCType = NrTSingleton <NewGuildManager> .Instance.GetAgitNPCSubDataFromNPCType(agitNPCData.ui8NPCType);

        if (agitNPCSubDataFromNPCType != null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("771"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode);

        if (charKindInfoFromCode == null)
        {
            return;
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("257"),
            "count",
            agitData.i32NPCCost,
            "charname",
            charKindInfoFromCode.GetName(),
            "level",
            this.m_i16NPCLevel
        });

        msgBoxUI.SetMsg(new YesDelegate(this.MsgOKNPCInvite), agitNPCData, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("256"), this.m_strText, eMsgType.MB_OK_CANCEL, 2);
    }
Beispiel #2
0
    public void InputKeyBoard()
    {
        if (this.m_Battle.CastedTarget == null)
        {
            return;
        }
        if (this.m_Battle.CastedTarget.InputControlTrigger)
        {
            return;
        }
        if (NrTSingleton <UIManager> .Instance.FocusObject != null)
        {
            return;
        }
        if (!TsPlatform.IsEditor)
        {
            return;
        }
        NkBattleChar currentSelectChar = this.m_Battle.CastedTarget.GetCurrentSelectChar();

        if (currentSelectChar != null && NkInputManager.GetKeyUp(KeyCode.Alpha1))
        {
            int battleSkillUnique = currentSelectChar.GetSoldierInfo().SelectBattleSkillByWeapon(1);
            if (this.m_Battle.CastedTarget.CanSelecActionBattleSkill(battleSkillUnique))
            {
                this.m_Battle.CastedTarget.m_iBattleSkillIndex = 1;
                this.m_Battle.CastedTarget.REQUEST_ORDER       = eBATTLE_ORDER.eBATTLE_ORDER_SKILL;
                this.m_Battle.CastedTarget.ShowBattleSkillRange(true, battleSkillUnique);
            }
        }
        if (NkInputManager.GetKeyUp(KeyCode.R) && this.m_Battle.CastedTarget.CurrentTurnAlly == this.m_Battle.CastedTarget.MyAlly)
        {
            this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS;
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("364"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
        }
        if (NkInputManager.GetKeyUp(KeyCode.Tab) && this.m_Battle.CastedTarget.CurrentTurnAlly == this.m_Battle.CastedTarget.MyAlly)
        {
            this.m_Battle.CastedTarget.SelectNextChar();
        }
        if (NkInputManager.GetKeyUp(KeyCode.Z))
        {
            this.m_Battle.CastedTarget.Send_GS_BF_HOPE_TO_ENDTURN_REQ();
        }
        if (NkInputManager.GetKeyUp(KeyCode.X))
        {
            Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg;

            if (battle_Control_Dlg == null)
            {
                return;
            }
            battle_Control_Dlg.RequestRetreat();
        }
        if (NkInputManager.GetKeyUp(KeyCode.V) && TsPlatform.IsEditor)
        {
            this.m_Battle.CastedTarget.ChangeBattleAuto();
        }
        if (NkInputManager.GetKeyUp(KeyCode.C))
        {
        }
        if (!NkInputManager.GetKey(KeyCode.LeftShift) || NkInputManager.GetKeyUp(KeyCode.M))
        {
        }
        if (!NkInputManager.GetKey(KeyCode.LeftShift) || NkInputManager.GetKeyUp(KeyCode.N))
        {
        }
    }
Beispiel #3
0
    protected virtual void ClickTicketList(IUIObject obj)
    {
        UI_UIGuide uI_UIGuide = NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_nWinID) as UI_UIGuide;

        if (uI_UIGuide != null)
        {
            uI_UIGuide.CloseUI = true;
        }
        else
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.UIGUIDE_DLG);
        }
        if (obj == null)
        {
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.GetCanOpenTicket())
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
            return;
        }
        if (obj.Data is eSolRecruitType)
        {
            eSolRecruitType eSolRecruitType   = (eSolRecruitType)((int)obj.Data);
            string          textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1699");

            string text = string.Empty;
            if (eSolRecruitType != eSolRecruitType.SOLRECRUIT_VOUCHER_FREE_HEARTS_RECRUIT)
            {
                if (eSolRecruitType == eSolRecruitType.SOLRECRUIT_ESSENCE_ONE)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("296");
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("127");
                }
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    text,
                    "count",
                    SolRecruitDlg.GetNeedItemNum((int)eSolRecruitType)
                });
            }
            else
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("233");
            }
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI != null)
            {
                msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), eSolRecruitType, null, null, textFromInterface, text, eMsgType.MB_OK_CANCEL);
            }
        }
        else
        {
            ITEM iTEM = (ITEM)obj.Data;
            if (iTEM != null)
            {
                this.SetGetNowOpenTicket(iTEM);
                this.SolTicketOpen();
                if (this.m_OpenTicket.m_nItemNum > 1)
                {
                    this.m_ReUseTicket = true;
                }
                if (this.m_bTutorial)
                {
                    this.Close();
                }
            }
        }
        this.m_fRequestTime    = Time.time;
        this.m_fScrollPosition = this.m_TicketList.ScrollPosition;
    }
    public void OnReMatch(IUIObject obj)
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_DELAYTIME);
        long curTime     = PublicMethod.GetCurTime();
        long num         = charSubData - curTime;

        if (num > 0L)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("136"),
                "timestring",
                PublicMethod.ConvertTime(num)
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int  level = myCharInfo.GetLevel();
        long num2;

        if (level > 50)
        {
            num2 = (long)(level * (level - COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD2)));
        }
        else
        {
            num2 = (long)(level * COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD));
        }
        if (num2 > myCharInfo.m_Money)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
            return;
        }
        NewLoaingDlg newLoaingDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_LOADINGPAGE) as NewLoaingDlg;

        if (newLoaingDlg != null)
        {
            newLoaingDlg.SetLoadingPageEffect(SoldierBatch.SOLDIERBATCH.PlunderLoading);
            this.Hide();
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        GS_PLUNDER_MATCH_PLAYER_REQ gS_PLUNDER_MATCH_PLAYER_REQ = new GS_PLUNDER_MATCH_PLAYER_REQ();

        gS_PLUNDER_MATCH_PLAYER_REQ.m_PersonID = charPersonInfo.GetPersonID();
        gS_PLUNDER_MATCH_PLAYER_REQ.m_nMode    = 1;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_MATCH_PLAYER_REQ, gS_PLUNDER_MATCH_PLAYER_REQ);
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "REMATCHING", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        SoldierBatch.SOLDIERBATCH.InitEnemyChar();
        NrTSingleton <NrMainSystem> .Instance.CleanUpImmediate();

        this.m_nStartRematch = true;
        this.fDelayTime      = Time.time;
    }
Beispiel #5
0
    public override void ExcuteGameGuide()
    {
        if (this.srcItem == null || this.destItem == null)
        {
            return;
        }
        GS_ITEM_MOVE_REQ gS_ITEM_MOVE_REQ = new GS_ITEM_MOVE_REQ();
        NrPersonInfoUser charPersonInfo   = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

        if (soldierInfoFromSolID == null)
        {
            return;
        }
        ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(this.srcItem.m_nItemUnique);

        if (itemTypeInfo == null)
        {
            return;
        }
        if (!soldierInfoFromSolID.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE))
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("34");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (NrTSingleton <ItemManager> .Instance.GetItemMinLevelFromItem(this.srcItem) > (int)soldierInfoFromSolID.GetLevel())
        {
            string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("358");

            Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int equipItemPos = (int)NrTSingleton <ItemManager> .Instance.GetEquipItemPos(this.srcItem.m_nItemUnique);

        gS_ITEM_MOVE_REQ.m_nMoveType = NrTSingleton <ItemManager> .Instance.GetItemMoveType_InvenToSol(this.srcItem.m_nPosType);

        gS_ITEM_MOVE_REQ.m_nSrcItemID  = this.srcItem.m_nItemID;
        gS_ITEM_MOVE_REQ.m_nSrcItemPos = this.srcItem.m_nItemPos;
        gS_ITEM_MOVE_REQ.m_nSrcSolID   = this.srcSolID;
        if (this.destItem != null)
        {
            gS_ITEM_MOVE_REQ.m_nDestItemID  = this.destItem.m_nItemID;
            gS_ITEM_MOVE_REQ.m_nDestItemPos = equipItemPos;
            gS_ITEM_MOVE_REQ.m_nDestSolID   = this.destSolID;
        }
        else
        {
            gS_ITEM_MOVE_REQ.m_nDestItemID  = 0L;
            gS_ITEM_MOVE_REQ.m_nDestItemPos = equipItemPos;
            gS_ITEM_MOVE_REQ.m_nDestSolID   = this.destSolID;
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_MOVE_REQ, gS_ITEM_MOVE_REQ);
        NrTSingleton <GameGuideManager> .Instance.ExecuteGuide = true;
    }
    public void SetTargetInfoInfiBattle(bool bTargetShow, string strEnemyName, short iLevel, int iRank, int iStraightWin)
    {
        if (bTargetShow)
        {
            this.m_lCharName.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3176");

            this.m_lCharLevel.SetText(string.Empty);
            this.m_lbRank.SetText(string.Empty);
            this.m_lbStraightWin.SetText(string.Empty);
            COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
            string empty = string.Empty;
            if (instance != null)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("850"),
                    "time",
                    instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_BLIND_MATCH_TIME)
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            }
        }
        else
        {
            this.m_lCharName.Text  = strEnemyName;
            this.m_lCharLevel.Text = "Lv. " + iLevel.ToString();
            string text = string.Empty;
            if (0 < iRank)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1413"),
                    "rank",
                    iRank
                });
            }
            else
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
            }
            this.m_lbRank.SetText(text);
            if (0 <= iStraightWin)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2221"),
                    "count",
                    iStraightWin
                });

                this.m_lbStraightWin.SetText(text);
            }
            if (iLevel == 0)
            {
                NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.InfiBattleCharLevel = 1;
            }
            else
            {
                NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.InfiBattleCharLevel = (int)iLevel;
            }
        }
        SoldierBatch.SOLDIERBATCH.SetEnemyUserName(this.m_lCharName.Text);
    }
Beispiel #7
0
    public void SetData(GS_ENHANCEITEM_ACK pPacket)
    {
        base.SetShowLayer(2, false);
        int skillUnique  = pPacket.i32ITEMUPGRADE[4];
        int num          = pPacket.i32ITEMUPGRADE[5];
        int num2         = pPacket.i32ITEMUPGRADE[2];
        int num3         = pPacket.i32ITEMUPGRADE[2];
        int skillUnique2 = pPacket.i32ITEMOPTION[4];
        int num4         = pPacket.i32ITEMOPTION[5];

        this.m_SelectItem = NkUserInventory.GetInstance().GetItem(pPacket.nItemType, pPacket.nItemPos);
        if (this.m_SelectItem == null)
        {
            ItemSkill_Dlg itemSkill_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg;

            if (itemSkill_Dlg == null)
            {
                this.CloseForm(null);
                return;
            }
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            if (nrCharUser == null)
            {
                return;
            }
            NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemSkill_Dlg.GetItemSelectSolID());
            if (soldierInfoFromSolID != null)
            {
                this.m_SelectItemSolID = itemSkill_Dlg.GetItemSelectSolID();
                this.m_SelectItem      = soldierInfoFromSolID.GetEquipItemInfo().GetItem(pPacket.nItemPos);
            }
        }
        this.m_txItemSlotBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString((int)this.m_SelectItem.GetRank()));
        string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_SelectItem);

        this.m_itxItem.SetItemTexture(this.m_SelectItem);
        this.m_lbItemName.SetText(name);
        this.m_lbItemStat.SetText(string.Empty);
        this.m_lbItemStat_before.SetText(string.Empty);
        this.m_bItemSkillSuccess = (pPacket.nAddSkillSuccess == 1);
        string           empty           = string.Empty;
        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique);

        BATTLESKILL_BASE battleSkillBase2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique2);

        if (battleSkillBase != null && this.m_bItemSkillSuccess)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1218"),
                "targetname",
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey),
                "skilllevel",
                num
            });

            this.m_lbItemStat.SetText(empty);
            if (pPacket.nItemType != 10)
            {
                ItemSkill_Dlg itemSkill_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg;

                if (itemSkill_Dlg2 != null)
                {
                    itemSkill_Dlg2.UpdateData(pPacket.nItemPos, pPacket.nItemType, pPacket.i64ItemID);
                }
            }
            if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"),
                    "count",
                    pPacket.i32ITEMUPGRADE[7]
                });

                this.m_lbTradeCount.SetText(empty);
            }
            else
            {
                this.m_lbTradeCount.SetText(string.Empty);
            }
            if (battleSkillBase2 != null)
            {
                this.m_btnUndo.Visible = true;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1218"),
                    "targetname",
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase2.m_strTextKey),
                    "skilllevel",
                    num4
                });

                this.m_lbItemStat_before.SetText(empty);
                if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1)
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"),
                        "count",
                        pPacket.i32ITEMOPTION[7]
                    });

                    this.m_lbTradeCount_before.SetText(empty);
                }
                else
                {
                    this.m_lbTradeCount_before.SetText(string.Empty);
                }
            }
            else
            {
                this.m_lbTradeCount_before.SetText(string.Empty);
                this.m_lbItemStat_before.SetText(string.Empty);
                this.m_btnUndo.Visible = false;
            }
        }
        else
        {
            this.m_lbTradeCount.SetText(string.Empty);
            this.m_btnUndo.Visible = false;
        }
        if (num2 != num3)
        {
            this.m_lbItemStat.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1219"));
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("269"));
        }
        this.LoadSolComposeSuccessBundle();
    }
    public void SetBaseSol(long i64SolID)
    {
        this.m_i64BaseSolID = i64SolID;
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(i64SolID);

        if (soldierInfo == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        this.SetEvolutionSkillImage(true);
        int    grade               = (int)soldierInfo.GetGrade();
        int    solgrade            = (int)(soldierInfo.GetGrade() + 4);
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfo);

        this.m_DT_BaseSolimg.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), grade, costumePortraitPath);
        this.m_DT_ResultSolimg.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), solgrade, costumePortraitPath);
        short legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(soldierInfo.GetCharKind(), grade);

        UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(soldierInfo.GetCharKind(), grade);

        if (solLargeGradeImg != null)
        {
            this.m_DT_BaseSolRank.Visible = true;
            if (0 < legendType)
            {
                this.m_DT_BaseSolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.m_DT_BaseSolRank.SetTexture(solLargeGradeImg);
            this.m_DT_ResultSolRank.Visible = false;
        }
        legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(soldierInfo.GetCharKind(), solgrade);

        solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(soldierInfo.GetCharKind(), solgrade);

        if (solLargeGradeImg != null)
        {
            this.m_DT_ResultSolRank.Visible = true;
            if (0 < legendType)
            {
                this.m_DT_ResultSolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.m_DT_ResultSolRank.SetTexture(solLargeGradeImg);
        }
        string text = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("290"),
            "targetname",
            soldierInfo.GetName(),
            "count1",
            soldierInfo.GetLevel().ToString(),
            "count2",
            soldierInfo.GetSolMaxLevel().ToString()
        });

        this.m_LB_BaseSolName.SetText(text);
        this.m_LB_ResultSolName.SetText(text);
        int num = soldierInfo.GetSeason() + 1;

        if (num != 0)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3274"),
                "season",
                num
            });
        }
        this.m_Label_BaseSeason.SetText(text);
        this.m_Label_ResultSeason.SetText(text);
        MYTH_EVOLUTION myth_EvolutionSeason = NrTSingleton <NrTableMyth_EvolutionManager> .Instance.GetMyth_EvolutionSeason((byte)num);

        if (myth_EvolutionSeason != null)
        {
            this.m_Label_MythEvolution_Essence_Num2.SetText(ANNUALIZED.Convert(myth_EvolutionSeason.m_i32SpendItemNum1));
            this.m_Label_MythEvolution_DragonHeart_Num2.SetText(ANNUALIZED.Convert(myth_EvolutionSeason.m_i32SpendItemNum2));
            int charKindbyMythSkillUnique = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindbyMythSkillUnique(soldierInfo.GetCharKind(), 0);

            if (charKindbyMythSkillUnique > 0)
            {
                BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(charKindbyMythSkillUnique);

                if (battleSkillBase != null)
                {
                    text = battleSkillBase.m_waSkillName;
                    this.m_LB_MythSkillname1.SetText(text);
                    this.m_LB_MythSkillname2.SetText(text);
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3551"),
                        "skilllevel",
                        0
                    });

                    this.m_LB_MythSkillLevel1.SetText(text);
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3551"),
                        "skilllevel",
                        1
                    });

                    this.m_LB_MythSkillLevel2.SetText(text);
                }
                UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(charKindbyMythSkillUnique);

                if (battleSkillIconTexture != null)
                {
                    this.m_DT_MythSkillIcon1_2.SetTexture(battleSkillIconTexture);
                    this.m_DT_MythSkillIcon2_2.SetTexture(battleSkillIconTexture);
                }
            }
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MYTH_EVOLUTION_TIME);
            long curTime     = PublicMethod.GetCurTime();
            if (curTime < charSubData)
            {
                base.SetShowLayer(3, true);
                long iSec            = charSubData - curTime;
                long totalDayFromSec = PublicMethod.GetTotalDayFromSec(iSec);
                long hourFromSec     = PublicMethod.GetHourFromSec(iSec);
                long minuteFromSec   = PublicMethod.GetMinuteFromSec(iSec);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3443"),
                    "day",
                    totalDayFromSec,
                    "hour",
                    hourFromSec,
                    "min",
                    minuteFromSec
                });

                this.m_LB_MythTime.SetText(text);
            }
            else
            {
                base.SetShowLayer(3, false);
            }
        }
    }
    public void OnBtnClickSearch(IUIObject obj)
    {
        string       title       = string.Empty;
        string       text        = string.Empty;
        string       message     = string.Empty;
        byte         b           = (byte)obj.Data;
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolCount() == 0)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("528");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (kMyCharInfo.GetMilitaryList().FindEmptyExpeditionMilitaryIndex() == -1)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("765");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(b);

        if (expeditionDataFromGrade.Expedition_SEARCH_MONEY > kMyCharInfo.m_Money)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (kMyCharInfo.GetLevel() < (int)expeditionDataFromGrade.Possiblelevel)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("272");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
            {
                text,
                "count",
                expeditionDataFromGrade.Possiblelevel,
                "targetname",
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_INTERFACEKEY)
            });

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        long num = 0L;
        EXPEDITION_CONSTANT_MANAGER instance = EXPEDITION_CONSTANT_MANAGER.GetInstance();

        if (instance != null)
        {
            num = (long)instance.GetValue(eEXPEDITION_CONSTANT.eEXPEDITION_DAY_COUNT);
        }
        if (num > 0L && kMyCharInfo.GetCharDetail(10) >= num)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("405");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        title = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1316");

        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("128");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
        {
            text,
            "count",
            expeditionDataFromGrade.Expedition_SEARCH_MONEY,
            "targetname1",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_INTERFACEKEY),
            "targetname2",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_GRADE_INTERFACEKEY)
        });

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

        msgBoxUI.SetMsg(new YesDelegate(this.OnSearch), b, title, message, eMsgType.MB_OK_CANCEL, 2);
    }
    public void OnClickUse(IUIObject obj)
    {
        if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_RANDOMBOX)
        {
            GS_BOX_USE_REQ gS_BOX_USE_REQ = new GS_BOX_USE_REQ();
            gS_BOX_USE_REQ.m_nItemID     = this.m_MainBoxItem.m_nItemID;
            gS_BOX_USE_REQ.m_nItemUnique = this.m_MainBoxItem.m_nItemUnique;
            gS_BOX_USE_REQ.m_nPosType    = this.m_MainBoxItem.m_nPosType;
            gS_BOX_USE_REQ.m_nItemPos    = this.m_MainBoxItem.m_nItemPos;
            gS_BOX_USE_REQ.m_nArrayIndex = 0;
            gS_BOX_USE_REQ.m_byAllOpen   = 1;
            gS_BOX_USE_REQ.m_nItemCount  = this.m_nItemOpenCount;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BOX_USE_REQ, gS_BOX_USE_REQ);
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_GOLDBAR || this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_EXCHANGE || this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_BATTLESPEED)
        {
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            NkSoldierInfo userSoldierInfo = nrCharUser.GetUserSoldierInfo();
            long          solID           = userSoldierInfo.GetSolID();
            if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_BATTLESPEED && this.m_MaxCount <= 0f)
            {
                COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
                if (instance == null)
                {
                    return;
                }
                int    value          = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_FASTBATTLE_MAXNUM);
                string empty          = string.Empty;
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("801");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    textFromNotify,
                    "count",
                    value
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
                return;
            }
            else
            {
                GS_ITEM_SUPPLY_USE_REQ gS_ITEM_SUPPLY_USE_REQ = new GS_ITEM_SUPPLY_USE_REQ();
                gS_ITEM_SUPPLY_USE_REQ.m_nItemUnique = this.m_MainBoxItem.m_nItemUnique;
                gS_ITEM_SUPPLY_USE_REQ.m_nDestSolID  = solID;
                gS_ITEM_SUPPLY_USE_REQ.m_shItemNum   = this.m_nItemOpenCount;
                gS_ITEM_SUPPLY_USE_REQ.m_byPosType   = this.m_MainBoxItem.m_nPosType;
                gS_ITEM_SUPPLY_USE_REQ.m_shPosItem   = this.m_MainBoxItem.m_nItemPos;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_SUPPLY_USE_REQ, gS_ITEM_SUPPLY_USE_REQ);
                this.Close();
            }
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_TICKET)
        {
            if (!(obj.Data is ITEM))
            {
                return;
            }
            ITEM iTEM = obj.Data as ITEM;
            if (iTEM == null)
            {
                return;
            }
            NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

            if (readySolList == null || readySolList.GetCount() >= 100)
            {
                string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("507");

                Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
                return;
            }
            if (NrTSingleton <ItemManager> .Instance.GetItemInfo(iTEM.m_nItemUnique) == null)
            {
                return;
            }
            SolRecruitDlg solRecruitDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLRECRUIT_DLG) as SolRecruitDlg;

            if (solRecruitDlg != null)
            {
                solRecruitDlg.SetRecruitButtonEnable(false);
            }
            NrTSingleton <NkClientLogic> .Instance.SetCanOpenTicket(false);

            if (this.m_nItemOpenCount == 1)
            {
                Protocol_Item.Item_Use(iTEM);
                return;
            }
            GS_SOLDIER_RECRUIT_REQ gS_SOLDIER_RECRUIT_REQ = default(GS_SOLDIER_RECRUIT_REQ);
            gS_SOLDIER_RECRUIT_REQ.ItemUnique  = iTEM.m_nItemUnique;
            gS_SOLDIER_RECRUIT_REQ.RecruitType = 20;
            gS_SOLDIER_RECRUIT_REQ.SubData     = this.m_nItemOpenCount;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLDIER_RECRUIT_REQ, gS_SOLDIER_RECRUIT_REQ);
        }
    }
    private void OnClickMythEvolution(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(this.m_i64BaseSolID);

        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;
            if (NkUserInventory.GetInstance().Get_First_ItemCnt(myth_EvolutionSeason.m_i32SpendItemUnique1) < myth_EvolutionSeason.m_i32SpendItemNum1)
            {
                string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(myth_EvolutionSeason.m_i32SpendItemUnique1);

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"),
                    "target",
                    itemNameByItemUnique
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                return;
            }
            if (NkUserInventory.GetInstance().Get_First_ItemCnt(myth_EvolutionSeason.m_i32SpendItemUnique2) < myth_EvolutionSeason.m_i32SpendItemNum2)
            {
                string itemNameByItemUnique2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(myth_EvolutionSeason.m_i32SpendItemUnique2);

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"),
                    "target",
                    itemNameByItemUnique2
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                return;
            }
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo != null)
            {
                long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MYTH_EVOLUTION_TIME);
                long curTime     = PublicMethod.GetCurTime();
                if (curTime > charSubData)
                {
                    Myth_Evolution_Check_DLG myth_Evolution_Check_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_EVOLUTION_CHECK_DLG) as Myth_Evolution_Check_DLG;

                    if (myth_Evolution_Check_DLG != null)
                    {
                        myth_Evolution_Check_DLG.SetMythEvolutionOK(this.m_i64BaseSolID);
                    }
                }
                else
                {
                    Myth_Evolution_Time_DLG myth_Evolution_Time_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_EVOLUTION_TIME_DLG) as Myth_Evolution_Time_DLG;

                    if (myth_Evolution_Time_DLG != null)
                    {
                        myth_Evolution_Time_DLG.InitSet(this.e_MythType, soldierInfo.GetCharKind(), this.m_i64BaseSolID);
                    }
                }
            }
        }
    }
    public void OnClickRepeat(IUIObject obj)
    {
        if (Scene.CurScene == Scene.Type.BATTLE)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
        int num  = 0;
        int num2 = 0;

        if (myCharInfo.ColosseumMatching)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("615"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        if (instance != null)
        {
            if (NrTSingleton <ContentsLimitManager> .Instance.IsVipExp())
            {
                num2 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT);
            }
            else
            {
                short vipLevelAddBattleRepeat = NrTSingleton <NrTableVipManager> .Instance.GetVipLevelAddBattleRepeat();

                num2 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT) + (int)vipLevelAddBattleRepeat;
            }
            num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_REPEAT);
        }
        if (myCharInfo.GetLevel() < num)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("781"),
                "level",
                num
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        string text   = " ";
        int    nFloor = (int)this.m_nFloor;
        int    num3   = (int)this.m_nsubFloor;

        if (nFloor <= 0 || num3 < 0)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("614");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        num3++;
        MsgBoxTwoCheckUI msgBoxTwoCheckUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_TWOCHECK_DLG) as MsgBoxTwoCheckUI;

        if (this.m_nFloorType == 2)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2784");
        }
        string empty2 = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("186"),
            "type",
            text,
            "floor",
            nFloor.ToString(),
            "subfloor",
            num3.ToString(),
            "count",
            num2.ToString()
        });

        msgBoxTwoCheckUI.SetCheckBoxState(1, false);
        msgBoxTwoCheckUI.SetCheckBoxState(2, false);
        msgBoxTwoCheckUI.SetMsg(new YesDelegate(BabelTowerMainDlg.RepeatBabelStart), msgBoxTwoCheckUI, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("185"), empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("354"), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("263"), new CheckBox2Delegate(BabelTowerMainDlg.CheckBattleSpeedCount), eMsgType.MB_CHECK12_OK_CANCEL);
        MsgBoxTwoCheckUI expr_22F = msgBoxTwoCheckUI;

        expr_22F.m_YesDelegatePriority = (YesDelegate)Delegate.Combine(expr_22F.m_YesDelegatePriority, new YesDelegate(this.SaveBabelFloor));
    }
Beispiel #13
0
    public void GetChallengeOpenUi(string OpenUi, short unique)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        string a = "e" + OpenUi;

        if (a == "0")
        {
            return;
        }
        if (a == eChallenge_OpenUi.ePLUNDERMAIN.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.PLUNDERMAIN_DLG))
            {
                GS_INFIBATTLE_RANK_GET_REQ gS_INFIBATTLE_RANK_GET_REQ = new GS_INFIBATTLE_RANK_GET_REQ();
                gS_INFIBATTLE_RANK_GET_REQ.i64PersonID = kMyCharInfo.m_PersonID;
                SendPacket.GetInstance().SendObject(2017, gS_INFIBATTLE_RANK_GET_REQ);
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.PLUNDERMAIN_DLG);
            }
        }
        else if (a == eChallenge_OpenUi.eBOUNTYHUNTING.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.BOUNTYHUNTING_DLG))
            {
                BountyHuntingDlg bountyHuntingDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BOUNTYHUNTING_DLG) as BountyHuntingDlg;

                if (bountyHuntingDlg != null)
                {
                    bountyHuntingDlg.SetData();
                }
            }
        }
        else if (a == eChallenge_OpenUi.eBABELTOWER_MODESELECT.ToString())
        {
            int level = kMyCharInfo.GetLevel();
            int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABELTOWER_LIMITLEVEL);
            if (level < value)
            {
                string empty          = string.Empty;
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    textFromNotify,
                    "level",
                    value.ToString()
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            if (kMyCharInfo.m_kFriendInfo.GetFriendCount() > 0 && kMyCharInfo.m_kFriendInfo.GetFriendsBaBelDataCount() == 0)
            {
                GS_FRIENDS_BABELTOWER_CLEARINFO_REQ obj = new GS_FRIENDS_BABELTOWER_CLEARINFO_REQ();
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_FRIENDS_BABELTOWER_CLEARINFO_REQ, obj);
            }
            int value2 = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_HARD_LEVEL);
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.BABELTOWERMAIN_DLG))
            {
                if (level < value2)
                {
                    DirectionDLG directionDLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG;

                    if (directionDLG != null)
                    {
                        directionDLG.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_BABEL, 1);
                    }
                }
                else
                {
                    NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.BABELTOWER_MODESELECT_DLG);
                }
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BABELTOWERMAIN_DLG);
            }
        }
        else if (a == eChallenge_OpenUi.eMYTHRAID_MODESELECT.ToString())
        {
            if (kMyCharInfo != null)
            {
                int num = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_MYTHRAID_LIMITLEVEL);
                if (num == 0)
                {
                    num = 50;
                }
                if (kMyCharInfo.GetLevel() < num)
                {
                    string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("908");

                    if (string.IsNullOrEmpty(textFromNotify2))
                    {
                        return;
                    }
                    Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                    return;
                }
            }
            DirectionDLG directionDLG2 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG;

            if (directionDLG2 != null)
            {
                directionDLG2.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_MYTHRAID, 0);
            }
        }
        else if (a == eChallenge_OpenUi.eMINE_SEARCH.ToString())
        {
            if (0L >= NrTSingleton <NewGuildManager> .Instance.GetGuildID() || !NrTSingleton <ContentsLimitManager> .Instance.IsMineApply((short)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel()))
            {
                string textFromNotify3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("763");

                Main_UI_SystemMessage.ADDMessage(textFromNotify3, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MINE_TUTORIAL_STEP);
            if (charSubData == 1L)
            {
                MineTutorialStepDlg mineTutorialStepDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MINE_TUTORIAL_STEP_DLG) as MineTutorialStepDlg;

                if (mineTutorialStepDlg != null)
                {
                    mineTutorialStepDlg.SetStep(1L);
                }
            }
            else
            {
                NrTSingleton <MineManager> .Instance.Send_GS_MINE_GUILD_CURRENTSTATUS_INFO_GET_REQ(1, 1, 0L);
            }
        }
        else if (a == eChallenge_OpenUi.eCOLOSSEUMMAIN.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.COLOSSEUMMAIN_DLG))
            {
                NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.COLOSSEUMMAIN_DLG);
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.COLOSSEUMMAIN_DLG);
            }
        }
        else if (a == eChallenge_OpenUi.eBABEL_GUILDBOSS_MAIN.ToString())
        {
            if (!NrTSingleton <ContentsLimitManager> .Instance.IsGuildBoss())
            {
                return;
            }
            if (NrTSingleton <NewGuildManager> .Instance.GetGuildID() <= 0L)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("545"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            BabelGuildBossDlg babelGuildBossDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BABEL_GUILDBOSS_MAIN_DLG) as BabelGuildBossDlg;

            if (babelGuildBossDlg != null)
            {
                babelGuildBossDlg.Show();
            }
        }
        else if (a == eChallenge_OpenUi.eREFORGEMAIN.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.REFORGEMAIN_DLG))
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.REFORGERESULT_DLG);

                ReforgeMainDlg reforgeMainDlg = (ReforgeMainDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.REFORGEMAIN_DLG);

                reforgeMainDlg.Show();
            }
        }
        else if (a == eChallenge_OpenUi.eSOLEXTRACT_DUMMY.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG))
            {
                HeroCollect_DLG_challengequest heroCollect_DLG_challengequest = (HeroCollect_DLG_challengequest)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG);

                if (heroCollect_DLG_challengequest != null)
                {
                    heroCollect_DLG_challengequest._ChallengeQuestUnique = (int)unique;
                    heroCollect_DLG_challengequest.SetDummyUI();
                    heroCollect_DLG_challengequest.Show();
                }
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG);
            }
        }
        else if (a == eChallenge_OpenUi.eSOLTRANSCENDENCE_DUMMY.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG))
            {
                HeroCollect_DLG_challengequest heroCollect_DLG_challengequest2 = (HeroCollect_DLG_challengequest)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG);

                if (heroCollect_DLG_challengequest2 != null)
                {
                    heroCollect_DLG_challengequest2._ChallengeQuestUnique = (int)unique;
                    heroCollect_DLG_challengequest2.SetDummyUI();
                    heroCollect_DLG_challengequest2.Show();
                }
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG);
            }
        }
        else if (a == eChallenge_OpenUi.eSOLCOMPOSE_DUMMY.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG))
            {
                HeroCollect_DLG_challengequest heroCollect_DLG_challengequest3 = (HeroCollect_DLG_challengequest)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG);

                if (heroCollect_DLG_challengequest3 != null)
                {
                    heroCollect_DLG_challengequest3._ChallengeQuestUnique = (int)unique;
                    heroCollect_DLG_challengequest3.SetDummyUI();
                    heroCollect_DLG_challengequest3.Show();
                }
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG);
            }
        }
        else if (a == eChallenge_OpenUi.eSOLRECRUIT_DUMMY.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLRECRUIT_CHALLENGEQUEST_DLG))
            {
                SolRecruitDlg_ChallengeQuest solRecruitDlg_ChallengeQuest = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLRECRUIT_CHALLENGEQUEST_DLG) as SolRecruitDlg_ChallengeQuest;

                solRecruitDlg_ChallengeQuest.SetTicketList();
            }
        }
        else if (a == eChallenge_OpenUi.eSOLRECRUIT.ToString())
        {
            GS_TICKET_SELL_INFO_REQ obj2 = new GS_TICKET_SELL_INFO_REQ();
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TICKET_SELL_INFO_REQ, obj2);
        }
        else if (a == eChallenge_OpenUi.eSTORYCHAT.ToString())
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.STORYCHAT_DLG))
            {
                NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.STORYCHAT_DLG);
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.STORYCHAT_DLG);
            }
        }
        else if (a == eChallenge_OpenUi.eBABELTOWERMAIN.ToString())
        {
            int level2 = kMyCharInfo.GetLevel();
            int value3 = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABELTOWER_LIMITLEVEL);
            if (level2 < value3)
            {
                string empty2          = string.Empty;
                string textFromNotify4 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                {
                    textFromNotify4,
                    "level",
                    value3.ToString()
                });

                Main_UI_SystemMessage.ADDMessage(empty2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            BabelTowerMainDlg babelTowerMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BABELTOWERMAIN_DLG) as BabelTowerMainDlg;

            if (babelTowerMainDlg != null)
            {
                babelTowerMainDlg.Show();
            }
        }
        else if (a == eChallenge_OpenUi.eREDUCEMAIN.ToString())
        {
            NrTSingleton <NkQuestManager> .Instance.NPCAutoMove(125);

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHALLENGE_DLG);
        }
        else if (a == eChallenge_OpenUi.eITEMSKILL.ToString())
        {
            NrTSingleton <NkQuestManager> .Instance.NPCAutoMove(109);
        }
        else if (a == eChallenge_OpenUi.eSOLDETAIL.ToString())
        {
            GS_SOLGUIDE_INFO_REQ gS_SOLGUIDE_INFO_REQ = new GS_SOLGUIDE_INFO_REQ();
            gS_SOLGUIDE_INFO_REQ.bElementMark = false;
            gS_SOLGUIDE_INFO_REQ.i32CharKind  = 1053;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLGUIDE_INFO_REQ, gS_SOLGUIDE_INFO_REQ);
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHALLENGE_DLG);
        }
        else if (a == eChallenge_OpenUi.eITEMMALL_DUMMY.ToString())
        {
            ItemMallDlg_ChallengeQuest itemMallDlg_ChallengeQuest = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMMALL_CHALLENGEQUEST_DLG) as ItemMallDlg_ChallengeQuest;

            if (itemMallDlg_ChallengeQuest != null)
            {
                itemMallDlg_ChallengeQuest._ChallengeQuestUnique = (int)unique;
                itemMallDlg_ChallengeQuest.SetShowMode(ItemMallDlg.eMODE.eMODE_VOUCHER_HERO);
                itemMallDlg_ChallengeQuest.InitDummyUI();
            }
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHALLENGE_DLG);
        }
        else if (a == eChallenge_OpenUi.eSOLEVOLUTION_DUMMY.ToString())
        {
            Myth_Evolution_Main_DLG_ChallengeQuest myth_Evolution_Main_DLG_ChallengeQuest = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_EVOLUTION_MAIN_CHALLENGEQUEST_DLG) as Myth_Evolution_Main_DLG_ChallengeQuest;

            if (myth_Evolution_Main_DLG_ChallengeQuest != null)
            {
                myth_Evolution_Main_DLG_ChallengeQuest.ChallengeQuestUnique = (int)unique;
                myth_Evolution_Main_DLG_ChallengeQuest.InitDummyUI();
            }
        }
        else if (a == eChallenge_OpenUi.eDAILYDUNGEON.ToString())
        {
            DailyDungeon_Select_Dlg dailyDungeon_Select_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DAILYDUNGEON_SELECT) as DailyDungeon_Select_Dlg;

            if (dailyDungeon_Select_Dlg != null)
            {
                dailyDungeon_Select_Dlg.SetData();
            }
        }
        else if (a == eChallenge_OpenUi.eNEWEXPLORATION.ToString())
        {
            NewExplorationMainDlg newExplorationMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NEWEXPLORATION_MAIN_DLG) as NewExplorationMainDlg;

            if (newExplorationMainDlg != null)
            {
                newExplorationMainDlg.SetInfo();
            }
        }
        else if (a == eChallenge_OpenUi.eSOLCOMPOSE.ToString())
        {
            SolComposeMainDlg solComposeMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLCOMPOSE_MAIN_DLG) as SolComposeMainDlg;
        }
        if (NrTSingleton <EventConditionHandler> .Instance.OpenUIByChallenge != null)
        {
            NrTSingleton <EventConditionHandler> .Instance.OpenUIByChallenge.OnTrigger(unique);
        }
    }
    public virtual void OnReincarnateOK(object a_oObject)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        long[] array = new long[5];
        for (int i = 0; i < 5; i++)
        {
            this.m_eElement_Msg[i] = eElement_MsgType.eElement_NOTSOL;
            if (this.m_CharKind_Legendinfo.i32Base_CharKind[i] == 0)
            {
                this.m_eElement_Msg[i] = eElement_MsgType.eElement_OK;
                array[i] = 0L;
            }
            else
            {
                NkSoldierInfo legendSolInfo = this.m_Element_SolID.GetLegendSolInfo(i);
                if (legendSolInfo == null)
                {
                    Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1649"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                    return;
                }
                if (legendSolInfo.GetSolPosType() != 0)
                {
                    if (legendSolInfo.GetSolPosType() == 2 || legendSolInfo.GetSolPosType() == 6)
                    {
                        Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("384"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                        return;
                    }
                    TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : SOL Pos{1}  ==  Char Sol Pos Type", new object[]
                    {
                        this.m_CharKind_Legendinfo.i32Base_CharKind[i],
                        legendSolInfo.GetSolPosType()
                    });
                    return;
                }
                else
                {
                    for (int j = 0; j < 6; j++)
                    {
                        ITEM item = legendSolInfo.GetEquipItemInfo().m_kItem[j].GetItem();
                        if (item == null)
                        {
                            TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1}  ==  ITEM NULL ", new object[]
                            {
                                this.m_CharKind_Legendinfo.i32Base_CharKind[i],
                                j
                            });
                            return;
                        }
                        if (item.m_nItemUnique != 0)
                        {
                            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("383"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                            return;
                        }
                    }
                    if (legendSolInfo.GetFriendPersonID() != 0L)
                    {
                        TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Set FriendSOLHELP ", new object[]
                        {
                            legendSolInfo.GetName()
                        });
                        return;
                    }
                    array[i] = legendSolInfo.GetSolID();
                }
            }
        }
        long i64NeedMoney = this.m_CharKind_Legendinfo.i64NeedMoney;
        int  itemCnt      = NkUserInventory.GetInstance().GetItemCnt(this.m_CharKind_Legendinfo.i32EssenceUnique);

        if (i64NeedMoney > kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
            return;
        }
        if (itemCnt < this.m_CharKind_Legendinfo.i32NeedEssence)
        {
            string empty = string.Empty;
            string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_CharKind_Legendinfo.i32EssenceUnique);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"),
                "target",
                itemNameByItemUnique
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
            return;
        }
        GS_ELEMENT_LEGENDSOL_GET_REQ gS_ELEMENT_LEGENDSOL_GET_REQ = new GS_ELEMENT_LEGENDSOL_GET_REQ();

        gS_ELEMENT_LEGENDSOL_GET_REQ.i64PersonID = kMyCharInfo.m_PersonID;
        gS_ELEMENT_LEGENDSOL_GET_REQ.i32CharKind = this.m_CharKind_Legendinfo.i32Element_LegendCharkind;
        gS_ELEMENT_LEGENDSOL_GET_REQ.i64SolID    = array;
        SendPacket.GetInstance().SendObject(1840, gS_ELEMENT_LEGENDSOL_GET_REQ);
    }
Beispiel #15
0
    public override void OnPrepareSceneChange()
    {
        Application.targetFrameRate = -1;
        NrTSingleton <NkCharManager> .Instance.DeleteBattleChar();

        NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType());
        NrLoadPageScreen.StepUpMain(1);
        NrLoadPageScreen.SetSkipMainStep(1);
        NrLoadPageScreen.ShowHideLoadingImg(true);
        this.m_SoldierBatch = new SoldierBatch();
        this.m_SoldierBatch.Init();
        this._bTemporalBattleUpdate = true;
        if (TsPlatform.IsLowSystemMemory)
        {
            TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.SoldierBatchScene);
        }
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null)
        {
            @char.m_kCharMove.MoveStop(true, false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PLUNDER)
        {
            GS_PLUNDER_MATCH_PLAYER_REQ gS_PLUNDER_MATCH_PLAYER_REQ = new GS_PLUNDER_MATCH_PLAYER_REQ();
            gS_PLUNDER_MATCH_PLAYER_REQ.m_PersonID = charPersonInfo.GetPersonID();
            gS_PLUNDER_MATCH_PLAYER_REQ.m_nMode    = 0;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_MATCH_PLAYER_REQ, gS_PLUNDER_MATCH_PLAYER_REQ);
        }
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE)
        {
            int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_LEVEL);
            if ((int)charPersonInfo.GetLeaderSoldierInfo().GetLevel() < value)
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129"),
                    "level",
                    value
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            GS_INFIBATTLE_MATCH_REQ obj = new GS_INFIBATTLE_MATCH_REQ();
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_MATCH_REQ, obj);
        }
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE)
        {
            GS_INFIBATTLE_PRACTICE_START_REQ gS_INFIBATTLE_PRACTICE_START_REQ = new GS_INFIBATTLE_PRACTICE_START_REQ();
            gS_INFIBATTLE_PRACTICE_START_REQ.i64PersonID       = charPersonInfo.GetPersonID();
            gS_INFIBATTLE_PRACTICE_START_REQ.i64TargetPersonID = charPersonInfo.InfiBattlePersonID;
            gS_INFIBATTLE_PRACTICE_START_REQ.i32Rank           = charPersonInfo.InfiBattleRank;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_PRACTICE_START_REQ, gS_INFIBATTLE_PRACTICE_START_REQ);
        }
        GS_CHAR_STATE_SET_REQ gS_CHAR_STATE_SET_REQ = new GS_CHAR_STATE_SET_REQ();

        gS_CHAR_STATE_SET_REQ.nSet = 1;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_STATE_SET_REQ, gS_CHAR_STATE_SET_REQ);
        base.ResetCoTasks();
    }
    public bool IsRegister()
    {
        short auctionUseLevel = NrTSingleton <ContentsLimitManager> .Instance.GetAuctionUseLevel();

        if (0 >= auctionUseLevel)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("270"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        if (auctionUseLevel > (short)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel())
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("628"),
                "count",
                auctionUseLevel
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        if (0L >= this.m_lSellRegisterCost)
        {
            return(false);
        }
        if (this.m_lSellRegisterCost > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("1255"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        if (0L < this.m_lSellDirectCost)
        {
            long directCostMin = AuctionMainDlg.GetDirectCostMin(this.m_ePayType, this.m_lSellCost);
            if (this.m_lSellDirectCost < directCostMin)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("271"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
        }
        if (this.m_SelectItem != null)
        {
        }
        if (this.m_SelectSoldierInfo != null)
        {
            if (this.m_SelectSoldierInfo.GetLevel() < AuctionMainDlg.GetSolLevelLimit())
            {
                string empty2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("649"),
                    "level1",
                    AuctionMainDlg.GetSolLevelLimit(),
                    "level2",
                    AuctionMainDlg.GetSolSkillLevelLimit()
                });

                Main_UI_SystemMessage.ADDMessage(empty2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
            if (this.m_SelectSoldierInfo.GetLevel() < AuctionMainDlg.GetSolSkillLevelLimit())
            {
                string empty3 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("649"),
                    "level1",
                    AuctionMainDlg.GetSolLevelLimit(),
                    "level2",
                    AuctionMainDlg.GetSolSkillLevelLimit()
                });

                Main_UI_SystemMessage.ADDMessage(empty3, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
            if (this.m_SelectSoldierInfo.IsEquipItem())
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("304"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
            if (this.m_SelectSoldierInfo.IsInjuryStatus())
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("407"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
            if (this.m_SelectSoldierInfo.IsAwakening())
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("814"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
            if (this.m_SelectSoldierInfo.IsAtbCommonFlag(1L))
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("879"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
        }
        int num = (int)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetCharDetail(19);

        if (AuctionMainDlg.GetDailySellLimit() <= num)
        {
            string empty4 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty4, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("656"),
                "count",
                num
            });

            Main_UI_SystemMessage.ADDMessage(empty4, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        return(true);
    }
Beispiel #17
0
    private void ClickSell(IUIObject obj)
    {
        if (this.m_kSelectItem != null)
        {
            ITEM iTEM = this.m_kSelectItem.Data as ITEM;
            if (iTEM != null && iTEM.IsLock())
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("726"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
                return;
            }
        }
        GuildWarExchangeTable guildWarExchangeTable = (GuildWarExchangeTable)this.m_kSelectItem.Data;

        if (guildWarExchangeTable == null)
        {
            return;
        }
        if (this.m_GuildWar_Exchange_Limit.ContainsKey(this.m_nSelectItemUnique) && this.m_GuildWar_Exchange_Limit[this.m_nSelectItemUnique].i32ExchangeLimit == 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("842"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
            return;
        }
        if (guildWarExchangeTable.m_nExchangeLimit != -1)
        {
            if (this.m_GuildWar_Exchange_Limit.ContainsKey(this.m_nSelectItemUnique))
            {
                if (this.m_nSelectItemNum > this.m_GuildWar_Exchange_Limit[this.m_nSelectItemUnique].i32ExchangeLimit)
                {
                    Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("841"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
                    return;
                }
            }
            else if (this.m_nSelectItemNum > guildWarExchangeTable.m_nExchangeLimit)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("841"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
                return;
            }
        }
        GS_EXCHANGE_GUILDWAR_CHECK_REQ gS_EXCHANGE_GUILDWAR_CHECK_REQ = new GS_EXCHANGE_GUILDWAR_CHECK_REQ();

        gS_EXCHANGE_GUILDWAR_CHECK_REQ.nItemUnique = this.m_nSelectItemUnique;
        gS_EXCHANGE_GUILDWAR_CHECK_REQ.nItemNum    = this.m_nSelectItemNum;
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2257");

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

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromMessageBox, new object[]
        {
            textFromMessageBox,
            "targetname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_nSelectItemUnique),
            "count",
            this.m_nSelectItemNum
        });

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

        if (msgBoxUI != null)
        {
            msgBoxUI.SetMsg(new YesDelegate(this.BuyItem), gS_EXCHANGE_GUILDWAR_CHECK_REQ, null, null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL);
        }
    }
Beispiel #18
0
    public void OnReincarnateOK(object a_oObject)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        int  num        = 0;
        byte bCharGrade = 0;

        long[] array = new long[5];
        for (int i = 0; i < 5; i++)
        {
            if (this.m_MaterialSol.i32BaseCharKind == this.m_SelectSlotData.i32KindInfo)
            {
                this.m_MaterialSol.GetCharData((byte)i, ref num, ref bCharGrade);
            }
            this.m_eElement_Msg[i] = eElement_MsgType.eElement_NOTSOL;
            if (num == 0)
            {
                this.m_eElement_Msg[i] = eElement_MsgType.eElement_OK;
                array[i] = 0L;
            }
            else
            {
                NkSoldierInfo battleSolDataCheck = this.GetBattleSolDataCheck(ref this.m_eElement_Msg[i], num, bCharGrade);
                if (battleSolDataCheck == null)
                {
                    Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1649"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                    return;
                }
                if (battleSolDataCheck.GetSolPosType() != 0)
                {
                    if (battleSolDataCheck.GetSolPosType() == 2 || battleSolDataCheck.GetSolPosType() == 6)
                    {
                        Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("384"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                        return;
                    }
                    TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : SOL Pos{1}  ==  Char Sol Pos Type", new object[]
                    {
                        num,
                        battleSolDataCheck.GetSolPosType()
                    });
                    return;
                }
                else
                {
                    for (int j = 0; j < 6; j++)
                    {
                        ITEM item = battleSolDataCheck.GetEquipItemInfo().m_kItem[j].GetItem();
                        if (item == null)
                        {
                            TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1}  ==  ITEM NULL ", new object[]
                            {
                                num,
                                j
                            });
                            return;
                        }
                        if (item.m_nItemUnique != 0)
                        {
                            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("383"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                            return;
                        }
                    }
                    if (battleSolDataCheck.GetFriendPersonID() != 0L)
                    {
                        TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Set FriendSOLHELP ", new object[]
                        {
                            battleSolDataCheck.GetName()
                        });
                        return;
                    }
                    array[i] = battleSolDataCheck.GetSolID();
                }
            }
        }
        long num2 = 0L;

        if (this.m_MaterialSol.i32BaseCharKind == this.m_SelectSlotData.i32KindInfo)
        {
            num2 = this.m_MaterialSol.i64Money;
        }
        if (num2 > kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
            return;
        }
        GS_ELEMENT_SOL_GET_REQ gS_ELEMENT_SOL_GET_REQ = new GS_ELEMENT_SOL_GET_REQ();

        gS_ELEMENT_SOL_GET_REQ.i64PersonID = kMyCharInfo.m_PersonID;
        gS_ELEMENT_SOL_GET_REQ.i32CharKind = this.m_SelectSlotData.i32KindInfo;
        gS_ELEMENT_SOL_GET_REQ.i64SolID    = array;
        SendPacket.GetInstance().SendObject(1838, gS_ELEMENT_SOL_GET_REQ);
    }
Beispiel #19
0
    public void SetRewardItem(GS_TREASUREBOX_REWARD_DLG_NFY Nfy)
    {
        string text = string.Empty;

        this.m_i16TreasureReward = Nfy.i16TreasureUnique;
        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2527") + "_" + Nfy.i16TreasureUnique.ToString();

        this.m_LbelTitle.SetText(text);
        this.SetRewardButton(false);
        if (Nfy.i32Result == -11)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("634");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.TREASUREBOX_DLG);
        }
        else if (Nfy.i32Result == -12)
        {
            string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("634");

            Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            TsLog.LogWarning("!!!!!!!!!!!!!!!!! Reward - Reward Not", new object[0]);
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.TREASUREBOX_DLG);
        }
        else if (Nfy.i32Result == 0)
        {
            this.SetRewardButton(true);
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697");

            string text2 = string.Empty;
            for (int i = 0; i < 5; i++)
            {
                if (Nfy.i32ItemUnique[i] > 0 && i == 0)
                {
                    text = string.Empty;
                    UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(Nfy.i32ItemUnique[i]);

                    this.m_DT_ItemIcon.SetTexture(itemTexture);
                    text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(Nfy.i32ItemUnique[i]);

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        textFromInterface,
                        "itemname",
                        text2,
                        "count",
                        Nfy.i32ItemNum[i]
                    });

                    this.m_Label_Item.SetText(text);
                    NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_ANCIENTTREASURE_UI", this.m_DT_ItemIcon, this.m_DT_ItemIcon.GetSize());
                }
            }
        }
        else
        {
            this.SetRewardButton(false);
            TsLog.LogWarning("!!!!!!!!!!!!!!!!! Reward - Error {0}", new object[]
            {
                Nfy.i32Result
            });
        }
    }
Beispiel #20
0
    public void OnClickMilitaryBatch(IUIObject obj)
    {
        string text    = string.Empty;
        string message = string.Empty;
        MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = obj.Data as MINE_GUILD_CURRENTSTATUS_INFO;

        if (mINE_GUILD_CURRENTSTATUS_INFO != null)
        {
            if (mINE_GUILD_CURRENTSTATUS_INFO.i64MineID <= 0L)
            {
                return;
            }
            if (0L >= NrTSingleton <NewGuildManager> .Instance.GetGuildID())
            {
                return;
            }
            NrMyCharInfo   kMyCharInfo            = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
            NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(kMyCharInfo.m_PersonID);

            if (memberInfoFromPersonID == null)
            {
                return;
            }
            if (memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE)
            {
                message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("532");

                Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            MINE_CREATE_DATA mineCreateDataFromID = BASE_MINE_CREATE_DATA.GetMineCreateDataFromID(mINE_GUILD_CURRENTSTATUS_INFO.i16MineDataID);
            if (mineCreateDataFromID == null)
            {
                return;
            }
            MINE_DATA mineDataFromGrade = BASE_MINE_DATA.GetMineDataFromGrade(BASE_MINE_DATA.ParseGradeFromString(mineCreateDataFromID.MINE_GRADE));
            if (kMyCharInfo.GetLevel() < (int)mineDataFromGrade.POSSIBLELEVEL)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("408");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
                {
                    text,
                    "count",
                    mineDataFromGrade.POSSIBLELEVEL
                });

                Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            byte nMode    = 0;
            long nGuildID = 0L;
            if (mINE_GUILD_CURRENTSTATUS_INFO.i64DefenceGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID())
            {
                nMode    = 2;
                nGuildID = mINE_GUILD_CURRENTSTATUS_INFO.i64DefenceGuildID;
            }
            else if (mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID() || mINE_GUILD_CURRENTSTATUS_INFO.i64DefenceGuildID > 0L)
            {
                nMode    = 4;
                nGuildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID();
            }
            GS_MINE_SEARCH_REQ gS_MINE_SEARCH_REQ = new GS_MINE_SEARCH_REQ();
            gS_MINE_SEARCH_REQ.bSearchMineGrade = mineCreateDataFromID.nMine_Grade;
            gS_MINE_SEARCH_REQ.m_nMineID        = mINE_GUILD_CURRENTSTATUS_INFO.i64MineID;
            gS_MINE_SEARCH_REQ.m_nGuildID       = nGuildID;
            gS_MINE_SEARCH_REQ.m_nMode          = nMode;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MINE_SEARCH_REQ, gS_MINE_SEARCH_REQ);
        }
    }
    private void OnStartMatch(object a_oObject)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_DELAYTIME);
        long curTime     = PublicMethod.GetCurTime();
        long num         = charSubData - curTime;

        if (num > 0L)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("136"),
                "timestring",
                PublicMethod.ConvertTime(num)
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        GS_PLUNDER_BATTLE_START_REQ gS_PLUNDER_BATTLE_START_REQ = new GS_PLUNDER_BATTLE_START_REQ();
        int           num2        = 0;
        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

        if (soldierList == null)
        {
            return;
        }
        NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            if (nkSoldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS) > 0L)
            {
                gS_PLUNDER_BATTLE_START_REQ.m_nSolID[num2]      = nkSoldierInfo.GetSolID();
                gS_PLUNDER_BATTLE_START_REQ.m_nSolSubData[num2] = nkSoldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS);
                num2++;
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return;
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS) > 0L)
            {
                gS_PLUNDER_BATTLE_START_REQ.m_nSolID[num2]      = current.GetSolID();
                gS_PLUNDER_BATTLE_START_REQ.m_nSolSubData[num2] = current.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS);
                num2++;
            }
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_BATTLE_START_REQ, gS_PLUNDER_BATTLE_START_REQ);
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.PLUNDERSOLLIST_DLG))
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.PLUNDERSOLLIST_DLG);
        }
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
    }
Beispiel #22
0
    public void OnClickSend(IUIObject obj)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        long nChatBlockDate = NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nChatBlockDate;

        if (0L < nChatBlockDate && PublicMethod.GetCurTime() <= nChatBlockDate)
        {
            DateTime dueDate        = PublicMethod.GetDueDate(nChatBlockDate);
            string   textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("312");

            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromNotify,
                "day",
                dueDate.Day,
                "hour",
                dueDate.Hour,
                "min",
                dueDate.Minute
            });

            CHAT_TYPE selectTab = this.m_SelectTab;
            NrTSingleton <ChatManager> .Instance.MakeChatText(this, selectTab, kMyCharInfo.ColosseumGrade, empty, null);

            this._tfInput.ClearText();
            return;
        }
        if (this._tfInput.Text.Length <= 0)
        {
            this._tfInput.ClearText();
            return;
        }
        if (this._tfInput.Text.Equals(this._tfInput.GetDefaultText()))
        {
            return;
        }
        string text = this.ConvertLinkText(this._tfInput.Text);

        if (text.Contains("[#"))
        {
            text = text.Replace("[#", " ");
        }
        if (text.Contains("RGBA("))
        {
            text = text.Replace("RGBA(", " ");
        }
        if (!NrTSingleton <ChatManager> .Instance.ProcessClientCommand(text, ref this._clChat))
        {
            CHAT_TYPE cHAT_TYPE = this.m_SelectTab;
            if (cHAT_TYPE == CHAT_TYPE.PARTY)
            {
                cHAT_TYPE = CHAT_TYPE.SYSTEM;
            }
            NrTSingleton <ChatManager> .Instance.SendMessage(cHAT_TYPE, text, this.useItemLinkText, this.linkItem, 0, 0L, 0);

            NrTSingleton <ChatManager> .Instance.MakeChatText(this, cHAT_TYPE, kMyCharInfo.ColosseumGrade, text, this.linkItem);
        }
        string text2 = string.Empty;

        if ("true" == MsgHandler.HandleReturn <string>("ReservedWordManagerIsUse", new object[0]))
        {
            text2 = MsgHandler.HandleReturn <string>("ReservedWordManagerReplaceWord", new object[]
            {
                text
            });
        }
        if (text2.Contains("*"))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("797"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
        this._tfInput.ClearText();
        this.useItemLinkText = false;
        this.bIsSetLinkItem  = false;
        this.linkItem        = null;
        this._tfInput.SetDefaultText(string.Empty);
        this._Default.Visible = true;
    }
    public void OnClickReady(IUIObject obj)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        if (!SoldierBatch.BABELTOWER_INFO.IsReadyBattle(charPersonInfo.GetPersonID()))
        {
            if (!SoldierBatch.SOLDIERBATCH.IsHeroBabelBatch())
            {
                string     empty = string.Empty;
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                    "charname",
                    @char.GetCharName()
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();
            if (SoldierBatch.BABELTOWER_INFO.Count <= 0)
            {
                SoldierBatch.BABELTOWER_INFO.Count = 1;
            }
            byte count = SoldierBatch.BABELTOWER_INFO.Count;
            int  num;
            if (count == 1)
            {
                num = (int)(12 / count);
            }
            else
            {
                num = (int)(12 / count + 1);
            }
            if (solBatchNum < num)
            {
                string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("21");

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

                string empty2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                {
                    textFromMessageBox2,
                    "currentnum",
                    solBatchNum,
                    "maxnum",
                    num
                });

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

                msgBoxUI.SetMsg(new YesDelegate(this.OnReadyBabel), null, textFromMessageBox, empty2, eMsgType.MB_OK_CANCEL, 2);
                return;
            }
        }
        this.OnReadyBabel(null);
    }
Beispiel #24
0
    public void OnBtnClickSearch(IUIObject obj)
    {
        string       title       = string.Empty;
        string       text        = string.Empty;
        string       message     = string.Empty;
        byte         b           = (byte)obj.Data;
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo.GetMilitaryList().FindEmptyMineMilitaryIndex() == -1)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("691");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        MINE_DATA      mineDataFromGrade      = BASE_MINE_DATA.GetMineDataFromGrade(b);
        NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(kMyCharInfo.m_PersonID);

        if (memberInfoFromPersonID == null)
        {
            return;
        }
        if (memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("532");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (mineDataFromGrade.MINE_SEARCH_MONEY > kMyCharInfo.m_Money)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (kMyCharInfo.GetLevel() < (int)mineDataFromGrade.POSSIBLELEVEL)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("272");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
            {
                text,
                "count",
                mineDataFromGrade.POSSIBLELEVEL,
                "targetname",
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(mineDataFromGrade.MINE_INTERFACEKEY)
            });

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (!NrTSingleton <MineManager> .Instance.IsEnoughMineJoinCount())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("405"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsValidMineGrade(b))
        {
            return;
        }
        title = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1316");

        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("128");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
        {
            text,
            "count",
            mineDataFromGrade.MINE_SEARCH_MONEY,
            "targetname1",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(mineDataFromGrade.MINE_INTERFACEKEY),
            "targetname2",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(mineDataFromGrade.MINE_GRADE_INTERFACEKEY)
        });

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

        msgBoxUI.SetMsg(new YesDelegate(this.OnSearch), b, title, message, eMsgType.MB_OK_CANCEL, 2);
    }
 public void OnClickRankReward(IUIObject obj)
 {
     Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("608"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
 }
Beispiel #26
0
    private void GridInputMouse()
    {
        if (this.m_Battle.CastedTarget == null)
        {
            return;
        }
        if (this.m_Battle.CastedTarget.InputControlTrigger)
        {
            return;
        }
        if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm())
        {
            return;
        }
        if (!this.m_Battle.CastedTarget.IsEnableMouseInput())
        {
            return;
        }
        NmBattleGrid nmBattleGrid   = null;
        bool         mouseButtonUp  = NkInputManager.GetMouseButtonUp(0);
        bool         mouseButtonUp2 = NkInputManager.GetMouseButtonUp(1);

        if (NkRaycast.Raycast(this.mc_kBattlePickLayer))
        {
            GameObject gameObject = NkRaycast.HIT.transform.gameObject;
            if (null != gameObject)
            {
                nmBattleGrid = gameObject.GetComponent <NmBattleGrid>();
                if (null != nmBattleGrid)
                {
                    eBATTLE_ALLY aLLY           = nmBattleGrid.ALLY;
                    short        sTARTPOS_INDEX = nmBattleGrid.STARTPOS_INDEX;
                    int          iNDEX          = nmBattleGrid.INDEX;
                    short        bUID           = nmBattleGrid.BUID;
                    NkBattleChar charByBUID     = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(bUID);

                    Vector3          pOINT            = NkRaycast.POINT;
                    BATTLESKILL_BASE bATTLESKILL_BASE = null;
                    int num = 0;
                    if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
                    {
                        NkBattleChar nkBattleChar = this.m_Battle.CastedTarget.SelectBattleSkillChar();
                        if (nkBattleChar == null)
                        {
                            return;
                        }
                        int skillUnique = nkBattleChar.GetSoldierInfo().SelectBattleSkillByWeapon(this.m_Battle.CastedTarget.m_iBattleSkillIndex);
                        bATTLESKILL_BASE = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique);

                        if (bATTLESKILL_BASE == null)
                        {
                            return;
                        }
                        this.m_Battle.CastedTarget.GRID_MANAGER.SetSelectBattleSkillGrid();
                        if (bATTLESKILL_BASE.m_nSkillTargetType == 1 || bATTLESKILL_BASE.m_nSkillTargetType == 2)
                        {
                            num = 1;
                        }
                        else if (bATTLESKILL_BASE.m_nSkillTargetType == 3)
                        {
                            num = 2;
                        }
                        else if (bATTLESKILL_BASE.m_nSkillTargetType == 4)
                        {
                            num = 3;
                        }
                    }
                    if (this.m_Battle.CastedTarget.MyAlly != aLLY)
                    {
                        if (bATTLESKILL_BASE != null)
                        {
                            if ((num == 2 || num == 3) && bUID >= 0)
                            {
                                this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                            }
                        }
                        if (mouseButtonUp)
                        {
                            if (this.m_Battle.CastedTarget.IsEmotionSet)
                            {
                                this.m_Battle.CastedTarget.Send_GS_BATTLE_EMOTICON_REQ(bUID);
                            }
                            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_ATTACK_LAND)
                            {
                                this.m_Battle.CastedTarget.Send_AttackLand_Order(pOINT);
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
                            {
                                if (num == 2 || num == 3)
                                {
                                    this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                                    this.m_Battle.CastedTarget.Send_BattleSkill_Order(this.m_Battle.CastedTarget.m_iBattleSkillIndex, this.m_Battle.CastedTarget.SelectBattleSkillChar(), charByBUID, pOINT, (short)iNDEX);
                                    this.m_Battle.CastedTarget.Init_BattleSkill_Input(false);
                                    this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                                }
                                else
                                {
                                    Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("578"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
                                }
                            }
                            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SEARCH)
                            {
                                NkBattleChar currentSelectChar = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                                if (currentSelectChar != null)
                                {
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else
                            {
                                if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_PLUNDER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_INFINITY)
                                {
                                    if (Battle.BATTLE.GetCheckTargetBt() && charByBUID != null && charByBUID.GetSoldierInfo().GetHP() > 0 && charByBUID.GetCharKindInfo().GetCharKind() != 916)
                                    {
                                        Battle.BATTLE.Send_GS_BATTLE_PLUNDER_AGGROADD_REQ(charByBUID.GetBUID());
                                        Battle.BATTLE.ClickCheckTargetBt();
                                        Battle.BATTLE.SetTargetBtDisCount();
                                        NrTSingleton <NkEffectManager> .Instance.AddEffect("FX_ATTACK_TARGET", charByBUID);
                                    }
                                }
                                else
                                {
                                    NkBattleChar currentSelectChar2 = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                                    if (currentSelectChar2 != null && charByBUID != null)
                                    {
                                        this.m_Battle.CastedTarget.GRID_MANAGER.ActiveAttack(aLLY, sTARTPOS_INDEX, iNDEX, charByBUID);
                                        if (charByBUID.GetSoldierInfo().GetHP() > 0)
                                        {
                                            currentSelectChar2.OrderAttackReq(charByBUID, (short)iNDEX, nmBattleGrid.GetCenter());
                                        }
                                    }
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                        }
                    }
                    else
                    {
                        if (bATTLESKILL_BASE != null && (num == 1 || num == 3) && bUID >= 0)
                        {
                            this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                        }
                        if (mouseButtonUp)
                        {
                            if (this.m_Battle.CastedTarget.IsEmotionSet)
                            {
                                this.m_Battle.CastedTarget.Send_GS_BATTLE_EMOTICON_REQ(bUID);
                            }
                            else if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
                            {
                                if (num == 1 || num == 3)
                                {
                                    this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                                    this.m_Battle.CastedTarget.Send_BattleSkill_Order(this.m_Battle.CastedTarget.m_iBattleSkillIndex, this.m_Battle.CastedTarget.SelectBattleSkillChar(), charByBUID, pOINT, (short)iNDEX);
                                    this.m_Battle.CastedTarget.Init_BattleSkill_Input(false);
                                    this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                                }
                            }
                            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS)
                            {
                                NkBattleChar currentSelectChar3 = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                                if (currentSelectChar3 != null)
                                {
                                    int num2 = currentSelectChar3.OrderChangePosReq(sTARTPOS_INDEX, (short)iNDEX);
                                    if (num2 < 0)
                                    {
                                        if (num2 < -1)
                                        {
                                            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("176"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                                        }
                                        else
                                        {
                                            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("404"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
                                        }
                                    }
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else if (charByBUID != null)
                            {
                                if (charByBUID.GetTurnState() == eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_ENABLE)
                                {
                                    this.m_Battle.CastedTarget.SelectCharacter(bUID);
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else
                            {
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                        }
                        else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS)
                        {
                            NkBattleChar currentSelectChar4 = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                            if (currentSelectChar4 != null)
                            {
                                this.m_Battle.CastedTarget.GRID_MANAGER.ActiveChangePos(nmBattleGrid.ALLY, nmBattleGrid.STARTPOS_INDEX, currentSelectChar4.GetBUID(), (short)iNDEX);
                            }
                        }
                        else
                        {
                            this.m_Battle.CastedTarget.GRID_MANAGER.SetOver(nmBattleGrid);
                        }
                    }
                }
            }
        }
        if (mouseButtonUp2)
        {
            if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS)
            {
                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("402"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            }
            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
            {
                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                this.m_Battle.CastedTarget.Init_BattleSkill_Input(true);
            }
        }
        if (null == nmBattleGrid)
        {
            this.m_Battle.CastedTarget.GRID_MANAGER.SetOver(null);
            if (this.m_Battle.CastedTarget.m_iBattleSkillIndex < 0 && this.m_Battle.CastedTarget.REQUEST_ORDER != eBATTLE_ORDER.eBATTLE_ORDER_SKILL && this.m_Battle.CastedTarget.GetCurrentSelectChar() == null)
            {
                this.m_Battle.CastedTarget.GRID_MANAGER.InitAll();
            }
        }
    }