Exemple #1
0
    public string GetTextGreeting(NrCharKindInfo kChar)
    {
        string strTextKey = string.Empty;
        int    charKind   = kChar.GetCharKind();

        if (kChar.IsATB(18014398509481984L))
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            long           personID = charPersonInfo.GetPersonID();
            NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(personID);

            if (memberInfoFromPersonID == null || memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE)
            {
                if (memberInfoFromPersonID == null)
                {
                    NrTSingleton <NewGuildManager> .Instance.Send_GS_NEWGUILD_INFO_REQ(0);
                }
                strTextKey = this.m_dicNPC[charKind].GetExceptionTalkTextKey();
                return(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo(strTextKey));
            }
        }
        strTextKey = kChar.GetCHARKIND_NPCINFO().GetTextGreeting();
        return(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo(strTextKey));
    }
    public void ShowMilitarySolInfo()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1410"),
            "targetname",
            charPersonInfo.GetCharName()
        });

        this.m_lTitle.SetText(empty);
        foreach (KeyValuePair <int, MINE_MILITARY_USER_SOLINFO> current in SoldierBatch.MINE_INFO.GetUser_SolList())
        {
            MINE_MILITARY_USER_SOLINFO value = current.Value;
            byte ui8BatchIndex = value.ui8BatchIndex;
            this.m_itOccMilitary[(int)ui8BatchIndex].Visible = true;
            this.m_btOccMilitary[(int)ui8BatchIndex].Visible = true;
            this.m_itOccMilitary[(int)ui8BatchIndex].SetSolImageTexure(eCharImageType.SMALL, value.mine_solinfo[0].i32Kind, (int)value.mine_solinfo[0].ui8Grade);
            this.m_btOccMilitary[(int)ui8BatchIndex].Data = current;
            Button expr_EF = this.m_btOccMilitary[(int)ui8BatchIndex];
            expr_EF.Click = (EZValueChangedDelegate)Delegate.Combine(expr_EF.Click, new EZValueChangedDelegate(this.ClickOccupyDetailInfo));
        }
        this.Show();
    }
    public bool SetMythRaidReadyState()
    {
        bool             flag           = false;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(flag);
        }
        if (SoldierBatch.MYTHRAID_INFO.IsMythRaidLeader(charPersonInfo.GetPersonID()))
        {
            return(flag);
        }
        if (!SoldierBatch.MYTHRAID_INFO.IsReadyBattle(charPersonInfo.GetPersonID()))
        {
            flag = true;
        }
        string text = string.Empty;

        if (flag)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("685");
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("662");
        }
        this.m_btReady.SetText(text);
        return(flag);
    }
    public bool IsChangeChar(E_CHAR_TRIBE eCharTribe)
    {
        if (this.m_lNeedMoney > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

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

        if (changeCharKindFormIndex == leaderSoldierInfo.GetCharKind())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("212"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (leaderSoldierInfo.IsEquipItem())
        {
            CharChangeMainDlg.ShowMessageBoxEquipItem();
            return(false);
        }
        return(true);
    }
    public void ClickbuSolButton(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        int num = (int)obj.Data;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

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

        if (solMilitaryGroupDlg != null)
        {
            solMilitaryGroupDlg.SetSoldierSelectByBattle(num);
        }
    }
Exemple #6
0
    public override string GetGameGuideText()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

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

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

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

        if (charPersonInfo == null)
        {
            return;
        }
        for (int j = 0; j < 6; j++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(j);
            if (soldierInfo != null && soldierInfo.IsValid())
            {
                this.m_kBattlePosSolList[(int)soldierInfo.GetSolPosIndex()].Set(soldierInfo);
            }
        }
    }
Exemple #8
0
    public bool FindSolInfo(int i32CharKind)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return(false);
        }
        NrSoldierList  soldierList  = charPersonInfo.GetSoldierList();
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = soldierList.GetSoldierInfo(i);
            if (soldierInfo != null && soldierInfo.IsValid())
            {
                if (soldierInfo.GetCharKind() == i32CharKind)
                {
                    return(true);
                }
            }
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current != null && current.IsValid())
            {
                if (current.GetCharKind() == i32CharKind)
                {
                    return(true);
                }
            }
        }
        return(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetWarehouseSolList().GetSolWarehouseCharKind(i32CharKind));
    }
    public void SetListFriendRank()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        long         charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MATCHPOINT);
        UI_RANKINFO  item        = new UI_RANKINFO(charPersonInfo.GetCharName(), (byte)charPersonInfo.GetLevel(0L), charSubData);

        this.ListRankInfo.Add(item);
        this.ListRankInfo.Sort(new Comparison <UI_RANKINFO>(PlunderRankInfoDlg.CompareMatchPoint));
        int num = 1;

        foreach (UI_RANKINFO current in this.ListRankInfo)
        {
            current.i32Rank = num;
            num++;
        }
        foreach (UI_RANKINFO current2 in this.ListRankInfo)
        {
            if (current2.Charname == charPersonInfo.GetCharName())
            {
                this.TargetInfo = current2;
                this.i32NewRank = this.TargetInfo.i32Rank;
                break;
            }
        }
    }
Exemple #10
0
    private void ProcessCharPartInfo(NrCharPartInfo pkCustomPartInfo, bool bChangeBase, bool bChangeEquip)
    {
        NrPersonInfoUser nrPersonInfoUser = base.GetPersonInfo() as NrPersonInfoUser;

        if (bChangeBase)
        {
            nrPersonInfoUser.SetBasePart(pkCustomPartInfo.m_kBasePart);
            this.ChangeBasePart();
        }
        if (bChangeEquip)
        {
            NkSoldierInfo soldierInfo = nrPersonInfoUser.GetSoldierInfo(0);
            if (soldierInfo != null)
            {
                soldierInfo.SetEquipItemInfo(pkCustomPartInfo.m_kEquipPart);
            }
            if (this.m_k3DChar != null)
            {
                this.ChangeEquipItem();
            }
            else
            {
                base.SetChangedItem(true);
            }
        }
    }
Exemple #11
0
    public override void Release()
    {
        NrPersonInfoUser nrPersonInfoUser = this.m_kPersonInfo as NrPersonInfoUser;

        nrPersonInfoUser.m_kSubChar.DeleteSubCharAll3DObject();
        base.Release();
    }
Exemple #12
0
    private void ShowSoldierList()
    {
        this.SoldierList.Clear();
        this.m_ShowList.Clear();
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        int num = 0;

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            if (soldierInfo != null)
            {
                if (soldierInfo.GetSolID() > 0L)
                {
                    SOLDIER_INFO_EXTEND sOLDIER_INFO_EXTEND = this.SetUserData(soldierInfo);
                    if (sOLDIER_INFO_EXTEND != null)
                    {
                        this.SoldierList.Add(sOLDIER_INFO_EXTEND);
                        this.m_ShowList.Add(sOLDIER_INFO_EXTEND);
                    }
                    num++;
                }
            }
        }
        this.m_TotalPage = (num - 1) / SelectItemDlg.NUM_SOLDIERLIST + 1;
        if (this.m_TotalPage <= 0)
        {
            this.m_TotalPage = 1;
        }
        this.ShowList();
    }
    public bool IsCheckGitf(string strCharName)
    {
        if (strCharName.Length == 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (strCharName.Length > 21)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("126"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo.GetCharName().Equals(strCharName))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("712"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (UIDataManager.IsFilterSpecialCharacters(strCharName, NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea()))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        return(true);
    }
Exemple #14
0
    private NkSoldierInfo GetBattleSolDataCheck(ref eElement_MsgType eElement_Msg, int i32CharKind, byte bCharGrade)
    {
        NkSoldierInfo    result         = null;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return(result);
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current != null)
            {
                if (current.GetSolID() != NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetFaceSolID())
                {
                    if (current.GetSolPosType() == 0 && current.GetCharKind() == i32CharKind && current.GetLegendType() == 0 && !current.IsAtbCommonFlag(1L))
                    {
                        this.GetSolGradeCheck(ref result, ref eElement_Msg, current, bCharGrade - 1);
                    }
                }
            }
        }
        return(result);
    }
Exemple #15
0
    public override void Update()
    {
        if (this.m_SetSolID == 0L)
        {
            return;
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

        if (soldierInfoFromSolID == null)
        {
            return;
        }
        if (this.m_SolID == this.m_SetSolID && soldierInfoFromSolID.GetItemUpdateCount() == this.m_UpdateCount)
        {
            return;
        }
        this.m_SolID = this.m_SetSolID;
        this.SetItemList();
    }
    private NkSoldierInfo FindSolInfo(long solID)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return(null);
        }
        NrSoldierList  soldierList  = charPersonInfo.GetSoldierList();
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = soldierList.GetSoldierInfo(i);
            if (soldierInfo != null && soldierInfo.IsValid())
            {
                if (solID == soldierInfo.GetSolID())
                {
                    return(soldierInfo);
                }
            }
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current != null && current.IsValid())
            {
                if (solID == current.GetSolID())
                {
                    return(current);
                }
            }
        }
        return(null);
    }
Exemple #17
0
    public void SetItemList()
    {
        if (this.m_SolID == 0L)
        {
            return;
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

        if (soldierInfoFromSolID == null)
        {
            return;
        }
        this.m_ItemList.Clear();
        SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG);

        for (int i = 0; i < 6; i++)
        {
            ITEM item = soldierInfoFromSolID.GetEquipItemInfo().m_kItem[i].GetItem();
            if (item != null)
            {
                if (item.m_nItemUnique > 0)
                {
                    ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique);

                    if (itemInfo != null)
                    {
                        if (selectItemDlg.DlgType == SelectItemDlg.eType.Enhance && item.m_nRank >= 10)
                        {
                            if (itemInfo == null)
                            {
                                goto IL_12F;
                            }
                            if ((int)soldierInfoFromSolID.GetLevel() < itemInfo.GetUseMinLevel(item))
                            {
                                goto IL_12F;
                            }
                        }
                        if (selectItemDlg.DlgType != SelectItemDlg.eType.Repair || item.m_nDurability < 100)
                        {
                            if (selectItemDlg.DlgType == SelectItemDlg.eType.Dissemblie)
                            {
                            }
                            this.m_ItemList.Add(soldierInfoFromSolID.GetEquipItemInfo().m_kItem[i].GetItem());
                        }
                    }
                }
            }
            IL_12F :;
        }
        this.m_TotalPage   = Math.Abs(this.m_ItemList.Count - 1) / ItemListDlg.NUM_ITEMLIST + 1;
        this.m_CurrentPage = 1;
        this.m_UpdateCount = soldierInfoFromSolID.GetItemUpdateCount();
        this.ShowItemList();
    }
Exemple #18
0
    public void NewStoryGet()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        string key  = charPersonInfo.GetCharName() + "LastFriendStoryChatID";
        string key2 = charPersonInfo.GetCharName() + "LastGuildStoryChatID";
        string key3 = "LastReplayStoryChatID";

        if (PlayerPrefs.HasKey(key))
        {
            this.FriendCommentID = long.Parse(PlayerPrefs.GetString(key));
        }
        if (PlayerPrefs.HasKey(key2))
        {
            this.GuildCommentID = long.Parse(PlayerPrefs.GetString(key2));
        }
        if (PlayerPrefs.HasKey(key3))
        {
            this.RelpayCommentID = long.Parse(PlayerPrefs.GetString(key3));
        }
        GS_STORYCOMMENT_NEWCOUNT_REQ gS_STORYCOMMENT_NEWCOUNT_REQ = new GS_STORYCOMMENT_NEWCOUNT_REQ();

        gS_STORYCOMMENT_NEWCOUNT_REQ.nPersonID = charPersonInfo.GetPersonID();
        gS_STORYCOMMENT_NEWCOUNT_REQ.m_nLastFriendCommentID = this.FriendCommentID;
        gS_STORYCOMMENT_NEWCOUNT_REQ.m_nLastGuildCommentID  = this.GuildCommentID;
        gS_STORYCOMMENT_NEWCOUNT_REQ.m_nLastReplayCommentID = this.RelpayCommentID;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_NEWCOUNT_REQ, gS_STORYCOMMENT_NEWCOUNT_REQ);
    }
Exemple #19
0
    public void SetSolderinfo()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            if (!soldierInfo.IsValid())
            {
                base.SetShowLayer(i, false);
            }
            else
            {
                this.m_itSolPortrait[i].SetSolImageTexure(eCharImageType.SMALL, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade());
                this.m_pbSolHP[i].Value = (float)soldierInfo.GetHP() / (float)soldierInfo.GetMaxHP();
                this.SetToolTip(i, soldierInfo);
                this.m_pbSolHP[i].Visible = false;
                this.m_pbBG[i].Visible    = false;
            }
        }
    }
Exemple #20
0
    public override bool CheckCondition(long i64Param, ref long i64ParamVal)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(false);
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(false);
        }
        int num = 0;

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierList().GetSoldierInfo(i);
            if (soldierInfo != null)
            {
                if (soldierInfo.GetSolID() != 0L)
                {
                    if (!soldierInfo.IsLeader())
                    {
                        num++;
                    }
                }
            }
        }
        num += readySolList.GetCount();
        return((long)num >= base.GetParamVal());
    }
Exemple #21
0
    private void ClickRankList(IUIObject obj)
    {
        if (null == this.m_nlbRankList || null == this.m_nlbRankList.SelectedItem)
        {
            return;
        }
        if (this.m_nlbRankList.SelectedItem.Data != null)
        {
            long num = (long)this.m_nlbRankList.SelectedItem.Data;
            TsLog.LogWarning("!!!!!!! {0}", new object[]
            {
                num
            });
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (num != 0L && charPersonInfo != null)
            {
                this.m_btPractice.SetEnabled(true);
                for (int i = 0; i < this.m_RankInfoList.Count; i++)
                {
                    if (this.m_RankInfoList[i].i64PersonID == num)
                    {
                        charPersonInfo.InfiBattlePersonID = this.m_RankInfoList[i].i64PersonID;
                        charPersonInfo.InfiBattleRank     = this.m_RankInfoList[i].i32Rank;
                        return;
                    }
                }
            }
        }
    }
    public void SetLeaveGuild()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        if (charPersonInfo.GetSoldierInfo(0) == null)
        {
            return;
        }
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("592");

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

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromMessageBox, new object[]
        {
            textFromMessageBox,
            "targetname",
            NrTSingleton <NewGuildManager> .Instance.GetGuildName()
        });

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

        if (msgBoxUI != null)
        {
            msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), null, null, null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL);
            msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10"));
            msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11"));
        }
    }
    public void SetRequestInjury(long nSolID)
    {
        if (this.m_BatchUserSol == null)
        {
            return;
        }
        if (this.m_eStatus == eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_NONE)
        {
            return;
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        for (int i = 0; i < this.m_nMyBatchSolNum; i++)
        {
            if (this.m_BatchUserSol[i].m_nSolID == nSolID)
            {
                NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(nSolID);
                if (soldierInfoFromSolID != null)
                {
                    if (!soldierInfoFromSolID.IsInjuryStatus())
                    {
                        this.m_BatchUserSol[i].m_bInjury        = false;
                        this.m_BatchUserSol[i].m_eRequestInjury = INJURY_CURE_LEVEL.INJURY_CURE_LEVEL_NONE;
                    }
                    else if (this.m_BatchUserSol[i].m_eRequestInjury == INJURY_CURE_LEVEL.INJURY_CURE_LEVEL_ITEM)
                    {
                        this.m_BatchUserSol[i].m_eRequestInjury = INJURY_CURE_LEVEL.INJURY_CURE_LEVEL_NONE;
                    }
                }
            }
        }
    }
    public void UpdateBabelReadyState()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        if (SoldierBatch.BABELTOWER_INFO.IsBabelLeader(charPersonInfo.GetPersonID()))
        {
            return;
        }
        bool   flag = SoldierBatch.BABELTOWER_INFO.IsReadyBattle(charPersonInfo.GetPersonID());
        string text = string.Empty;

        if (flag)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("685");
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("662");
        }
        this.m_bReadyBabel.SetText(text);
    }
    public void RightbuSolButton(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        int solindex = (int)obj.Data;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

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

        if (solMilitaryGroupDlg != null)
        {
            solMilitaryGroupDlg.RefreshSolList();
        }
    }
Exemple #26
0
    private void MakeAllSolList()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

        NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            bool          flag          = true;
            if (this.m_pkParentDlg != null && this.m_pkParentDlg.WindowID == 382)
            {
                flag = false;
            }
            if (!flag || this.loadType == SolMilitarySelectDlg.LoadType.SOLMILITARYGROUP_LEADERCHANGE || nkSoldierInfo.GetFriendPersonID() <= 0L)
            {
                this.AddSolList(nkSoldierInfo, eSOL_POSTYPE.SOLPOS_BATTLE);
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolPosType() != 6)
            {
                this.AddSolList(current, eSOL_POSTYPE.SOLPOS_READY);
            }
        }
    }
Exemple #27
0
    public override bool CheckCondition(long i64Param, ref long i64ParamVal)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        int num = 0;

        if (charPersonInfo == null)
        {
            return(false);
        }
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            for (int j = 0; j < 6; j++)
            {
                ITEM equipItem = soldierInfo.GetEquipItem(j);
                if (equipItem != null)
                {
                    if ((long)equipItem.m_nItemUnique == base.GetParam())
                    {
                        num++;
                    }
                }
            }
        }
        return((long)num >= base.GetParamVal());
    }
Exemple #28
0
    private void MakeReadySolList()
    {
        if (this.SortwithoutHelpsol)
        {
            this.SolSortTypeList.SetVisible(false);
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            NrSoldierList   soldierList = charPersonInfo.GetSoldierList();
            NkSoldierInfo[] kSolInfo    = soldierList.m_kSolInfo;
            for (int i = 0; i < kSolInfo.Length; i++)
            {
                NkSoldierInfo nkSoldierInfo = kSolInfo[i];
                if (!nkSoldierInfo.IsLeader())
                {
                    if (nkSoldierInfo.GetFriendPersonID() <= 0L)
                    {
                        this.AddSolList(nkSoldierInfo, eSOL_POSTYPE.SOLPOS_BATTLE);
                    }
                }
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (!this.SortwithoutHelpsol || current.GetFriendPersonID() <= 0L)
            {
                if (current.GetSolPosType() != 6)
                {
                    this.AddSolList(current, eSOL_POSTYPE.SOLPOS_READY);
                }
            }
        }
    }
Exemple #29
0
    public void PushMsg(int chatunique, string name, string msg, string color)
    {
        if (this.m_CurChatUnique != chatunique)
        {
            return;
        }
        if (name.Equals(NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94")))
        {
            this._ciWhisperChat.PushText(name, msg, color, null);
        }
        else
        {
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2146");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
            {
                textFromInterface,
                "targetname",
                name
            });

            this._ciWhisperChat.PushText(textFromInterface, null, NrTSingleton <CTextParser> .Instance.GetTextColor("1102"));
            this._ciWhisperChat.PushText(msg, null, color);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (!charPersonInfo.GetCharName().Equals(name))
        {
            this.LastMessageTime();
        }
    }
Exemple #30
0
    public override bool CheckCondition(long i64Param, ref long i64ParamVal)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        int num = 0;

        if (charPersonInfo == null)
        {
            return(false);
        }
        NkSoldierInfo[] kSolInfo = charPersonInfo.m_kSoldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            if (nkSoldierInfo.GetSolPosType() == 1 && (long)nkSoldierInfo.GetLevel() >= base.GetParam())
            {
                num++;
            }
        }
        Dictionary <long, NkSoldierInfo> list = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList().GetList();

        foreach (NkSoldierInfo current in list.Values)
        {
            if ((long)current.GetLevel() >= base.GetParam())
            {
                num++;
            }
        }
        i64Param = (long)num;
        return((long)num >= base.GetParamVal());
    }