public void AddServerEventHero(EVENT_HEROINFO _EventHero)
    {
        EVENT_HERODATA eVENT_HERODATA = new EVENT_HERODATA();

        eVENT_HERODATA.szCharCode = TKString.NEWString(_EventHero.szCharCode);
        eVENT_HERODATA.i8Rank     = _EventHero.i8Rank;
        eVENT_HERODATA.i32Attack  = _EventHero.i32Attack;
        eVENT_HERODATA.i32Hp      = _EventHero.i32Hp;
        DateTime dueDate = PublicMethod.GetDueDate(_EventHero.i64StartTime);

        eVENT_HERODATA.tStartTime = dueDate;
        DateTime dueDate2 = PublicMethod.GetDueDate(_EventHero.i64EndTime);

        eVENT_HERODATA.tEndTime    = dueDate2;
        eVENT_HERODATA.i32CharKind = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(TKString.NEWString(_EventHero.szCharCode));

        if (eVENT_HERODATA.i32CharKind != 0)
        {
            EVENT_HERODATA eventHeroCheck = this.GetEventHeroCheck(eVENT_HERODATA.i32CharKind, eVENT_HERODATA.i8Rank);
            if (eventHeroCheck != null)
            {
                this.SetEventHeroCheck(eVENT_HERODATA);
            }
            else
            {
                this.m_EventHeroList.Add(eVENT_HERODATA);
            }
        }
        else
        {
            TsLog.LogWarning("TableEventHero - > CharCode Error", new object[0]);
        }
    }
    public void SetSolierTexutre(EVENT_HERODATA _EventHero, int iSolIndex, NkSoldierInfo pkSolInfo)
    {
        if (_EventHero != null)
        {
            if (this.Info_mode == 1)
            {
                this.m_DrawTexture_Slot[iSolIndex].SetTexture("Win_I_EventSol");
            }
            if (this.Info_mode == 0)
            {
                this.m_DrawTexture_Slot2[iSolIndex].SetTexture("Win_I_EventSol");
            }
            this.m_dtSlot[this.Info_mode][iSolIndex].SetSolImageTexure(eCharImageType.SMALL, this.GetListSolInfo(pkSolInfo));
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(pkSolInfo.GetCharKind(), (int)pkSolInfo.GetGrade());

            if (legendFrame != null)
            {
                if (this.Info_mode == 1)
                {
                    this.m_DrawTexture_Slot[iSolIndex].SetTexture(legendFrame);
                }
                if (this.Info_mode == 0)
                {
                    this.m_DrawTexture_Slot2[iSolIndex].SetTexture(legendFrame);
                }
            }
            this.m_dtSlot[this.Info_mode][iSolIndex].SetSolImageTexure(eCharImageType.SMALL, this.GetListSolInfo(pkSolInfo));
        }
    }
Example #3
0
    private void SetSolInitiativeColum(NkSoldierInfo LastSolInfo, NkSoldierInfo NowSolInfo, int index, ref NewListItem item, ref int ShowIndex)
    {
        string empty = string.Empty;

        if (LastSolInfo != null && LastSolInfo.GetInitiativeValue() != NowSolInfo.GetInitiativeValue())
        {
            ShowIndex = index + 1;
        }
        EVENT_HERODATA eventHeroCheck = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCheck(NowSolInfo.GetCharKind(), NowSolInfo.GetGrade());

        if (eventHeroCheck != null)
        {
            item.SetListItemData(1, "Win_I_EventSol", null, null, null);
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(NowSolInfo.GetCharKind(), (int)NowSolInfo.GetGrade());

            if (legendFrame != null)
            {
                item.SetListItemData(1, legendFrame, null, null, null);
            }
            else
            {
                item.SetListItemData(1, "Win_I_Cancel", null, null, null);
            }
        }
        item.SetListItemData(5, ShowIndex.ToString(), NowSolInfo.GetInitiativeValue(), null, null);
        item.SetListItemData(4, NowSolInfo.GetListSolInfo(true), NowSolInfo, null, null);
        item.SetListItemData(2, NowSolInfo.GetName(), null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            NowSolInfo.GetLevel().ToString(),
            "count2",
            NowSolInfo.GetSolMaxLevel().ToString()
        });

        item.SetListItemData(3, empty, null, null, null);
        item.SetListItemData(8, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeDown), null);
        item.SetListItemData(9, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeUP), null);
        item.SetListItemData(11, NowSolInfo.GetInitiativeValue().ToString(), null, null, null);
        float num = 0f;

        if (NowSolInfo.GetInitiativeValue() >= 0)
        {
            num = (float)NowSolInfo.GetInitiativeValue() / 100f;
            this.m_oldHSInittiativeValue.Add(num);
        }
        item.SetFloatListItemData(12, num, index, new EZValueChangedDelegate(this.OnMoveSlider), null);
        int charKind = 0;

        if (NowSolInfo.IsAtbCommonFlag(8L))
        {
            charKind = 1;
        }
        item.SetListItemData(13, charKind, index, new EZValueChangedDelegate(this.ClickOnlySkillCheckBox), null);
    }
    public void DelServerEventHero(EVENT_HEROINFO _EventHero)
    {
        int charKindByCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(TKString.NEWString(_EventHero.szCharCode));

        EVENT_HERODATA eventHeroCheck = this.GetEventHeroCheck(charKindByCode, _EventHero.i8Rank);

        if (eventHeroCheck != null)
        {
            this.m_EventHeroList.Remove(eventHeroCheck);
        }
    }
    private void SetSolListInfo()
    {
        string empty = string.Empty;

        this.SoldierSelectList.Clear();
        for (int i = 0; i < this.m_kSolSortList.Count; i++)
        {
            NkSoldierInfo  nkSoldierInfo     = this.m_kSolSortList[i];
            NewListItem    newListItem       = new NewListItem(this.SoldierSelectList.ColumnNum, true, string.Empty);
            EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(nkSoldierInfo.GetCharKind(), nkSoldierInfo.GetGrade());

            if (eventHeroCharCode != null)
            {
                newListItem.SetListItemData(1, "Win_I_EventSol", null, null, null);
                newListItem.EventMark = true;
            }
            else
            {
                UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(nkSoldierInfo.GetCharKind(), (int)nkSoldierInfo.GetGrade());

                if (legendFrame != null)
                {
                    newListItem.SetListItemData(1, legendFrame, null, null, null);
                }
            }
            newListItem.SetListItemData(0, false);
            newListItem.SetListItemData(2, nkSoldierInfo.GetListSolInfo(false), null, null, null);
            newListItem.SetListItemData(3, nkSoldierInfo.GetName(), null, null, null);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
                "count1",
                nkSoldierInfo.GetLevel().ToString(),
                "count2",
                nkSoldierInfo.GetSolMaxLevel().ToString()
            });

            newListItem.SetListItemData(4, empty, null, null, null);
            ITEM equipItemByUnique = nkSoldierInfo.GetEquipItemByUnique(this.m_nSearch_ItemUnique);
            if (equipItemByUnique != null && equipItemByUnique.IsValid())
            {
                newListItem.SetListItemData(5, equipItemByUnique, this.m_pkEquipItem, nkSoldierInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickItemIcon), null);
            }
            else
            {
                newListItem.SetListItemData(5, false);
            }
            newListItem.Data = nkSoldierInfo.GetSolID();
            this.SoldierSelectList.Add(newListItem);
        }
        this.SoldierSelectList.RepositionItems();
    }
    public EVENT_HERODATA GetEventHeroCheck(int i32Kind, byte i8Rank)
    {
        EVENT_HERODATA result = null;

        for (int i = 0; i < this.m_EventHeroList.Count; i++)
        {
            if (i32Kind == this.m_EventHeroList[i].i32CharKind && i8Rank == this.m_EventHeroList[i].i8Rank)
            {
                result = this.m_EventHeroList[i];
            }
        }
        return(result);
    }
 public void SetEventHeroCheck(EVENT_HERODATA _EventHero)
 {
     for (int i = 0; i < this.m_EventHeroList.Count; i++)
     {
         if (_EventHero.i32CharKind == this.m_EventHeroList[i].i32CharKind && this.m_EventHeroList[i].i8Rank == _EventHero.i8Rank)
         {
             this.m_EventHeroList[i].i32Attack  = _EventHero.i32CharKind;
             this.m_EventHeroList[i].i8Rank     = _EventHero.i8Rank;
             this.m_EventHeroList[i].i32Hp      = _EventHero.i32Hp;
             this.m_EventHeroList[i].tStartTime = _EventHero.tStartTime;
             this.m_EventHeroList[i].tEndTime   = _EventHero.tEndTime;
         }
     }
 }
    public EVENT_HERODATA GetEventHeroCharFriendCode(int i32Kind)
    {
        EVENT_HERODATA result = null;

        for (int i = 0; i < this.m_EventHeroList.Count; i++)
        {
            if (i32Kind == this.m_EventHeroList[i].i32CharKind)
            {
                result = this.m_EventHeroList[i];
                break;
            }
        }
        return(result);
    }
    private void SetSolColum(int pos, ref NewListItem item)
    {
        if (this.m_kSolSortList.Count <= pos)
        {
            return;
        }
        if (this.m_kSolSortList[pos] == null)
        {
            TsLog.Log("m_kSolSortList[pos] == null", new object[0]);
            return;
        }
        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(this.m_kSolSortList[pos].GetCharKind(), this.m_kSolSortList[pos].GetGrade());

        if (eventHeroCharCode != null)
        {
            item.EventMark = true;
            item.SetListItemData(1, "Win_I_EventSol", null, null, null);
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(this.m_kSolSortList[pos].GetCharKind(), (int)this.m_kSolSortList[pos].GetGrade());

            if (legendFrame != null)
            {
                item.SetListItemData(1, legendFrame, null, null, null);
            }
        }
        item.SetListItemData(2, this.m_kSolSortList[pos].GetListSolInfo(false), null, null, null);
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
        {
            textFromInterface,
            "count1",
            this.m_kSolSortList[pos].GetLevel(),
            "count2",
            this.m_kSolSortList[pos].GetSolMaxLevel()
        });

        item.SetListItemData(3, this.m_kSolSortList[pos].GetName(), null, null, null);
        item.SetListItemData(4, textFromInterface, null, null, null);
        item.SetListItemData(0, false);
        item.Data = this.m_kSolSortList[pos];
    }
    public void AddEventHero(EVENT_HERO _EventHero)
    {
        EVENT_HERODATA eVENT_HERODATA = new EVENT_HERODATA();

        eVENT_HERODATA.szCharCode = _EventHero.m_strCharCode;
        eVENT_HERODATA.i8Rank     = _EventHero.m_i8Rank;
        eVENT_HERODATA.i32Attack  = _EventHero.m_i32Atk;
        eVENT_HERODATA.i32Hp      = _EventHero.m_i32Hp;
        DateTime tStartTime = new DateTime(_EventHero.m_i32StartYear, _EventHero.m_i32StartMon, _EventHero.m_i32StartDay);
        DateTime tEndTime   = new DateTime(_EventHero.m_i32EndYear, _EventHero.m_i32EndMon, _EventHero.m_i32EndDay);

        eVENT_HERODATA.tStartTime  = tStartTime;
        eVENT_HERODATA.tEndTime    = tEndTime;
        eVENT_HERODATA.i32CharKind = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(_EventHero.m_strCharCode);

        if (eVENT_HERODATA.i32CharKind != 0)
        {
            this.m_EventHeroList.Add(eVENT_HERODATA);
        }
    }
    public bool SetGuildMemberUpdate(NewGuildMember GuildMember, int iIndex)
    {
        if (GuildMember == null)
        {
            return(false);
        }
        NewListItem newListItem = new NewListItem(this.m_nlbMember.ColumnNum, true, string.Empty);

        newListItem.SetListItemData(0, true);
        if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(GuildMember.GetFaceCharKind()) == null)
        {
            return(false);
        }
        EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(GuildMember.GetFaceCharKind());

        if (eventHeroCharFriendCode != null)
        {
            newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
            newListItem.EventMark = true;
        }
        newListItem.SetListItemData(1, this.GetGuildMemberPortraitInfo(GuildMember), null, null, null);
        newListItem.SetListItemData(2, GuildMember.GetCharName(), null, null, null);
        newListItem.SetListItemData(3, string.Empty, GuildMember, new EZValueChangedDelegate(this.ClickRightMenu), null);
        string empty  = string.Empty;
        string empty2 = string.Empty;
        bool   result = NewGuildMemberDlg.CurrentLocationName(GuildMember, ref empty, ref empty2);

        newListItem.SetListItemData(4, NrTSingleton <CTextParser> .Instance.GetTextColor(empty2) + empty, null, null, null);
        string rankText = GuildMember.GetRankText();

        newListItem.SetListItemData(5, rankText, null, null, null);
        newListItem.SetListItemData(6, GuildMember.GetLevel().ToString(), null, null, null);
        newListItem.SetListItemData(7, GuildMember.GetContribute().ToString(), null, null, null);
        newListItem.Data = GuildMember;
        this.m_nlbMember.Add(newListItem);
        this.m_nlbMember.RepositionItems();
        return(result);
    }
    public EVENT_HERODATA GetEventHeroCharCode(int i32Kind, byte i8Rank)
    {
        EVENT_HERODATA result = null;

        if (i8Rank < 0)
        {
            i8Rank = 0;
        }
        for (int i = 0; i < this.m_EventHeroList.Count; i++)
        {
            if (i32Kind == this.m_EventHeroList[i].i32CharKind && i8Rank >= this.m_EventHeroList[i].i8Rank - 1)
            {
                if (i8Rank == this.m_EventHeroList[i].i8Rank - 1)
                {
                    return(this.m_EventHeroList[i]);
                }
                if (i8Rank > this.m_EventHeroList[i].i8Rank - 1)
                {
                    result = this.m_EventHeroList[i];
                }
            }
        }
        return(result);
    }
    public void SetStoryChatLikeList(StoryChatLike_Info[] array)
    {
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("302");

        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromInterface,
            "likenum",
            array.Length.ToString()
        });

        this.m_Title.Text = empty;
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        this.m_StoryChatLikeList.Clear();
        for (int i = 0; i < array.Length; i++)
        {
            bool flag = false;
            if (array[i].nPersonID == myCharInfo.m_PersonID)
            {
                flag = true;
            }
            bool flag2 = false;
            foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in myCharInfo.m_kFriendInfo.GetFriendInfoValues())
            {
                if (uSER_FRIEND_INFO.nPersonID == array[i].nPersonID)
                {
                    flag2 = true;
                    break;
                }
            }
            NewListItem newListItem = new NewListItem(this.m_StoryChatLikeList.ColumnNum, true, string.Empty);
            Texture2D   texture2D   = null;
            if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG))
            {
                StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg;

                if (storyChatDlg != null)
                {
                    texture2D = storyChatDlg.GetFriendPortraitPersonID(array[i].nPersonID);
                }
            }
            if (texture2D != null)
            {
                newListItem.SetListItemData(1, texture2D, null, null, null, null);
            }
            else
            {
                EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(array[i].nCharKind);

                if (eventHeroCharFriendCode != null)
                {
                    newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                    newListItem.EventMark = true;
                }
                newListItem.SetListItemData(1, new CostumeDrawTextureInfo
                {
                    charKind            = array[i].nCharKind,
                    costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[i].nFaceCharCostumeUnique),
                    grade = -1
                }, null, null, null);
            }
            string text = TKString.NEWString(array[i].szName);
            newListItem.SetListItemData(2, text, null, null, null);
            newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + array[i].nLevel.ToString(), null, null, null);
            if (!flag)
            {
                newListItem.SetListItemData(4, string.Empty, array[i].nPersonID, new EZValueChangedDelegate(this.ClickUserInfo), null);
            }
            else
            {
                newListItem.SetListItemEnable(4, false);
            }
            if (!flag2 && !flag)
            {
                newListItem.SetListItemData(5, string.Empty, text, new EZValueChangedDelegate(this.ClickAddFriend), null);
            }
            else
            {
                newListItem.SetListItemEnable(5, false);
            }
            newListItem.SetListItemData(12, false);
            newListItem.Data = array[i];
            this.m_StoryChatLikeList.Add(newListItem);
        }
        this.m_StoryChatLikeList.RepositionItems();
    }
	public void SetSolStatInfo(NkSoldierInfo solInfo)
	{
		if (solInfo != null)
		{
			string charNameBySoldierInfo = this.GetCharNameBySoldierInfo(solInfo);
			this.m_lbCharName.Text = string.Format("Lv.{0} {1}", solInfo.GetLevel(), charNameBySoldierInfo);
			string text = string.Empty;
			string empty = string.Empty;
			EVENT_HERODATA eventHeroCharCode = NrTSingleton<NrTableEvnetHeroManager>.Instance.GetEventHeroCharCode(solInfo.GetCharKind(), solInfo.GetGrade());
			int num = solInfo.GetMaxHP();
			int num2 = solInfo.GetMinDamage();
			int num3 = solInfo.GetMaxDamage();
			string text2 = solInfo.GetMaxHP().ToString();
			string text3 = solInfo.GetMinDamage().ToString();
			string text4 = solInfo.GetMaxDamage().ToString();
			string textColor = NrTSingleton<CTextParser>.Instance.GetTextColor("1107");
			string textColor2 = NrTSingleton<CTextParser>.Instance.GetTextColor("1002");
			string second = string.Empty;
			string empty2 = string.Empty;
			if (eventHeroCharCode != null)
			{
				int num4 = 0;
				if (eventHeroCharCode.i32Hp != 100)
				{
					num = (int)((float)solInfo.GetMaxHP() * ((float)eventHeroCharCode.i32Hp * 0.01f));
					second = NrTSingleton<UIDataManager>.Instance.GetString(textColor, "(+", (num - solInfo.GetMaxHP()).ToString(), ")", textColor2);
					text2 = NrTSingleton<UIDataManager>.Instance.GetString(solInfo.GetMaxHP().ToString(), second);
					NrTSingleton<CTextParser>.Instance.ReplaceParam(ref empty2, new object[]
					{
						NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("2192"),
						"count",
						eventHeroCharCode.i32Hp.ToString()
					});
					this.m_lbEventHeroStat[num4].SetText(empty2);
					this.m_lbEventHeroStat[num4].SetAnchorText(SpriteText.Anchor_Pos.Middle_Right);
					this.m_lbEventHeroStat[num4].SetEnabled(true);
					this.m_lbEventHeroStat[num4].Hide(false);
					num4++;
				}
				if (eventHeroCharCode.i32Attack != 100)
				{
					num2 = (int)((float)solInfo.GetMinDamage() * ((float)eventHeroCharCode.i32Attack * 0.01f));
					num3 = (int)((float)solInfo.GetMaxDamage() * ((float)eventHeroCharCode.i32Attack * 0.01f));
					second = NrTSingleton<UIDataManager>.Instance.GetString(textColor, "(+", (num2 - solInfo.GetMinDamage()).ToString(), ")", textColor2);
					text3 = NrTSingleton<UIDataManager>.Instance.GetString(solInfo.GetMinDamage().ToString(), second);
					second = NrTSingleton<UIDataManager>.Instance.GetString(textColor, "(+", (num3 - solInfo.GetMaxDamage()).ToString(), ")", textColor2);
					text4 = NrTSingleton<UIDataManager>.Instance.GetString(solInfo.GetMaxDamage().ToString(), second);
					NrTSingleton<CTextParser>.Instance.ReplaceParam(ref empty2, new object[]
					{
						NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("2191"),
						"count",
						eventHeroCharCode.i32Attack.ToString()
					});
					this.m_lbEventHeroStat[num4].SetText(empty2);
					this.m_lbEventHeroStat[num4].SetAnchorText(SpriteText.Anchor_Pos.Middle_Right);
					this.m_lbEventHeroStat[num4].SetEnabled(true);
					this.m_lbEventHeroStat[num4].Hide(false);
				}
				this.m_dtEventTexture.Visible = true;
				Transform child = NkUtil.GetChild(this.m_dtEventTexture.gameObject.transform, "child_effect");
				if (child == null)
				{
					NrTSingleton<FormsManager>.Instance.AttachEffectKey("FX_UI_EVENTFONT", this.m_dtEventTexture, this.m_dtEventTexture.GetSize());
				}
			}
			else
			{
				this.m_dtEventTexture.Visible = false;
			}
			text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("1879");
			NrTSingleton<CTextParser>.Instance.ReplaceParam(ref empty, new object[]
			{
				text,
				"maxhp",
				text2
			});
			this.m_lbHP.Text = empty;
			text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("1880");
			NrTSingleton<CTextParser>.Instance.ReplaceParam(ref empty, new object[]
			{
				text,
				"mindmg",
				text3,
				"maxdmg",
				text4
			});
			this.m_lbAtack.Text = empty;
			text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("1881");
			NrTSingleton<CTextParser>.Instance.ReplaceParam(ref empty, new object[]
			{
				text,
				"defance",
				solInfo.GetPhysicalDefense().ToString()
			});
			this.m_lbDefence.Text = empty;
			long solSubData = solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER);
			this.m_lbFightPower.Text = ANNUALIZED.Convert(solSubData);
			float num5 = 512f;
			this.m_dtCharImg.SetUVMask(new Rect(4f / num5, 0f, 504f / num5, 448f / num5));
			this.m_dtCharImg.SetTextureEffect(eCharImageType.LARGE, solInfo.GetCharKind(), (int)solInfo.GetGrade(), NrTSingleton<NrCharCostumeTableManager>.Instance.GetCostumePortraitPath(solInfo));
			short legendType = NrTSingleton<NrCharKindInfoManager>.Instance.GetLegendType(solInfo.GetCharKind(), (int)solInfo.GetGrade());
			UIBaseInfoLoader solLargeGradeImg = NrTSingleton<NrCharKindInfoManager>.Instance.GetSolLargeGradeImg(solInfo.GetCharKind(), (int)solInfo.GetGrade());
			this.m_dtRank.Visible = (null != solLargeGradeImg);
			if (0 < legendType)
			{
				this.m_dtRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
			}
			this.m_dtRank.SetTexture(solLargeGradeImg);
			this.SetItem(this.m_ivHelmet, solInfo.GetEquipItem(1));
			this.SetItem(this.m_ivArmor, solInfo.GetEquipItem(2));
			this.SetItem(this.m_ivGlove, solInfo.GetEquipItem(3));
			this.SetItem(this.m_ivBoots, solInfo.GetEquipItem(4));
			this.SetItem(this.m_ivWeapon, solInfo.GetEquipItem(0));
			this.SetItem(this.m_ivRing, solInfo.GetEquipItem(5));
		}
		else
		{
			this.m_lbCharName.Text = string.Empty;
			this.m_lbHP.Text = string.Empty;
			this.m_lbAtack.Text = string.Empty;
			this.m_lbDefence.Text = string.Empty;
			this.m_lbFightPower.Text = string.Empty;
		}
	}
    public NewListItem UpdateSolList(NkSoldierInfo kSolInfo)
    {
        if (!kSolInfo.IsValid())
        {
            return(null);
        }
        if (this.m_eShowType != SOLCOMPOSE_TYPE.MYTHEVOLUTION)
        {
            if (SolComposeMainDlg.Instance == null)
            {
                return(null);
            }
            if (SolComposeMainDlg.Instance.ContainBaseSoldier(kSolInfo.GetSolID()))
            {
                return(null);
            }
        }
        string      text        = string.Empty;
        NewListItem newListItem = new NewListItem(this.ComposeNewListBox.ColumnNum, true, string.Empty);

        if (newListItem == null)
        {
            return(null);
        }
        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(kSolInfo.GetCharKind(), kSolInfo.GetGrade());

        if (eventHeroCharCode != null)
        {
            newListItem.EventMark = true;
            newListItem.SetListItemData(3, "Win_I_EventSol", null, null, null);
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade());

            if (legendFrame != null)
            {
                newListItem.SetListItemData(3, legendFrame, null, null, null);
            }
            else
            {
                newListItem.SetListItemData(3, "Win_T_ItemEmpty", null, null, null);
            }
        }
        newListItem.SetListItemData(4, kSolInfo.GetListSolInfo(false), null, null, null);
        string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade(), kSolInfo.GetName());

        newListItem.SetListItemData(5, legendName, null, null, null);
        long  num  = kSolInfo.GetExp() - kSolInfo.GetCurBaseExp();
        long  num2 = kSolInfo.GetNextExp() - kSolInfo.GetCurBaseExp();
        float num3 = 1f;

        if (!kSolInfo.IsMaxLevel())
        {
            num3 = ((float)num2 - (float)kSolInfo.GetRemainExp()) / (float)num2;
            if (num3 > 1f)
            {
                num3 = 1f;
            }
            if (0f > num3)
            {
                num3 = 0f;
            }
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            kSolInfo.GetLevel().ToString(),
            "count2",
            kSolInfo.GetSolMaxLevel().ToString()
        });

        newListItem.SetListItemData(6, text, null, null, null);
        newListItem.SetListItemData(0, "Win_T_ReputelPrgBG", null, null, null);
        newListItem.SetListItemData(1, "Com_T_GauWaPr4", 270f * num3, null, null);
        if (kSolInfo.IsMaxLevel())
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"),
                "exp",
                num.ToString(),
                "maxexp",
                num2.ToString()
            });
        }
        newListItem.SetListItemData(2, text, null, null, null);
        newListItem.SetListItemData(7, false);
        if (!this.m_bMainSelect)
        {
            foreach (long current in this.mCheckList)
            {
                if (kSolInfo.GetSolID() == current)
                {
                    newListItem.SetListItemData(7, true);
                    newListItem.SetListItemData(7, "Com_I_Check", null, null, null);
                    break;
                }
            }
        }
        if (!kSolInfo.IsAwakening())
        {
            newListItem.SetListItemData(8, false);
        }
        if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_MAIN_CHALLENGEQUEST_DLG) == null)
        {
            newListItem.SetListItemData(9, string.Empty, null, new EZValueChangedDelegate(this.ClickSolDetailInfo), null);
        }
        else
        {
            newListItem.SetListItemData(9, false);
        }
        if (kSolInfo.IsAtbCommonFlag(1L))
        {
            newListItem.SetListItemData(10, true);
        }
        else
        {
            newListItem.SetListItemData(10, false);
        }
        newListItem.Data = kSolInfo;
        return(newListItem);
    }
Example #16
0
    private void ReplaceParamValBattleSkill(ref int m_iTextCount, ref StringBuilder refReplaceText, string szContent, BATTLESKILL_DETAIL BSkillDetail, NkSoldierInfo solInfo, int costumeUnique = -1)
    {
        int length = szContent.Length;
        int i      = m_iTextCount + 1;

        this.willReplaceParamBuilder.Length = 0;
        while (i < length)
        {
            if (szContent[i] == this.m_szTag[13])
            {
                break;
            }
            this.willReplaceParamBuilder.Append(szContent[i]);
            i++;
        }
        string text      = this.willReplaceParamBuilder.ToString();
        int    paramType = NrTSingleton <BATTLE_SKILL_PARSER> .Instance.GetParamType(text);

        int   skillDetalParamValue = BSkillDetail.GetSkillDetalParamValue(paramType);
        float num  = 0f;
        long  num2 = 0L;

        if (skillDetalParamValue != 0)
        {
            eBATTLESKILL_DETAIL_CODE eBATTLESKILL_DETAIL_CODE = (eBATTLESKILL_DETAIL_CODE)paramType;
            switch (eBATTLESKILL_DETAIL_CODE)
            {
            case eBATTLESKILL_DETAIL_CODE.ADD_CRITICAL:
            case eBATTLESKILL_DETAIL_CODE.ADD_PHY_DEFENSE_P:
            case eBATTLESKILL_DETAIL_CODE.ADD_MAG_DEFENSE_P:
            case eBATTLESKILL_DETAIL_CODE.ADD_HIT_RATE_P:
            case eBATTLESKILL_DETAIL_CODE.ADD_EVASION_P:
            case eBATTLESKILL_DETAIL_CODE.ADD_CRITICAL_P:
            case eBATTLESKILL_DETAIL_CODE.ADD_MIN_DAMAGE_P:
            case eBATTLESKILL_DETAIL_CODE.ADD_MAX_DAMAGE_P:
            case eBATTLESKILL_DETAIL_CODE.ADD_MAX_HP_P:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MIN_DAMAGE_P:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_DAMAGE_P:
            case eBATTLESKILL_DETAIL_CODE.MINUS_PHY_DEFENSE_P:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MAG_DEFENSE_P:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_HP_P:
            case eBATTLESKILL_DETAIL_CODE.MINUS_CRITICAL:
            case eBATTLESKILL_DETAIL_CODE.MINUS_HEAL_P:
            case eBATTLESKILL_DETAIL_CODE.PLUS_HEAL_P:
            case eBATTLESKILL_DETAIL_CODE.MINUS_DAMAGE_P:
            case eBATTLESKILL_DETAIL_CODE.PLUS_DAMAGE_P:
                goto IL_2C3;

            case eBATTLESKILL_DETAIL_CODE.ADD_MIN_DAMAGE:
            case eBATTLESKILL_DETAIL_CODE.ADD_MAX_DAMAGE:
            case eBATTLESKILL_DETAIL_CODE.ADD_MAX_HP:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MIN_DAMAGE:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_DAMAGE:
            case eBATTLESKILL_DETAIL_CODE.MINUS_PHY_DEFENSE:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MAG_DEFENSE:
            case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_HP:
            case eBATTLESKILL_DETAIL_CODE.NOMOVE_ON:
            case eBATTLESKILL_DETAIL_CODE.NOTURN_ON:
            case eBATTLESKILL_DETAIL_CODE.NOSKILL_ON:
            case eBATTLESKILL_DETAIL_CODE.NOATTACK_ON:
            case eBATTLESKILL_DETAIL_CODE.IMMORTAL_ON:
            case eBATTLESKILL_DETAIL_CODE.NOCONTROL_ON:
            case eBATTLESKILL_DETAIL_CODE.NOCONTROL_AND_NOTARGETING:
            case eBATTLESKILL_DETAIL_CODE.NONORMAL_ATTACK_ON:
            case eBATTLESKILL_DETAIL_CODE.MINUS_HEAL:
            case eBATTLESKILL_DETAIL_CODE.PLUS_HEAL:
            case eBATTLESKILL_DETAIL_CODE.MINUS_DAMAGE:
            case eBATTLESKILL_DETAIL_CODE.PLUS_DAMAGE:
IL_13A:
                switch (eBATTLESKILL_DETAIL_CODE)
                {
                case eBATTLESKILL_DETAIL_CODE.EMPTY_P:
                case eBATTLESKILL_DETAIL_CODE.INCREASE_WEPON_ACTIVE:
                case eBATTLESKILL_DETAIL_CODE.DECREASE_PVP_DAMAGE:
                case eBATTLESKILL_DETAIL_CODE.INCREASE_PVP_DAMAGE:
                case eBATTLESKILL_DETAIL_CODE.INCREASE_BOSS_DAMAGE:
                case eBATTLESKILL_DETAIL_CODE.DECREASE_MONSTER_DAMAGE:
                case eBATTLESKILL_DETAIL_CODE.INCREASE_EXP_P:
                case eBATTLESKILL_DETAIL_CODE.INCREASE_GOLD_P:
                case eBATTLESKILL_DETAIL_CODE.INCREASE_ITEM_P:
                case eBATTLESKILL_DETAIL_CODE.PHOENIX:
                case eBATTLESKILL_DETAIL_CODE.EMPTY_P2:
                    goto IL_2C3;

                case eBATTLESKILL_DETAIL_CODE.EMPTY_DAMAGE_P:
                case eBATTLESKILL_DETAIL_CODE.EMPTY_DAMAGE_P2:
                    goto IL_230;

                case eBATTLESKILL_DETAIL_CODE.IMMUNE_EQUAL_BOSS:
                case eBATTLESKILL_DETAIL_CODE.INCREASE_DEFENCE_ACTIVE:
                case eBATTLESKILL_DETAIL_CODE.DECREASE_CRITICAL_HIT:
                case eBATTLESKILL_DETAIL_CODE.MAGIC_RESIST:
                case eBATTLESKILL_DETAIL_CODE.PHYSICAL_RESIST:
                case eBATTLESKILL_DETAIL_CODE.EMPTY_VALUE2:
IL_190:
                    switch (eBATTLESKILL_DETAIL_CODE)
                    {
                    case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_POISON_P:
                    case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_FIRE_P:
                    case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_ICE_P:
                    case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_LIGHTNING_P:
                    case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_BLEEDING_P:
                    case eBATTLESKILL_DETAIL_CODE.ENDURE_HEAL_P:
                    case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE_P:
                        goto IL_230;

                    case eBATTLESKILL_DETAIL_CODE.ENDURE_HEAL:
                    case eBATTLESKILL_DETAIL_CODE.ENDURE_ANGERLYPOINT:
                    case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE:
                    case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE_TYPE:
                    case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE_TARGET:
                    case eBATTLESKILL_DETAIL_CODE.AFTER_USED_HEAL:
                    case eBATTLESKILL_DETAIL_CODE.AFTER_USED_SKILL_LEVEL:
                    case eBATTLESKILL_DETAIL_CODE.DEL_BUFF_ALL:
                    case eBATTLESKILL_DETAIL_CODE.DEL_BUFF_TYPE:
IL_1E2:
                        switch (eBATTLESKILL_DETAIL_CODE)
                        {
                        case eBATTLESKILL_DETAIL_CODE.BLOOD_SUCKING_PER:
                        case eBATTLESKILL_DETAIL_CODE.ADD_BLOOD_SUCKING_PER:
                        case eBATTLESKILL_DETAIL_CODE.BLOOD_SUCKING_ALL_PER:
                            goto IL_2C3;

                        case eBATTLESKILL_DETAIL_CODE.BLOOD_SUCKING_VALUE:
                        case eBATTLESKILL_DETAIL_CODE.ADD_BLOOD_SUCKING_VALUE:
IL_200:
                            if (eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.DAMAGE_P || eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.HEAL_P)
                            {
                                goto IL_230;
                            }
                            if (eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.SUMMON_LEVEL_P)
                            {
                                goto IL_2C3;
                            }
                            if (eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.PROTECT_SHIELD_VALUE_P)
                            {
                                goto IL_230;
                            }
                            if (eBATTLESKILL_DETAIL_CODE != eBATTLESKILL_DETAIL_CODE.PLUNDER_ANGERLYPOINT_P)
                            {
                                goto IL_385;
                            }
                            goto IL_2C3;
                        }
                        goto IL_200;

                    case eBATTLESKILL_DETAIL_CODE.AFTER_USED_SKILL:
                    {
                        int skillDetalParamValue2            = BSkillDetail.GetSkillDetalParamValue(74);
                        BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(skillDetalParamValue, skillDetalParamValue2);

                        if (battleSkillDetail != null)
                        {
                            skillDetalParamValue = BSkillDetail.GetSkillDetalParamValue(3);
                            if (skillDetalParamValue > 0)
                            {
                                if (solInfo != null)
                                {
                                    int            num3 = (solInfo.GetMaxDamage() + solInfo.GetMinDamage()) / 2;
                                    EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(solInfo.GetCharKind(), solInfo.GetGrade());

                                    if (eventHeroCharCode != null)
                                    {
                                        int num4 = (int)((float)num3 * ((float)eventHeroCharCode.i32Attack * 0.01f));
                                        num3 = num4;
                                    }
                                    num2 = (long)((int)((float)num3 * ((float)skillDetalParamValue / 10000f)));
                                }
                                else
                                {
                                    num = (float)skillDetalParamValue / 100f;
                                }
                            }
                        }
                        goto IL_385;
                    }

                    case eBATTLESKILL_DETAIL_CODE.ACTION_HP_P:
                        goto IL_2C3;
                    }
                    goto IL_1E2;
                }
                goto IL_190;

            case eBATTLESKILL_DETAIL_CODE.PLUS_MIN_DAMAGE_P:
            case eBATTLESKILL_DETAIL_CODE.PLUS_MAX_DAMAGE_P:
                goto IL_230;
            }
            goto IL_13A;
IL_230:
            if (solInfo != null)
            {
                int num5 = (solInfo.GetMaxDamage() + solInfo.GetMinDamage()) / 2;
                if (0 <= costumeUnique)
                {
                    num5 = this.GetCostumeDamage(solInfo, costumeUnique);
                }
                EVENT_HERODATA eventHeroCharCode2 = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(solInfo.GetCharKind(), solInfo.GetGrade());

                if (eventHeroCharCode2 != null)
                {
                    int num6 = (int)((float)num5 * ((float)eventHeroCharCode2.i32Attack * 0.01f));
                    num5 = num6;
                }
                num2  = (long)num5 * (long)skillDetalParamValue;
                num2 /= 10000L;
            }
            else
            {
                num = (float)skillDetalParamValue / 100f;
            }
            goto IL_385;
IL_2C3:
            num = (float)skillDetalParamValue / 100f;
IL_385:
            string value;
            if (num2 > 0L)
            {
                value = num2.ToString();
            }
            else if (num > 0f)
            {
                value = num.ToString();
            }
            else
            {
                value = skillDetalParamValue.ToString();
            }
            refReplaceText.Append(value);
        }
        m_iTextCount += text.Length + 1;
    }
Example #17
0
    protected void SetSolListInfo(NkSoldierInfo pkSolinfo)
    {
        long  num  = pkSolinfo.GetExp() - pkSolinfo.GetCurBaseExp();
        long  num2 = pkSolinfo.GetNextExp() - pkSolinfo.GetCurBaseExp();
        float num3 = ((float)num2 - (float)pkSolinfo.GetRemainExp()) / (float)num2;

        if (num3 > 1f)
        {
            num3 = 1f;
        }
        if (0f > num3)
        {
            num3 = 0f;
        }
        if (pkSolinfo.IsMaxLevel())
        {
            num3 = 1f;
        }
        string         text              = string.Empty;
        NewListItem    newListItem       = new NewListItem(this.SoldierList.ColumnNum, true, string.Empty);
        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(pkSolinfo.GetCharKind(), pkSolinfo.GetGrade());

        newListItem.SetListItemData(9, false);
        if (eventHeroCharCode != null)
        {
            newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
            newListItem.SetListItemData(9, true);
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(pkSolinfo.GetCharKind(), (int)pkSolinfo.GetGrade());

            if (legendFrame != null)
            {
                newListItem.SetListItemData(0, legendFrame, null, null, null);
            }
        }
        newListItem.SetListItemData(1, pkSolinfo.GetListSolInfo(false), null, null, null);
        string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(pkSolinfo.GetCharKind(), (int)pkSolinfo.GetGrade(), pkSolinfo.GetName());

        newListItem.SetListItemData(2, legendName, null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            pkSolinfo.GetLevel().ToString(),
            "count2",
            pkSolinfo.GetSolMaxLevel().ToString()
        });

        newListItem.SetListItemData(3, text, null, null, null);
        int num4 = pkSolinfo.GetEquipWeaponOrigin();

        if (num4 > 0)
        {
            newListItem.SetListItemData(4, "Win_I_Weapon" + num4.ToString(), null, null, null);
        }
        num4 = pkSolinfo.GetEquipWeaponExtention();
        if (num4 > 0)
        {
            newListItem.SetListItemData(4, "Win_I_Weapon" + num4.ToString(), null, null, null);
        }
        if (pkSolinfo.IsAwakening())
        {
            newListItem.SetListItemData(5, "Win_I_DarkAlchemy", null, null, null);
        }
        else
        {
            newListItem.SetListItemData(5, false);
        }
        newListItem.SetListItemData(7, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Com_T_GauWaPr4"), 250f * num3, null, null);
        if (pkSolinfo.IsMaxLevel())
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"),
                "exp",
                num.ToString(),
                "maxexp",
                num2.ToString()
            });
        }
        newListItem.SetListItemData(8, text, null, null, null);
        newListItem.Data = pkSolinfo;
        this.SoldierList.Add(newListItem);
    }
Example #18
0
    public void SetStoryChat(StoryChat_Info info, bool battleReplay)
    {
        GS_STORYCOMMENT_GET_REQ gS_STORYCOMMENT_GET_REQ = new GS_STORYCOMMENT_GET_REQ();

        gS_STORYCOMMENT_GET_REQ.nStoryChatID    = info.nStoryChatID;
        gS_STORYCOMMENT_GET_REQ.nStoryCommentID = 0L;
        gS_STORYCOMMENT_GET_REQ.nLoadCount      = 10;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_GET_REQ, gS_STORYCOMMENT_GET_REQ);
        this.m_CurrentStoryChat = info;
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("322");

        string text  = string.Empty;
        string text2 = TKString.NEWString(info.szName);

        if (!battleReplay)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                textFromInterface,
                "targetname",
                text2
            });
        }
        else if (info.nCharKind == 8)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1307");
        }
        else if (info.nCharKind == 6)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("436");
        }
        else if (info.nCharKind == 5)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("43");
        }
        this.m_Title.Text = text;
        this.m_DetailList.ChangeLineHeight = true;
        this.m_DetailList.LineHeight       = 160f;
        this.m_DetailList.Clear();
        NewListItem newListItem = new NewListItem(this.m_DetailList.ColumnNum, true, string.Empty);

        if (!battleReplay)
        {
            Texture2D texture2D = null;
            if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG))
            {
                StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg;

                if (storyChatDlg != null)
                {
                    texture2D = storyChatDlg.GetFriendPortraitPersonID(info.nPersonID);
                }
            }
            if (texture2D != null)
            {
                newListItem.SetListItemData(1, texture2D, null, null, null, null);
            }
            else
            {
                EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(info.nCharKind);

                if (eventHeroCharFriendCode != null)
                {
                    newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                    newListItem.EventMark = true;
                }
                newListItem.SetListItemData(1, new CostumeDrawTextureInfo
                {
                    charKind            = info.nCharKind,
                    grade               = -1,
                    costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(info.nFaceCharCostumeUnique)
                }, null, null, null);
            }
            newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + info.nLevel.ToString(), null, null, null);
            string text3 = TKString.NEWString(info.szMessage);
            text3 = text3.Replace("\n", "\r\n");
            newListItem.SetListItemData(6, text3, null, null, null);
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            if (@char != null)
            {
                if (text2 == @char.GetCharName())
                {
                    this.m_bMyStoryChat = true;
                }
                else
                {
                    newListItem.SetListItemData(13, false);
                    this.m_bMyStoryChat = false;
                }
            }
        }
        else
        {
            char[] separator = new char[]
            {
                '/'
            };
            string[] array = TKString.NEWString(info.szMessage).Split(separator);
            if (info.nCharKind == 8)
            {
                newListItem.SetListItemData(1, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1956"),
                    "targetname1",
                    array[1],
                    "targetname2",
                    array[2]
                });

                newListItem.SetListItemData(6, empty, null, null, null);
            }
            else if (info.nCharKind == 6)
            {
                newListItem.SetListItemData(1, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                string empty2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1957"),
                    "targetname1",
                    array[1],
                    "targetname2",
                    array[2]
                });

                newListItem.SetListItemData(6, empty2, null, null, null);
            }
            else if (info.nCharKind == 5)
            {
                newListItem.SetListItemData(1, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                string empty3 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1957"),
                    "targetname1",
                    array[1],
                    "targetname2",
                    array[2]
                });

                newListItem.SetListItemData(6, empty3, null, null, null);
            }
            newListItem.SetListItemData(3, false);
            newListItem.SetListItemData(13, false);
            this.m_bMyStoryChat = false;
        }
        newListItem.SetListItemData(2, text2, null, null, null);
        DateTime dueDate = PublicMethod.GetDueDate(info.nTime);

        textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

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

        newListItem.SetListItemData(4, text, null, null, null);
        newListItem.SetListItemData(9, info.nLikeCount.ToString(), null, null, null);
        newListItem.SetListItemData(10, info.nCommentCount.ToString(), null, null, null);
        newListItem.SetListItemData(11, string.Empty, info.nStoryChatID, new EZValueChangedDelegate(this.ClickLikeList), null);
        newListItem.SetListItemData(12, string.Empty, text2, new EZValueChangedDelegate(this.ClickUser), null);
        this.m_DetailList.Add(newListItem);
        this.m_DetailList.RepositionItems();
    }
    public void SetSolList()
    {
        this.m_nlSelectSoldierList.Clear();
        this.m_kSolList.Clear();
        List <int> list = new List <int>();

        list.Clear();
        eSOL_SUBDATA     eType          = eSOL_SUBDATA.SOL_SUBDATA_NONE;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

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

        if (readySolList == null)
        {
            return;
        }
        if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_COLOSSEUM)
        {
            eType = eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS;
            NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
            for (int i = 0; i < kSolInfo.Length; i++)
            {
                NkSoldierInfo nkSoldierInfo = kSolInfo[i];
                if (nkSoldierInfo.GetSolID() > 0L)
                {
                    if (nkSoldierInfo.GetSolSubData(eType) > 0L && !list.Contains(nkSoldierInfo.GetCharKind()))
                    {
                        list.Add(nkSoldierInfo.GetCharKind());
                    }
                }
            }
            foreach (NkSoldierInfo current in readySolList.GetList().Values)
            {
                if (current.GetSolID() > 0L)
                {
                    if (current.GetSolSubData(eType) > 0L && !list.Contains(current.GetCharKind()))
                    {
                        list.Add(current.GetCharKind());
                    }
                }
            }
            NkSoldierInfo[] kSolInfo2 = soldierList.m_kSolInfo;
            for (int j = 0; j < kSolInfo2.Length; j++)
            {
                NkSoldierInfo nkSoldierInfo2 = kSolInfo2[j];
                if (nkSoldierInfo2.GetSolID() > 0L)
                {
                    if (!list.Contains(nkSoldierInfo2.GetCharKind()))
                    {
                        if (nkSoldierInfo2.GetSolSubData(eType) <= 0L)
                        {
                            this.m_kSolList.Add(nkSoldierInfo2);
                        }
                    }
                }
            }
            foreach (NkSoldierInfo current2 in readySolList.GetList().Values)
            {
                if (current2.GetSolID() > 0L)
                {
                    if (!list.Contains(current2.GetCharKind()))
                    {
                        if (current2.GetSolPosType() != 2)
                        {
                            if (current2.GetSolPosType() != 6)
                            {
                                if (current2.GetSolSubData(eType) <= 0L)
                                {
                                    this.m_kSolList.Add(current2);
                                }
                            }
                        }
                    }
                }
            }
        }
        else if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_GUILD_BOSS || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_DAILYDUNGEON)
        {
            List <int> babelCharKind = Battle.BATTLE.BabelCharKind;
            if (babelCharKind == null)
            {
                return;
            }
            foreach (int current3 in babelCharKind)
            {
                list.Add(current3);
            }
            NkSoldierInfo[] kSolInfo3 = soldierList.m_kSolInfo;
            for (int k = 0; k < kSolInfo3.Length; k++)
            {
                NkSoldierInfo nkSoldierInfo3 = kSolInfo3[k];
                if (nkSoldierInfo3.GetSolID() > 0L)
                {
                    if (!list.Contains(nkSoldierInfo3.GetCharKind()))
                    {
                        this.m_kSolList.Add(nkSoldierInfo3);
                    }
                }
            }
            foreach (NkSoldierInfo current4 in readySolList.GetList().Values)
            {
                if (current4.GetSolID() > 0L)
                {
                    if (!list.Contains(current4.GetCharKind()))
                    {
                        if (current4.GetSolPosType() != 6)
                        {
                            this.m_kSolList.Add(current4);
                        }
                    }
                }
            }
        }
        else if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID)
        {
            List <long> babelBattleSolList = Battle.BATTLE.BabelBattleSolList;
            if (babelBattleSolList == null)
            {
                return;
            }
            NkSoldierInfo[] kSolInfo4 = soldierList.m_kSolInfo;
            for (int l = 0; l < kSolInfo4.Length; l++)
            {
                NkSoldierInfo nkSoldierInfo4 = kSolInfo4[l];
                if (nkSoldierInfo4.GetSolID() > 0L)
                {
                    if (!babelBattleSolList.Contains(nkSoldierInfo4.GetSolID()))
                    {
                        if (!NrTSingleton <NkBattleCharManager> .Instance.IsSameKindSolInBattle(nkSoldierInfo4.GetCharKind()))
                        {
                            this.m_kSolList.Add(nkSoldierInfo4);
                        }
                    }
                }
            }
            foreach (NkSoldierInfo current5 in readySolList.GetList().Values)
            {
                if (current5.GetSolID() > 0L)
                {
                    if (!babelBattleSolList.Contains(current5.GetSolID()))
                    {
                        if (!NrTSingleton <NkBattleCharManager> .Instance.IsSameKindSolInBattle(current5.GetCharKind()))
                        {
                            if (current5.GetSolPosType() != 6)
                            {
                                this.m_kSolList.Add(current5);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            NkSoldierInfo[] kSolInfo5 = soldierList.m_kSolInfo;
            for (int m = 0; m < kSolInfo5.Length; m++)
            {
                NkSoldierInfo nkSoldierInfo5 = kSolInfo5[m];
                if (nkSoldierInfo5.GetSolID() > 0L)
                {
                    list.Add(nkSoldierInfo5.GetCharKind());
                }
            }
            foreach (NkSoldierInfo current6 in readySolList.GetList().Values)
            {
                if (!current6.IsInjuryStatus())
                {
                    if (current6.GetSolID() > 0L)
                    {
                        if (current6.GetSolPosType() != 6)
                        {
                            if (!list.Contains(current6.GetCharKind()))
                            {
                                this.m_kSolList.Add(current6);
                            }
                        }
                    }
                }
            }
        }
        this.m_kSolList.Sort(new Comparison <NkSoldierInfo>(this.CompareCombatPower));
        foreach (NkSoldierInfo current7 in this.m_kSolList)
        {
            if (!current7.IsInjuryStatus())
            {
                if (current7.GetSolID() > 0L)
                {
                    if (!this.IsMyMainHeroKind(current7.GetCharKind()))
                    {
                        if (!current7.IsSolStatus(4) || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID)
                        {
                            NewListItem newListItem = new NewListItem(this.m_nlSelectSoldierList.ColumnNum, true, string.Empty);
                            newListItem.Data = current7.GetSolID();
                            NkListSolInfo nkListSolInfo = new NkListSolInfo();
                            nkListSolInfo.SolCharKind            = current7.GetCharKind();
                            nkListSolInfo.SolGrade               = (int)current7.GetGrade();
                            nkListSolInfo.SolLevel               = current7.GetLevel();
                            nkListSolInfo.FightPower             = current7.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER);
                            nkListSolInfo.ShowLevel              = false;
                            nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current7);

                            if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current7.GetCharKind()) != null)
                            {
                                nkListSolInfo.ShowCombat = true;
                                EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(current7.GetCharKind(), current7.GetGrade());

                                if (eventHeroCharCode != null)
                                {
                                    newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                                }
                                else
                                {
                                    UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(current7.GetCharKind(), (int)current7.GetGrade());

                                    if (legendFrame != null)
                                    {
                                        newListItem.SetListItemData(0, legendFrame, null, null, null);
                                    }
                                    else
                                    {
                                        newListItem.SetListItemData(0, true);
                                    }
                                }
                                newListItem.SetListItemData(1, nkListSolInfo, current7, null, null);
                                string empty = string.Empty;
                                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                                {
                                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1435"),
                                    "charname",
                                    current7.GetName()
                                });

                                newListItem.SetListItemData(2, empty, null, null, null);
                                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                                {
                                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031"),
                                    "count",
                                    current7.GetLevel()
                                });

                                newListItem.SetListItemData(3, empty, null, null, null);
                                this.m_nlSelectSoldierList.Add(newListItem);
                            }
                        }
                    }
                }
            }
        }
        this.m_nlSelectSoldierList.RepositionItems();
    }
Example #20
0
    public void AddTicketSellInfo()
    {
        for (int i = 0; i < this.m_TicketSellInfoList.Count; i++)
        {
            TICKET_SELL_INFO tICKET_SELL_INFO = this.m_TicketSellInfoList[i];
            NewListItem      newListItem      = new NewListItem(this.m_TicketList.ColumnNum, true, string.Empty);
            NrCharKindInfo   charKindInfo     = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(tICKET_SELL_INFO.i32CharKind);

            if (charKindInfo != null)
            {
                if (NrTSingleton <ContentsLimitManager> .Instance.IsTicketSell(tICKET_SELL_INFO.i32CharKind))
                {
                    NkSoldierInfo nkSoldierInfo = new NkSoldierInfo();
                    nkSoldierInfo.SetCharKind(tICKET_SELL_INFO.i32CharKind);
                    byte b = tICKET_SELL_INFO.i8Grade;
                    b -= 1;
                    nkSoldierInfo.SetGrade(b);
                    EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(tICKET_SELL_INFO.i32CharKind, tICKET_SELL_INFO.i8Grade);

                    if (eventHeroCharCode != null)
                    {
                        newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                        newListItem.SetListItemData(4, true);
                    }
                    else
                    {
                        UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(tICKET_SELL_INFO.i32CharKind, (int)tICKET_SELL_INFO.i8Grade);

                        if (legendFrame != null)
                        {
                            newListItem.SetListItemData(0, legendFrame, null, null, null);
                        }
                        newListItem.SetListItemData(4, false);
                    }
                    string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(tICKET_SELL_INFO.i32CharKind, (int)tICKET_SELL_INFO.i8Grade, charKindInfo.GetName());

                    newListItem.SetListItemData(1, nkSoldierInfo.GetListSolInfo(false), null, null, null);
                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2211"),
                        "rank",
                        tICKET_SELL_INFO.i8Grade,
                        "solname",
                        legendName,
                        "count",
                        tICKET_SELL_INFO.i32HeartsNum
                    });

                    newListItem.SetListItemData(2, empty, null, null, null);
                    newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("573"), i, new EZValueChangedDelegate(this.ClickTicketSellInfo), null);
                    if (NkUserInventory.GetInstance().Get_First_ItemCnt(70000) < tICKET_SELL_INFO.i32HeartsNum)
                    {
                        newListItem.SetListItemEnable(3, false);
                    }
                    else
                    {
                        newListItem.SetListItemEnable(3, true);
                    }
                    newListItem.Data = eSolRecruitType.SOLRECRUIT_TICKET_SELL_INFO;
                    newListItem.SetListItemData(5, string.Empty, tICKET_SELL_INFO.i32CharKind, new EZValueChangedDelegate(this.ClickTicketSellInfoDetail), null);
                    this.m_TicketList.Add(newListItem);
                }
            }
        }
    }
Example #21
0
    public void _LinkSolDataInfiBattle()
    {
        int num = 0;

        this.m_lbSolList.Clear();
        foreach (GS_BATTLE_RESULT_SOLDIER current in this.m_SolInfoList)
        {
            NewListItem    newListItem  = new NewListItem(this.m_lbSolList.ColumnNum, true, string.Empty);
            NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.CharKind);

            if (charKindInfo != null)
            {
                NkListSolInfo nkListSolInfo = new NkListSolInfo();
                nkListSolInfo.SolCharKind     = current.CharKind;
                nkListSolInfo.SolGrade        = current.SolGrade;
                nkListSolInfo.SolInjuryStatus = current.bInjury;
                nkListSolInfo.SolLevel        = current.i16Level;
                nkListSolInfo.ShowLevel       = true;
                if (NrTSingleton <NrCharCostumeTableManager> .Instance.IsCostumeUniqueEqualSolKind(current.i32CostumeUnique, current.CharKind))
                {
                    nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current.i32CostumeUnique);
                }
                EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(current.CharKind, (byte)current.SolGrade);

                Texture2D portraitLeaderSol = this.GetPortraitLeaderSol(current.CharKind);
                if (portraitLeaderSol != null)
                {
                    newListItem.SetListItemData(1, portraitLeaderSol, null, null, null, null);
                }
                else
                {
                    if (eventHeroCharCode != null)
                    {
                        newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                        newListItem.EventMark = true;
                    }
                    else
                    {
                        UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(current.CharKind, current.SolGrade);

                        if (legendFrame != null)
                        {
                            newListItem.SetListItemData(0, legendFrame, null, null, null);
                        }
                    }
                    newListItem.SetListItemData(1, nkListSolInfo, null, null, null);
                }
                string text = string.Empty;
                if (NrTSingleton <NrCharKindInfoManager> .Instance.IsUserCharKind(current.CharKind))
                {
                    text = TKString.NEWString(this.m_InfiBattleInfo.strAttackName);
                }
                else
                {
                    text = charKindInfo.GetName();
                }
                string text2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471"),
                    "targetname",
                    text,
                    "count",
                    current.i16Level
                });

                short  gradeMaxLevel = charKindInfo.GetGradeMaxLevel((short)((byte)current.SolGrade));
                string str           = string.Empty;
                if (gradeMaxLevel <= current.i16Level)
                {
                    str = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");
                }
                else
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref str, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1802"),
                        "exp",
                        ANNUALIZED.Convert(current.i32AddExp)
                    });
                }
                text2 += "\r\n";
                text2 += str;
                newListItem.SetListItemData(2, text2, null, null, null);
                this.m_lbSolList.Add(newListItem);
                this.m_lbSolList.RepositionItems();
                num++;
                if (nkListSolInfo.SolInjuryStatus)
                {
                    this.m_nInjurySolCount++;
                }
            }
        }
    }
Example #22
0
    public void SetStoryCommentList(byte canLike, StoryComment_Info[] array)
    {
        if (canLike == 0)
        {
            this.m_Like.controlIsEnabled = false;
        }
        if (array == null)
        {
            return;
        }
        if (this.m_DetailList.ChangeLineHeight)
        {
            this.m_DetailList.ChangeLineHeight = false;
            this.m_DetailList.LineHeight       = 114f;
            this.m_DetailList.SetColumnData("Mobile/DLG/StoryChat/NLB_News01_ColumnData" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        }
        string     b     = string.Empty;
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null)
        {
            b = @char.GetCharName();
        }
        int num = 0;

        for (int i = array.Length - 1; i >= 0; i--)
        {
            if (array[i].nStoryCommentID != 0L)
            {
                NewListItem newListItem = new NewListItem(this.m_DetailList.ColumnNum, true, string.Empty);
                Texture2D   texture2D   = null;
                if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG))
                {
                    StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg;

                    if (storyChatDlg != null)
                    {
                        texture2D = storyChatDlg.GetFriendPortraitPersonID(array[i].nPersonID);
                    }
                }
                if (texture2D != null)
                {
                    newListItem.SetListItemData(1, texture2D, null, null, null, null);
                }
                else
                {
                    EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(array[i].nCharKind);

                    if (eventHeroCharFriendCode != null)
                    {
                        newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                        newListItem.EventMark = true;
                    }
                    newListItem.SetListItemData(1, new CostumeDrawTextureInfo
                    {
                        charKind            = array[i].nCharKind,
                        grade               = -1,
                        costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[i].nFaceCharCostumeUnique)
                    }, null, null, null);
                }
                string text = TKString.NEWString(array[i].szName);
                newListItem.SetListItemData(2, NrTSingleton <UIDataManager> .Instance.GetString(text, "(", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), array[i].nLevel.ToString(), ")"), null, null, null);
                DateTime dueDate           = PublicMethod.GetDueDate(array[i].nTime);
                string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

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

                newListItem.SetListItemData(3, empty, null, null, null);
                string text2 = TKString.NEWString(array[i].szMessage);
                newListItem.SetListItemData(4, text2, null, null, null);
                newListItem.SetListItemData(5, string.Empty, text, new EZValueChangedDelegate(this.ClickUser), null);
                if (this.m_bMyStoryChat || text == b)
                {
                    newListItem.SetListItemData(6, string.Empty, array[i].nStoryCommentID, new EZValueChangedDelegate(this.DeleteStoryComment), null);
                }
                else
                {
                    newListItem.SetListItemData(6, false);
                }
                newListItem.Data = array[i];
                if (!this.m_bAddComment)
                {
                    this.m_DetailList.Add(newListItem);
                    TsLog.LogError("m_bAddComment ={0} CommentID:{1} Message:{2}", new object[]
                    {
                        this.m_bAddComment,
                        array[i].nStoryCommentID,
                        text2
                    });
                }
                else
                {
                    this.m_DetailList.InsertAdd(1 + num++, newListItem);
                    TsLog.LogError("InsertAdd m_bAddComment ={0} Count = {3} CommentID:{1} Message:{2}", new object[]
                    {
                        this.m_bAddComment,
                        array[i].nStoryCommentID,
                        text2,
                        num
                    });
                }
                this.m_nCommentCount++;
            }
        }
        this.m_DetailList.RepositionItems();
        this.m_bAddComment    = true;
        this.m_nLastCommentID = array[array.Length - 1].nStoryCommentID;
        TsLog.LogError("m_nCommentCount ={0} m_nLastCommentID ={1}", new object[]
        {
            this.m_nCommentCount,
            this.m_nLastCommentID
        });
    }
    public void SetOccupyDetailinfo(NkSoldierInfo info)
    {
        this.InitOccSolInfo();
        string empty = string.Empty;
        string str   = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"),
            "count",
            info.m_kBase.Level.ToString(),
            "targetname",
            info.GetName()
        });

        bool flag = false;

        if (this.m_expeditiondetailinfo.ui8ExpeditionState == 1)
        {
            str = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1525");

            flag = true;
        }
        else if (this.m_expeditiondetailinfo.ui8ExpeditionState == 4)
        {
            str = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1526");

            flag = true;
        }
        if (flag)
        {
            this.m_laOccSelectMemberName.SetText(empty + " (" + str + ")");
        }
        else
        {
            this.m_laOccSelectMemberName.SetText(empty);
        }
        if (info != null)
        {
            for (int i = 0; i < 15; i++)
            {
                if (info.m_kBase.BattlePos >= 0)
                {
                    if (info.m_kBase.CharKind > 0)
                    {
                        if (this.m_pksolinfo[i] != null)
                        {
                            if (this.m_pksolinfo[i].m_kBase.SolPosIndex == info.m_kBase.SolPosIndex)
                            {
                                NkListSolInfo nkListSolInfo = new NkListSolInfo();
                                nkListSolInfo.ShowCombat             = true;
                                nkListSolInfo.FightPower             = (long)this.m_pksolinfo[i].GetFightPower();
                                nkListSolInfo.SolLevel               = this.m_pksolinfo[i].m_kBase.Level;
                                nkListSolInfo.SolCharKind            = this.m_pksolinfo[i].m_kBase.CharKind;
                                nkListSolInfo.SolGrade               = (int)this.m_pksolinfo[i].m_kBase.Grade;
                                nkListSolInfo.ShowLevel              = false;
                                nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_pksolinfo[i]);

                                EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(nkListSolInfo.SolCharKind, (byte)nkListSolInfo.SolGrade);

                                if (eventHeroCharCode != null)
                                {
                                    this.m_dtOccSolBG[(int)this.m_pksolinfo[i].m_kBase.BattlePos].SetTexture("Win_I_EventSol");
                                }
                                else
                                {
                                    UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(nkListSolInfo.SolCharKind, (int)((byte)nkListSolInfo.SolGrade));

                                    if (legendFrame != null)
                                    {
                                        this.m_dtOccSolBG[(int)this.m_pksolinfo[i].m_kBase.BattlePos].SetTexture(legendFrame);
                                    }
                                }
                                this.m_itOccSol[(int)this.m_pksolinfo[i].m_kBase.BattlePos].SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo, false);
                            }
                        }
                    }
                }
            }
        }
    }
Example #24
0
    public void SetStoryChatList(int type, StoryChat_Info[] array)
    {
        this.m_nOldTabIndex = this.m_nCurrentTabInex;
        long guildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID();

        this.m_StoryChatList.SetColumnData("Mobile/DLG/StoryChat/NLB_Talk_ColumnData" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        for (int i = 0; i < StoryChatDlg.MAX_STORYCHAT_LIST_NUM; i++)
        {
            this.m_CurrentStoryChatInfo[i].Init();
        }
        for (int j = 0; j < array.Length; j++)
        {
            this.m_CurrentStoryChatInfo[j] = array[j];
        }
        this.refreshFriendPortrait();
        if (array.Length != StoryChatDlg.MAX_STORYCHAT_LIST_NUM)
        {
            this.m_Next.controlIsEnabled = false;
        }
        else
        {
            this.m_Next.controlIsEnabled = true;
        }
        if (this.m_nCurrentPage == 1)
        {
            this.m_Prev.controlIsEnabled = false;
        }
        else
        {
            this.m_Prev.controlIsEnabled = true;
        }
        this.m_StoryChatList.Clear();
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        string key      = charPersonInfo.GetCharName() + "LastFriendStoryChatID";
        string key2     = charPersonInfo.GetCharName() + "LastGuildStoryChatID";
        string charName = charPersonInfo.GetCharName();
        string s        = string.Empty;
        long   num      = 0L;

        if (type == 0)
        {
            string key3 = charName + "NewStoryChatID";
            if (PlayerPrefs.HasKey(key3))
            {
                s   = PlayerPrefs.GetString(key3);
                num = long.Parse(s);
            }
            string s2   = string.Empty;
            long   num2 = 0L;
            if (PlayerPrefs.HasKey(key))
            {
                s2   = PlayerPrefs.GetString(key);
                num2 = long.Parse(s2);
            }
            if (num2 < array[0].nLastCommentID)
            {
                PlayerPrefs.SetString(key, array[0].nLastCommentID.ToString());
            }
        }
        else if (type == 1)
        {
            string key4 = charName + NrTSingleton <NewGuildManager> .Instance.GetGuildName();

            if (PlayerPrefs.HasKey(key4))
            {
                s   = PlayerPrefs.GetString(key4);
                num = long.Parse(s);
            }
            string s3   = string.Empty;
            long   num3 = 0L;
            if (PlayerPrefs.HasKey(key2))
            {
                s3   = PlayerPrefs.GetString(key2);
                num3 = long.Parse(s3);
            }
            if (num3 < array[0].nLastCommentID)
            {
                if (guildID != 0L)
                {
                    PlayerPrefs.SetString(key2, array[0].nLastCommentID.ToString());
                }
                else
                {
                    PlayerPrefs.SetString(key2, "0");
                }
            }
        }
        for (int k = 0; k < array.Length; k++)
        {
            NewListItem       newListItem    = new NewListItem(this.m_StoryChatList.ColumnNum, true, string.Empty);
            StoryChatPortrait community_User = this.GetCommunity_User(array[k].nPersonID);
            if (community_User != null)
            {
                Texture2D friendPortraitPersonID = this.GetFriendPortraitPersonID(array[k].nPersonID);
                if (friendPortraitPersonID != null)
                {
                    newListItem.SetListItemData(1, friendPortraitPersonID, null, null, null, null);
                }
                else
                {
                    EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(array[k].nCharKind);

                    if (eventHeroCharFriendCode != null)
                    {
                        newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                        newListItem.EventMark = true;
                    }
                    newListItem.SetListItemData(1, new CostumeDrawTextureInfo
                    {
                        imageType           = eCharImageType.SMALL,
                        charKind            = array[k].nCharKind,
                        costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[k].nFaceCharCostumeUnique)
                    }, null, null, null);
                }
            }
            else
            {
                CostumeDrawTextureInfo costumeDrawTextureInfo = new CostumeDrawTextureInfo();
                costumeDrawTextureInfo.imageType           = eCharImageType.SMALL;
                costumeDrawTextureInfo.charKind            = array[k].nCharKind;
                costumeDrawTextureInfo.costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[k].nFaceCharCostumeUnique);

                newListItem.SetListItemData(1, costumeDrawTextureInfo, null, null, null);
                if (costumeDrawTextureInfo.costumePortraitPath == string.Empty)
                {
                    StoryChatPortrait storyChatPortrait = new StoryChatPortrait();
                    storyChatPortrait.Set(array[k].nPersonID, true);
                    this.m_UserPortraitList.Add(storyChatPortrait);
                }
            }
            string text = TKString.NEWString(array[k].szName);
            if (0L < array[k].nGuildID)
            {
                newListItem.SetListItemData(2, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + text, null, null, null);
            }
            else
            {
                newListItem.SetListItemData(2, text, null, null, null);
            }
            newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + array[k].nLevel.ToString(), null, null, null);
            DateTime dueDate           = PublicMethod.GetDueDate(array[k].nTime);
            string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

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

            newListItem.SetListItemData(4, empty, null, null, null);
            string text2 = TKString.NEWString(array[k].szMessage);
            text2 = text2.Replace("\n", " ");
            if (89 < text2.Length)
            {
                text2  = text2.Substring(0, 89);
                text2 += "...";
            }
            newListItem.SetListItemData(6, text2, null, null, null);
            newListItem.SetListItemData(9, array[k].nCommentCount.ToString(), null, null, null);
            newListItem.SetListItemData(10, array[k].nLikeCount.ToString(), null, null, null);
            if (type == 0 || type == 1)
            {
                if (array[k].nStoryChatID > num)
                {
                    newListItem.SetListItemData(12, true);
                }
                else
                {
                    newListItem.SetListItemData(12, false);
                }
            }
            else
            {
                newListItem.SetListItemData(12, false);
            }
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            if (@char != null)
            {
                if (text == @char.GetCharName())
                {
                    newListItem.SetListItemData(14, string.Empty, array[k].nStoryChatID, new EZValueChangedDelegate(this.DeleteStoryChat), null);
                }
                else
                {
                    newListItem.SetListItemData(14, false);
                }
            }
            this.m_StoryChatList.Add(newListItem);
        }
        this.m_StoryChatList.RepositionItems();
        this.m_Page.Text = this.m_nCurrentPage.ToString();
        if (type == 1 && guildID <= 0L)
        {
            this.InitStoryChatList(type);
        }
    }
    public void UpsateSoldierList()
    {
        if (this.m_SolList != null)
        {
            for (int i = 0; i < 6; i++)
            {
                NkSoldierInfo soldierInfo = this.m_SolList.GetSoldierInfo(i);
                if (soldierInfo != null && soldierInfo.IsValid())
                {
                    EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(soldierInfo.GetCharKind(), soldierInfo.GetGrade());

                    if (i == 0)
                    {
                        CommunityUI_DLG communityUI_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.COMMUNITY_DLG) as CommunityUI_DLG;

                        if (communityUI_DLG != null)
                        {
                            COMMUNITY_USER_INFO community_User = communityUI_DLG.GetCommunity_User(this.m_PersonID);
                            if (community_User != null && community_User.UserPortrait != null)
                            {
                                this.m_dtSlot[this.Info_mode][i].SetTexture(community_User.UserPortrait);
                            }
                            else
                            {
                                this.SetSolierTexutre(eventHeroCharCode, i, soldierInfo);
                            }
                        }
                        else
                        {
                            this.SetSolierTexutre(eventHeroCharCode, i, soldierInfo);
                        }
                    }
                    else
                    {
                        this.SetSolierTexutre(eventHeroCharCode, i, soldierInfo);
                    }
                    string empty = string.Empty;
                    string charNameBySoldierInfo = this.GetCharNameBySoldierInfo(soldierInfo);
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"),
                        "count",
                        soldierInfo.GetLevel(),
                        "targetname",
                        charNameBySoldierInfo
                    });

                    this.m_btSlot[this.Info_mode][i].ToolTip = empty;
                    Button expr_153 = this.m_btSlot[this.Info_mode][i];
                    expr_153.Click = (EZValueChangedDelegate)Delegate.Combine(expr_153.Click, new EZValueChangedDelegate(this.OnClickSol));
                    this.SOLDIER_EQUIPINFO_REQ(this.m_PersonID, soldierInfo.GetSolID());
                }
                else
                {
                    this.m_dtSlot[this.Info_mode][i].SetTexture("NULL");
                    this.m_btSlot[this.Info_mode][i].ShowToolTip = false;
                }
            }
            NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
            if (kMyCharInfo.m_PersonID == this.m_PersonID || kMyCharInfo.m_kFriendInfo.IsFriend(kMyCharInfo.m_PersonID))
            {
                this.m_btAddFriend.Visible = false;
            }
        }
    }
Example #26
0
    public void SetHeroEventLabel(byte bGrade)
    {
        if (this.m_kSelectCharKindInfo == null)
        {
            return;
        }
        for (int i = 0; i < 2; i++)
        {
            this.m_Lebel_EventHero[i].Hide(true);
        }
        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(this.m_kSelectCharKindInfo.GetCharKind(), bGrade - 1);

        if (eventHeroCharCode == null)
        {
            this.m_Label_EventDate.Visible   = false;
            this.m_DrawTexture_Event.Visible = false;
            return;
        }
        string arg = string.Format("?/?", new object[0]);

        if (eventHeroCharCode.tEndTime > eventHeroCharCode.tStartTime)
        {
            arg = string.Format("{0}/{1}", eventHeroCharCode.tEndTime.Month.ToString(), eventHeroCharCode.tEndTime.Day.ToString());
        }
        string text = string.Format("{0}/{1} ~ {2}", eventHeroCharCode.tStartTime.Month.ToString(), eventHeroCharCode.tStartTime.Day.ToString(), arg);

        this.m_Label_EventDate.Visible = false;
        int num = 0;

        if (eventHeroCharCode.i32Attack != 100)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2191"),
                "count",
                eventHeroCharCode.i32Attack.ToString()
            });

            this.m_Lebel_EventHero[num].SetText(text);
            this.m_Lebel_EventHero[num].Hide(false);
            num++;
        }
        if (eventHeroCharCode.i32Hp != 100)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2192"),
                "count",
                eventHeroCharCode.i32Hp.ToString()
            });

            text = NrTSingleton <UIDataManager> .Instance.GetString("H P : ", eventHeroCharCode.i32Hp.ToString(), "%");

            this.m_Lebel_EventHero[num].SetText(text);
            this.m_Lebel_EventHero[num].Hide(false);
        }
        this.m_DrawTexture_Event.Visible = true;
        Transform child = NkUtil.GetChild(this.m_DrawTexture_Event.gameObject.transform, "child_effect");

        if (child == null)
        {
            NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_UI_EVENTFONT", this.m_DrawTexture_Event, this.m_DrawTexture_Event.GetSize());
        }
    }
Example #27
0
    public void UpdateUserPersonID(long i64PersonID)
    {
        for (int i = 0; i < this.m_StoryChatList.Count; i++)
        {
            UIListItemContainer item = this.m_StoryChatList.GetItem(i);
            if (!(item == null))
            {
                StoryChat_Info storyChat_Info = (StoryChat_Info)item.data;
                if (storyChat_Info != null)
                {
                    if (storyChat_Info.nPersonID == i64PersonID)
                    {
                        NewListItem newListItem            = new NewListItem(this.m_StoryChatList.ColumnNum, true, string.Empty);
                        Texture2D   friendPortraitPersonID = this.GetFriendPortraitPersonID(storyChat_Info.nPersonID);
                        if (friendPortraitPersonID != null)
                        {
                            newListItem.SetListItemData(1, friendPortraitPersonID, null, null, null, null);
                        }
                        else
                        {
                            EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(storyChat_Info.nCharKind);

                            if (eventHeroCharFriendCode != null)
                            {
                                newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                                newListItem.EventMark = true;
                            }
                            newListItem.SetListItemData(1, storyChat_Info.nCharKind, null, null, null);
                        }
                        string text = TKString.NEWString(storyChat_Info.szName);
                        if (0L < storyChat_Info.nGuildID)
                        {
                            newListItem.SetListItemData(2, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + text, null, null, null);
                        }
                        else
                        {
                            newListItem.SetListItemData(2, text, null, null, null);
                        }
                        newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + storyChat_Info.nLevel.ToString(), null, null, null);
                        DateTime dueDate           = PublicMethod.GetDueDate(storyChat_Info.nTime);
                        string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

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

                        newListItem.SetListItemData(4, empty, null, null, null);
                        string text2 = TKString.NEWString(storyChat_Info.szMessage);
                        text2 = text2.Replace("\n", " ");
                        if (89 < text2.Length)
                        {
                            text2  = text2.Substring(0, 89);
                            text2 += "...";
                        }
                        newListItem.SetListItemData(6, text2, null, null, null);
                        newListItem.SetListItemData(9, storyChat_Info.nCommentCount.ToString(), null, null, null);
                        newListItem.SetListItemData(10, storyChat_Info.nLikeCount.ToString(), null, null, null);
                        newListItem.SetListItemData(12, false);
                        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                        if (@char != null)
                        {
                            if (text == @char.GetCharName())
                            {
                                newListItem.SetListItemData(14, string.Empty, storyChat_Info.nStoryChatID, new EZValueChangedDelegate(this.DeleteStoryChat), null);
                            }
                            else
                            {
                                newListItem.SetListItemData(14, false);
                            }
                        }
                        this.m_StoryChatList.RemoveAdd(i, newListItem);
                    }
                }
            }
        }
        this.m_StoryChatList.RepositionItems();
    }
Example #28
0
    public void SetList()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        this.m_lbCurrentStatus.Clear();
        string text  = string.Empty;
        string empty = string.Empty;
        int    num   = 0;

        foreach (EXPEDITION_CURRENT_STATE_INFO current in this.m_listExpedition_CurrentStatus)
        {
            NewListItem newListItem = new NewListItem(this.m_lbCurrentStatus.ColumnNum, true, string.Empty);
            if ((current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 3) && current.i64Time == current.i64CheckBattleTime)
            {
                newListItem.SetListItemData(0, true);
                newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"), current, new EZValueChangedDelegate(this.OnClickBackMove), null);
            }
            else
            {
                newListItem.SetListItemData(0, false);
            }
            newListItem.SetListItemData(1, this.GetExpeditionState(current), null, null, null);
            if (current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 2 || current.ui8ExpeditionState == 4)
            {
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo != null)
                {
                    NkSoldierInfo leaderSolInfo = validExpeditionMilitaryInfo.GetLeaderSolInfo();
                    if (leaderSolInfo != null)
                    {
                        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(leaderSolInfo.GetCharKind(), leaderSolInfo.GetGrade());

                        if (eventHeroCharCode != null)
                        {
                            newListItem.SetListItemData(5, "Win_I_EventSol", null, null, null);
                        }
                        else
                        {
                            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(leaderSolInfo.GetCharKind(), (int)leaderSolInfo.GetGrade());

                            if (legendFrame != null)
                            {
                                newListItem.SetListItemData(5, legendFrame, null, null, null);
                            }
                            else
                            {
                                newListItem.SetListItemData(5, "Win_I_Cancel", null, null, null);
                            }
                        }
                        newListItem.SetListItemData(7, leaderSolInfo.GetListSolInfo(false), null, null, null);
                        newListItem.SetListItemData(3, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    }
                    newListItem.SetListItemData(9, leaderSolInfo.GetCharKindInfo().GetName(), null, null, null);
                }
                EXPEDITION_CREATE_DATA expedtionCreateData = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData != null)
                {
                    EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expedtionCreateData.EXPEDITION_GRADE);
                    if (expeditionDataFromGrade != null)
                    {
                        newListItem.SetListItemData(8, false);
                        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(expeditionDataFromGrade.Expedition_ICON_NAME);

                        if (uIBaseInfoLoader != null)
                        {
                            newListItem.SetListItemData(4, uIBaseInfoLoader, current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        }
                        newListItem.SetListItemData(10, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_GRADE_INTERFACEKEY), null, null, null);
                    }
                }
            }
            else if (current.ui8ExpeditionState == 3)
            {
                EXPEDITION_CREATE_DATA expedtionCreateData2 = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData2 != null)
                {
                    int num2 = expedtionCreateData2.EXPEDITION_ECO[0];
                    ECO eco  = NrTSingleton <NrBaseTableManager> .Instance.GetEco(num2.ToString());

                    if (eco != null)
                    {
                        newListItem.SetListItemData(7, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), null, null, null);
                        newListItem.SetListItemData(3, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        newListItem.SetListItemData(9, NrTSingleton <NrCharKindInfoManager> .Instance.GetName(NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0])), null, null, null);
                    }
                }
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo2 = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo2 != null)
                {
                    NkSoldierInfo leaderSolInfo2 = validExpeditionMilitaryInfo2.GetLeaderSolInfo();
                    if (leaderSolInfo2 != null)
                    {
                        UIBaseInfoLoader legendFrame2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(leaderSolInfo2.GetCharKind(), (int)leaderSolInfo2.GetGrade());

                        if (legendFrame2 != null)
                        {
                            newListItem.SetListItemData(6, legendFrame2, null, null, null);
                        }
                        else
                        {
                            newListItem.SetListItemData(6, "Win_I_Cancel", null, null, null);
                        }
                        newListItem.SetListItemData(8, leaderSolInfo2.GetListSolInfo(false), null, null, null);
                    }
                    newListItem.SetListItemData(4, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    newListItem.SetListItemData(10, leaderSolInfo2.GetCharKindInfo().GetName(), null, null, null);
                }
            }
            newListItem.Data = current;
            this.m_lbCurrentStatus.Add(newListItem);
            num++;
        }
        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1633");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            text,
            "count1",
            this.m_Page,
            "count2",
            this.m_MaxPage
        });

        this.m_bxPage.SetText(empty);
        this.m_lbCurrentStatus.RepositionItems();
    }
Example #29
0
    public void SetCommentList(long _CommentID)
    {
        if (this.m_CurrentCommentInfo == null)
        {
            return;
        }
        NewListItem newListItem = new NewListItem(this.m_DetailList.ColumnNum, true, string.Empty);
        Texture2D   texture2D   = null;

        if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG))
        {
            StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg;

            if (storyChatDlg != null)
            {
                texture2D = storyChatDlg.GetFriendPortraitPersonID(this.m_CurrentCommentInfo.nPersonID);
            }
        }
        if (texture2D != null)
        {
            newListItem.SetListItemData(1, texture2D, null, null, null, null);
        }
        else
        {
            EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(this.m_CurrentCommentInfo.nCharKind);

            if (eventHeroCharFriendCode != null)
            {
                newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                newListItem.EventMark = true;
            }
            newListItem.SetListItemData(1, new CostumeDrawTextureInfo
            {
                charKind            = this.m_CurrentCommentInfo.nCharKind,
                grade               = -1,
                costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_CurrentCommentInfo.nFaceCharCostumeUnique)
            }, null, null, null);
        }
        string text = TKString.NEWString(this.m_CurrentCommentInfo.szName);

        newListItem.SetListItemData(2, NrTSingleton <UIDataManager> .Instance.GetString(text, "(", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), this.m_CurrentCommentInfo.nLevel.ToString(), ")"), null, null, null);
        DateTime nowTime           = PublicMethod.GetNowTime();
        string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromInterface,
            "month",
            nowTime.Month,
            "day",
            nowTime.Day,
            "hour",
            nowTime.Hour,
            "min",
            nowTime.Minute
        });

        newListItem.SetListItemData(3, empty, null, null, null);
        newListItem.SetListItemData(4, TKString.NEWString(this.m_CurrentCommentInfo.szMessage), null, null, null);
        newListItem.SetListItemData(5, string.Empty, text, new EZValueChangedDelegate(this.ClickUser), null);
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null)
        {
            if (text == @char.GetCharName())
            {
                newListItem.SetListItemData(6, string.Empty, _CommentID, new EZValueChangedDelegate(this.DeleteStoryComment), null);
            }
            else
            {
                newListItem.SetListItemData(6, false);
            }
        }
        else
        {
            newListItem.SetListItemData(6, false);
        }
        newListItem.Data = _CommentID;
        this.m_nCommentCount++;
        this.m_DetailList.InsertAdd(this.m_DetailList.Count, newListItem);
        this.m_DetailList.RepositionItems();
        this.m_DetailList.ScrollPosition = 1f;
        this.m_CurrentCommentInfo        = null;
    }