Ejemplo n.º 1
0
    private void RefreshBabelChatInfo()
    {
        string text  = string.Empty;
        string empty = string.Empty;

        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("833");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            text,
            "floor",
            SoldierBatch.BABELTOWER_INFO.m_nBabelFloor,
            "subfloor",
            (int)(SoldierBatch.BABELTOWER_INFO.m_nBabelSubFloor + 1)
        });

        this.m_lTitle.SetText(empty);
        for (int i = 0; i < this.MAX_USER_COUNT; i++)
        {
            BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(i);
            if (babelPersonInfo != null && babelPersonInfo.nPartyPersonID != 0L)
            {
                this.user_info[i].Show(true);
                this.user_info[i].m_lCharName0.Text    = babelPersonInfo.strCharName.ToString();
                this.user_info[i].m_lCharName0.Visible = true;
                this.user_info[i].m_itUserImage0.SetSolImageTexure(eCharImageType.SMALL, babelPersonInfo.nCharKind, -1);
                this.user_info[i].m_itUserImage0.Visible = true;
            }
        }
    }
    public void RefreshPossibleLevel()
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        BABELTOWER_PERSON babelLeaderInfo = SoldierBatch.BABELTOWER_INFO.GetBabelLeaderInfo();

        if (babelLeaderInfo == null || @char.GetPersonID() == babelLeaderInfo.nPartyPersonID)
        {
        }
    }
Ejemplo n.º 3
0
 private void SetLayerBabelPerson()
 {
     for (int i = 0; i < this.MAX_USER_COUNT; i++)
     {
         BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(i);
         if (babelPersonInfo.nPartyPersonID > 0L)
         {
             base.SetShowLayer(i + 1, true);
         }
         else
         {
             base.SetShowLayer(i + 1, false);
         }
     }
 }
    public void RefreshSolCount()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        BABELTOWER_PERSON babelLeaderInfo = SoldierBatch.BABELTOWER_INFO.GetBabelLeaderInfo();
        int num = (int)SoldierBatch.BABELTOWER_INFO.Count;

        if (num <= 0)
        {
            num = 1;
        }
        int num2;

        if (num == 1)
        {
            num2 = 12;
        }
        else
        {
            num2 = 12 / num + 1;
        }
        for (int i = 0; i < 4; i++)
        {
            if (this.user_info[i].PersonID > 0L)
            {
                this.user_info[i].m_laUserSolNum.SetText(SoldierBatch.SOLDIERBATCH.GetBabelTowerSolCount(this.user_info[i].PersonID).ToString() + "/" + num2.ToString());
            }
        }
        if (charPersonInfo.GetPersonID() != babelLeaderInfo.nPartyPersonID)
        {
            if (!SoldierBatch.BABELTOWER_INFO.IsReadyBattle(charPersonInfo.GetPersonID()) && SoldierBatch.SOLDIERBATCH.GetBabelTowerSolCount(charPersonInfo.GetPersonID()) == num2)
            {
                if (this.m_StartEffect == null)
                {
                }
            }
            else if (this.m_StartEffect != null)
            {
                UnityEngine.Object.DestroyImmediate(this.m_StartEffect);
            }
        }
    }
 public void SetWaitingLock(bool bShow)
 {
     for (int i = 0; i < 4; i++)
     {
         if (i != 0)
         {
             BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(i);
             if (babelPersonInfo != null)
             {
                 if (babelPersonInfo.nPartyPersonID > 0L)
                 {
                     this.user_info[i].SetLoadingState(bShow);
                 }
             }
         }
     }
 }
    private void OnStartBabel(object a_oObject)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        GS_BABELTOWER_START_REQ gS_BABELTOWER_START_REQ = new GS_BABELTOWER_START_REQ();

        gS_BABELTOWER_START_REQ.nCombinationUnique = NrTSingleton <SolCombination_BatchSelectInfoManager> .Instance.GetUserSelectedUniqeKey(0);

        gS_BABELTOWER_START_REQ.nBabelRoomIndex = SoldierBatch.BABELTOWER_INFO.m_nBabelRoomIndex;
        gS_BABELTOWER_START_REQ.nPersonID       = charPersonInfo.GetPersonID();
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BABELTOWER_START_REQ, gS_BABELTOWER_START_REQ);
        NrTSingleton <FiveRocksEventManager> .Instance.BabelTowerParty((int)SoldierBatch.BABELTOWER_INFO.GetPartyCount());

        if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique)
        {
            if (SoldierBatch.BABELTOWER_INFO.m_nBabelFloorType == 2)
            {
                PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELFLOOR_HARD, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelFloor);
                PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELSUBFLOOR_HARD, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelSubFloor);
            }
            else
            {
                PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELFLOOR, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelFloor);
                PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELSUBFLOOR, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelSubFloor);
            }
            PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELTYPE, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelFloorType);
        }
        for (int i = 0; i < 4; i++)
        {
            BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(i);
            if (babelPersonInfo == null || (babelPersonInfo.nPartyPersonID != charPersonInfo.GetPersonID() && babelPersonInfo.nPartyPersonID > 0L))
            {
                PlayerPrefs.SetString("Babel JoinPlayer" + i, babelPersonInfo.nPartyPersonID.ToString());
                if (0 < SoldierBatch.BABELTOWER_INFO.BountHuntUnique)
                {
                    PlayerPrefs.SetString("BountyHunt JoinPlayer" + i, babelPersonInfo.nPartyPersonID.ToString());
                }
            }
        }
    }
    public void SetLayer()
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        for (int i = 0; i < 5; i++)
        {
            base.SetShowLayer(i, false);
        }
        base.SetShowLayer(0, true);
        BABELTOWER_PERSON babelLeaderInfo = SoldierBatch.BABELTOWER_INFO.GetBabelLeaderInfo();

        if (babelLeaderInfo != null)
        {
            if (@char.GetPersonID() == babelLeaderInfo.nPartyPersonID)
            {
                this.m_btStart.Hide(false);
                this.m_btReady.Hide(true);
            }
            else
            {
                this.m_btStart.Hide(true);
                this.m_btReady.Hide(false);
            }
        }
        for (int j = 0; j < 4; j++)
        {
            if (j != 0)
            {
                BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(j);
                if (babelPersonInfo.nPartyPersonID > 0L)
                {
                    base.SetShowLayer(j + 1, true);
                }
                else
                {
                    base.SetShowLayer(j + 1, false);
                }
            }
        }
    }
    public void OnClickKickUser(IUIObject obj)
    {
        int num = (int)obj.Data;

        if (num >= 4)
        {
            return;
        }
        this.m_nSelectIndex = num;
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char.GetPersonID() == this.user_info[num].PersonID)
        {
            SoldierBatch.BABELTOWER_INFO.Init();
            NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage();

            this.OnKickOutUser(null);
            return;
        }
        string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("72");

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

        string            empty           = string.Empty;
        BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(num);

        if (babelPersonInfo != null)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromMessageBox2,
                "targetname",
                babelPersonInfo.strCharName
            });
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.OnKickOutUser), null, textFromMessageBox, empty, eMsgType.MB_OK_CANCEL, 2);
    }
    public void OnClickInviteFriend(IUIObject obj)
    {
        bool flag = false;

        for (int i = 0; i < 4; i++)
        {
            BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(i);
            if (babelPersonInfo.nPartyPersonID <= 0L && babelPersonInfo.nPartyPersonID != SoldierBatch.BABELTOWER_INFO.m_nLeaderPersonID)
            {
                flag = true;
                if (babelPersonInfo.nSlotType == 0)
                {
                    BabelLobbyUserListDlg babelLobbyUserListDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BABELTOWERUSERLIST_DLG) as BabelLobbyUserListDlg;

                    if (babelLobbyUserListDlg != null)
                    {
                        babelLobbyUserListDlg.SetSlotIndex(i, 1);
                        GS_BABELTOWER_CHANGE_SLOTTYPE_REQ gS_BABELTOWER_CHANGE_SLOTTYPE_REQ = new GS_BABELTOWER_CHANGE_SLOTTYPE_REQ();
                        gS_BABELTOWER_CHANGE_SLOTTYPE_REQ.pos             = i;
                        gS_BABELTOWER_CHANGE_SLOTTYPE_REQ.nBabelRoomIndex = SoldierBatch.BABELTOWER_INFO.m_nBabelRoomIndex;
                        gS_BABELTOWER_CHANGE_SLOTTYPE_REQ.change_type     = 1;
                        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BABELTOWER_CHANGE_SLOTTYPE_REQ, gS_BABELTOWER_CHANGE_SLOTTYPE_REQ);
                    }
                }
                break;
            }
        }
        if (flag)
        {
            NrTSingleton <NewGuildManager> .Instance.Send_GS_NEWGUILD_INFO_REQ(0);
        }
        else
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("306"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
    }
    public override void SetComponent()
    {
        this.m_btInvite       = (base.GetControl("BT_InviteAlly") as Button);
        this.m_btInvite.Click = new EZValueChangedDelegate(this.OnClickInviteFriend);
        this.m_btInvite.Hide(true);
        this.m_btInvite.EffectAni = false;
        this.m_btInitiative       = (base.GetControl("BT_Initiative") as Button);
        Button expr_61 = this.m_btInitiative;

        expr_61.Click = (EZValueChangedDelegate)Delegate.Combine(expr_61.Click, new EZValueChangedDelegate(this.OnClickSetInitiative));
        this.m_btInitiative.EffectAni = false;
        this.m_btChat      = (base.GetControl("BT_Chat") as Button);
        this.m_btChat.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1922");

        Button expr_C4 = this.m_btChat;

        expr_C4.Click           = (EZValueChangedDelegate)Delegate.Combine(expr_C4.Click, new EZValueChangedDelegate(this.ChatDlg));
        this.m_bChatNew         = (base.GetControl("Box_New") as Box);
        this.m_bChatNew.Visible = false;
        this.m_lbChat           = (base.GetControl("Label_Chat") as Label);
        this.m_lbInvite         = (base.GetControl("Label_InviteAlly") as Label);
        this.m_lbInitiative     = (base.GetControl("Label_Initiative") as Label);
        this.tf_chat            = (base.GetControl("TF_Chat") as TextField);
        this.tf_chat.SetCommitDelegate(new EZKeyboardCommitDelegate(this.OnInputText));
        this.tf_chat.Visible = false;
        this.m_btAuto        = (base.GetControl("BT_AUTO") as Button);
        this.m_btAuto.Click  = new EZValueChangedDelegate(this.ClickAutoBattleCheck);
        this.m_dtAuto        = (base.GetControl("DT_AUTO") as DrawTexture);
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MYTHRAID)
        {
            this.tf_chat.Visible = true;
            MYTHRAID_PERSON mythRaidLeaderInfo = SoldierBatch.MYTHRAID_INFO.GetMythRaidLeaderInfo();
            if (mythRaidLeaderInfo != null)
            {
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (@char.GetPersonID() == mythRaidLeaderInfo.nPartyPersonID)
                {
                    this.m_btInvite.Click = new EZValueChangedDelegate(this.OnClickInviteFriend_MythRaid);
                    this.m_btInvite.Hide(false);
                }
                else
                {
                    this.m_btInvite.Hide(false);
                    this.m_btInvite.SetEnabled(false);
                }
            }
        }
        else
        {
            BABELTOWER_PERSON babelLeaderInfo = SoldierBatch.BABELTOWER_INFO.GetBabelLeaderInfo();
            if (babelLeaderInfo != null)
            {
                NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (char2.GetPersonID() == babelLeaderInfo.nPartyPersonID)
                {
                    this.m_btInvite.Hide(false);
                }
                else
                {
                    this.m_btInvite.Hide(false);
                    this.m_btInvite.SetEnabled(false);
                }
            }
        }
        PlunderSolListDlg plunderSolListDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.PLUNDERSOLLIST_DLG) as PlunderSolListDlg;

        if (plunderSolListDlg != null)
        {
            base.SetLocation(plunderSolListDlg.GetLocationX() + plunderSolListDlg.GetSizeX(), -(GUICamera.height - base.GetSizeY()), base.GetLocation().z);
        }
        base.DonotDepthChange(1005f);
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_GUILDBOSS_MAKEUP)
        {
            this.m_btChat.Visible   = false;
            this.m_lbChat.Visible   = false;
            this.m_btInvite.Visible = false;
            this.m_lbInvite.Visible = false;
        }
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        if (kMyCharInfo.GetAutoBattle() == E_BF_AUTO_TYPE.AUTO)
        {
            this.isAutoOn = true;
        }
        else
        {
            this.isAutoOn = false;
        }
        this.SetAutoBattleTexture(this.isAutoOn);
    }
Ejemplo n.º 11
0
    public void RefreshSolInfo()
    {
        for (int i = 0; i < 4; i++)
        {
            this.user_info[i].Init();
        }
        this.SetLayer();
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        string text  = string.Empty;
        string text2 = string.Empty;

        if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique)
        {
            if (SoldierBatch.BABELTOWER_INFO.m_nBabelFloorType == 2)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2787");
            }
            else
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("833");
            }
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "floor",
                SoldierBatch.BABELTOWER_INFO.m_nBabelFloor,
                "subfloor",
                (int)(SoldierBatch.BABELTOWER_INFO.m_nBabelSubFloor + 1)
            });
        }
        else
        {
            BountyInfoData bountyInfoDataFromUnique = NrTSingleton <BountyHuntManager> .Instance.GetBountyInfoDataFromUnique(SoldierBatch.BABELTOWER_INFO.BountHuntUnique);

            if (bountyInfoDataFromUnique != null)
            {
                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(bountyInfoDataFromUnique.i32WeekTitleKey.ToString());
            }
        }
        PlunderSolNumDlg plunderSolNumDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.PLUNDERSOLNUM_DLG) as PlunderSolNumDlg;

        if (plunderSolNumDlg != null)
        {
            plunderSolNumDlg.SetTitle(text2);
        }
        BABELTOWER_PERSON babelLeaderInfo = SoldierBatch.BABELTOWER_INFO.GetBabelLeaderInfo();

        if (babelLeaderInfo != null)
        {
            this.user_info[0].Show(true);
            this.user_info[0].PersonID = babelLeaderInfo.nPartyPersonID;
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "count",
                babelLeaderInfo.nLevel.ToString(),
                "targetname",
                babelLeaderInfo.strCharName
            });

            this.user_info[0].m_laUserName.SetText(text2);
            for (int j = 0; j < 4; j++)
            {
                if (j != 0)
                {
                    BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(j);
                    if (babelPersonInfo != null)
                    {
                        if (babelPersonInfo.nPartyPersonID > 0L)
                        {
                            this.m_ddlSlotType[j].SetVisible(false);
                            this.user_info[j].Show(true);
                            this.user_info[j].PersonID = babelPersonInfo.nPartyPersonID;
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                            {
                                text,
                                "count",
                                babelPersonInfo.nLevel.ToString(),
                                "targetname",
                                babelPersonInfo.strCharName
                            });

                            this.user_info[j].m_laUserName.SetText(text2);
                            this.user_info[j].m_dtReady.Visible = babelPersonInfo.bReady;
                            if (babelPersonInfo.bReady)
                            {
                                this.user_info[j].m_laReady.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("662");
                            }
                            else
                            {
                                this.user_info[j].m_laReady.Text = string.Empty;
                            }
                            if (@char.GetPersonID() == babelLeaderInfo.nPartyPersonID || @char.GetPersonID() == babelPersonInfo.nPartyPersonID)
                            {
                                this.user_info[j].m_btKickUser.Data = j;
                                this.user_info[j].m_btKickUser.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickKickUser));
                            }
                            else
                            {
                                this.user_info[j].m_btKickUser.Visible = false;
                            }
                        }
                        else
                        {
                            this.user_info[j].Show(false);
                            if (@char.GetPersonID() == babelLeaderInfo.nPartyPersonID)
                            {
                                this.user_info[j].SetSlotState(false, 0);
                                this.m_ddlSlotType[j].SetVisible(true);
                            }
                            else
                            {
                                this.user_info[j].SetSlotState(true, (int)babelPersonInfo.nSlotType);
                                this.m_ddlSlotType[j].SetVisible(false);
                            }
                        }
                    }
                }
            }
        }
        if (@char.GetPersonID() == babelLeaderInfo.nPartyPersonID)
        {
            if (SoldierBatch.BABELTOWER_INFO.IsCanBattle())
            {
                if (this.m_StartEffect == null)
                {
                }
            }
            else if (this.m_StartEffect != null)
            {
                UnityEngine.Object.DestroyImmediate(this.m_StartEffect);
            }
        }
        this.RefreshSolCount();
        this.RefreshPossibleLevel();
        if (!base.Visible)
        {
            this.Show();
        }
    }