Esempio n. 1
0
 public void SetBattleControlSkillTooltip(G_ID eWidowID, int battleSkillUnique, int battleSkillLevel, int KeepTurn, NkSoldierInfo solInfo)
 {
     Tooltip_Dlg.m_eParentWindowID = eWidowID;
     Tooltip_Dlg.BattleControlSkill_Tooltip(this, battleSkillUnique, battleSkillLevel, eWidowID, KeepTurn, solInfo);
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     this.Show();
 }
    private void SetItemColum(ITEM itemdata, int pos, ref NewListItem item)
    {
        this.m_Text.Remove(0, this.m_Text.Length);
        string rankColorName = NrTSingleton <ItemManager> .Instance.GetRankColorName(itemdata);

        item.SetListItemData(1, itemdata, true, null, null);
        item.SetListItemData(2, rankColorName, null, null, null);
        if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_WEAPON)
        {
            int nValue       = Protocol_Item.Get_Min_Damage(itemdata);
            int optionValue  = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 1);
            int nValue2      = Protocol_Item.Get_Max_Damage(itemdata);
            int optionValue2 = Tooltip_Dlg.GetOptionValue(itemdata, nValue2, 1);
            this.m_Text.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("242") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString(), " ~ ", optionValue2.ToString()));
        }
        else if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_ARMOR)
        {
            int nValue      = Protocol_Item.Get_Defense(itemdata);
            int optionValue = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 2);
            this.m_Text.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("243") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString()));
        }
        item.SetListItemData(3, this.m_Text.ToString(), null, null, null);
        item.SetListItemData(4, string.Empty, itemdata, new EZValueChangedDelegate(this.OnClickItemView), null);
        item.Data = itemdata;
    }
Esempio n. 3
0
    private static void Draw_Star(Form cForm, float fY, float fWidth, int nRank)
    {
        Rect  rcRect = default(Rect);
        float num    = fWidth / 2f - Tooltip_Dlg.F_STAR_MAX_WIDTH / 2f;
        int   num2   = nRank % 5;

        if (num2 == 0 && nRank != 0)
        {
            num2 = 5;
        }
        string l_strTexture = (nRank <= 5) ? "Com_I_Star24" : "Com_I_Star21";
        int    i;

        for (i = 0; i < num2; i++)
        {
            string strName = "Star_" + i;
            rcRect.x      = num + (float)i * 22f;
            rcRect.y      = fY;
            rcRect.width  = 20f;
            rcRect.height = Tooltip_Dlg.F_STAR_HEIGHT;
            Tooltip_Dlg.Create_DrawTexture(cForm, strName, l_strTexture, rcRect, 1f);
        }
        while (i < 5)
        {
            string strName2      = "StarBack_" + i;
            string l_strTexture2 = (nRank <= 5) ? "Com_I_Star22" : "Com_I_Star24";
            rcRect.x      = num + (float)i * 22f;
            rcRect.y      = fY;
            rcRect.width  = 20f;
            rcRect.height = Tooltip_Dlg.F_STAR_HEIGHT;
            Tooltip_Dlg.Create_DrawTexture(cForm, strName2, l_strTexture2, rcRect, 1f);
            i++;
        }
    }
Esempio n. 4
0
 public void Set_Tooltip(ITEM pkItem)
 {
     this.m_cItem = pkItem;
     Tooltip_Dlg.Item_Tooltip(this, this.m_cItem, G_ID.NONE);
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     this.Show();
 }
Esempio n. 5
0
    private void SetItemColum(ITEM itemdata, int pos, ref ListItem item)
    {
        StringBuilder stringBuilder = new StringBuilder();

        item.SetColumnGUIContent(0, itemdata, true);
        item.SetColumnStr(1, NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(itemdata));
        int rank = itemdata.m_nOption[2];

        item.SetColumnStr(2, ItemManager.RankTextColor(rank) + ItemManager.RankText(rank));
        stringBuilder.Remove(0, stringBuilder.Length);
        if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_WEAPON)
        {
            int nValue       = Protocol_Item.Get_Min_Damage(itemdata);
            int optionValue  = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 1);
            int nValue2      = Protocol_Item.Get_Max_Damage(itemdata);
            int optionValue2 = Tooltip_Dlg.GetOptionValue(itemdata, nValue2, 1);
            stringBuilder.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("242") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString(), " ~ ", optionValue2.ToString()));
        }
        else if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_ARMOR)
        {
            int nValue      = Protocol_Item.Get_Defense(itemdata);
            int optionValue = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 2);
            stringBuilder.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("243") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString()));
        }
        item.SetColumnStr(3, stringBuilder.ToString());
        item.Key = itemdata;
    }
Esempio n. 6
0
 public static void Item_Tooltip(Form cThis, ITEM pkItem, G_ID eWidowID, bool bEquiped)
 {
     Tooltip_Dlg.Tooltip_Text_Info[] array = Tooltip_Dlg.Get_Item_Text_Info(pkItem, null, eWidowID, bEquiped);
     if (array != null)
     {
         Tooltip_Dlg.Tooltip_Base(cThis, array, pkItem.m_nRank, eWidowID, 0);
     }
 }
Esempio n. 7
0
 public static void BattleControlSkill_Tooltip(Form cThis, int battleSkillUnique, int battleSkillLevel, G_ID eWidowID, int KeepTurn, NkSoldierInfo solInfo)
 {
     Tooltip_Dlg.Tooltip_Text_Info[] battleControlSkillTextInfo = Tooltip_Dlg.GetBattleControlSkillTextInfo(battleSkillUnique, battleSkillLevel, eWidowID, KeepTurn, solInfo);
     if (battleControlSkillTextInfo != null)
     {
         Tooltip_Dlg.Tooltip_Base(cThis, battleControlSkillTextInfo, 0, eWidowID, 0);
     }
 }
Esempio n. 8
0
 public static void Skill_Tooltip(Form cThis, int battleSkillUnique, int battleSkillLevel, G_ID eWidowID, NkSoldierInfo solInfo)
 {
     Tooltip_Dlg.Tooltip_Text_Info[] skillTextInfo = Tooltip_Dlg.GetSkillTextInfo(battleSkillUnique, battleSkillLevel, eWidowID, solInfo);
     if (skillTextInfo != null)
     {
         Tooltip_Dlg.Tooltip_Base(cThis, skillTextInfo, 0, eWidowID, 0);
     }
 }
Esempio n. 9
0
 public void Set_Tooltip(G_ID eWidowID, ITEM pkItem, bool showItemNum)
 {
     base.RemoveChildControl();
     Tooltip_Dlg.m_eParentWindowID = eWidowID;
     this.m_cItem = pkItem;
     Tooltip_Dlg.Item_Tooltip(this, this.m_cItem, eWidowID);
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     this.Show();
 }
Esempio n. 10
0
 public override void Update()
 {
     base.Update();
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     if (Tooltip_Dlg.m_eParentWindowID != G_ID.NONE && Tooltip_Dlg.m_eParentWindowID != G_ID.TERRITORY_TOOTIP && !NrTSingleton <FormsManager> .Instance.IsShow(Tooltip_Dlg.m_eParentWindowID))
     {
         this.Close();
     }
 }
Esempio n. 11
0
 public void Set_TooltipForEquip(G_ID eWidowID, ITEM pkEquipedItem, ITEM pkItem, bool bEquiped)
 {
     base.RemoveChildControl();
     Tooltip_Dlg.m_eParentWindowID = eWidowID;
     this.m_cItem = pkItem;
     Tooltip_Dlg.Item_Tooltip(this, pkEquipedItem, this.m_cItem, eWidowID, bEquiped);
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     this.Show();
 }
Esempio n. 12
0
 public void Set_Tooltip(G_ID eWidowID, int itemunique)
 {
     Tooltip_Dlg.m_eParentWindowID = eWidowID;
     this.m_cItem.Init();
     this.m_cItem.m_nItemUnique = itemunique;
     Tooltip_Dlg.Item_Tooltip(this, this.m_cItem, eWidowID);
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     this.Show();
 }
Esempio n. 13
0
    public void Set_Tooltip(G_ID a_eWidowID, ITEM a_cItem, bool bEquiped, Vector3 showPosition)
    {
        this.m_eParentWindowID = a_eWidowID;
        this.m_cItem           = a_cItem;
        Tooltip_Dlg.Item_Tooltip(this, this.m_cItem, this.m_eParentWindowID, bEquiped);
        Form cForm = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.TOOLTIP_DLG);

        Tooltip_Dlg.Tooltip_Rect(cForm, showPosition);
        this.Show();
    }
Esempio n. 14
0
    public void Set_TooltipForEquip(G_ID eWidowID, ITEM pkEquipedItem, ITEM pkItem, bool bEquiped)
    {
        this.m_eParentWindowID = eWidowID;
        this.m_cItem           = pkItem;
        Tooltip_Dlg.Item_Tooltip(this, pkEquipedItem, this.m_cItem, this.m_eParentWindowID, bEquiped);
        Form cForm = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.TOOLTIP_DLG);

        Tooltip_Dlg.Tooltip_Rect(cForm, Vector3.zero);
        this.Show();
    }
Esempio n. 15
0
 public void Set_Tooltip(G_ID eWidowID, string strText)
 {
     Tooltip_Dlg.m_eParentWindowID = eWidowID;
     this.m_strText = strText;
     if (this.m_strText == null)
     {
         return;
     }
     Tooltip_Dlg.Item_Tooltip(this, this.m_strText);
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     this.Show();
 }
Esempio n. 16
0
 public void Set_Tooltip(G_ID eWidowID, ITEM pkItem, ITEM pkEquipedItem)
 {
     if (!TsPlatform.IsMobile)
     {
         base.RemoveChildControl();
     }
     Tooltip_Dlg.m_eParentWindowID = eWidowID;
     this.m_cItem = pkItem;
     Tooltip_Dlg.Item_Tooltip(this, this.m_cItem, pkEquipedItem, eWidowID);
     Tooltip_Dlg.Tooltip_Rect(this, Vector3.zero);
     this.Show();
 }
Esempio n. 17
0
    public static int GetOptionValue(ITEM pkItem, int nValue, int OptionType)
    {
        int optionValue = 0;

        if (OptionType == Protocol_Item.GetStaticItemOption(pkItem.m_nItemUnique, 0))
        {
            optionValue = pkItem.m_nOption[0];
        }
        if (OptionType == Protocol_Item.GetStaticItemOption(pkItem.m_nItemUnique, 1))
        {
            optionValue = pkItem.m_nOption[1];
        }
        return(Tooltip_Dlg.GetOptionValue(pkItem.m_nItemUnique, optionValue, nValue, OptionType));
    }
Esempio n. 18
0
    private static void Draw_Line(Form cForm, float fY, float fWidth, bool bWhiteBG)
    {
        Rect rcRect = default(Rect);

        rcRect.x      = 0f;
        rcRect.y      = fY;
        rcRect.width  = fWidth;
        rcRect.height = Tooltip_Dlg.F_LINE_TEXTURE_HEIGHT;
        if (bWhiteBG)
        {
            Tooltip_Dlg.Create_DrawTexture(cForm, "Line" + fY, "Win_T_SubBorderH", rcRect);
        }
        else
        {
            Tooltip_Dlg.Create_DrawTexture(cForm, "Line" + fY, "Win_T_DropDwLine", rcRect);
        }
    }
Esempio n. 19
0
    private static void ItemLinkFunc(object obj)
    {
        ITEM iTEM = (ITEM)obj;

        if (iTEM == null)
        {
            return;
        }
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.TOOLTIP_DLG))
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.TOOLTIP_DLG);
        }
        else if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.TOOLTIP_DLG))
        {
            Tooltip_Dlg tooltip_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.TOOLTIP_DLG) as Tooltip_Dlg;

            tooltip_Dlg.Set_Tooltip(G_ID.CHAT_MAIN_DLG, iTEM);
        }
    }
Esempio n. 20
0
    private void OnMouseEnter()
    {
        if (0 >= this.nGateIndex)
        {
            return;
        }
        string gateToolTip = NrTSingleton <MapManager> .Instance.GetGateToolTip(this.nGateIndex);

        if (string.IsNullOrEmpty(gateToolTip))
        {
            return;
        }
        Tooltip_Dlg tooltip_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.TOOLTIP_DLG) as Tooltip_Dlg;

        if (tooltip_Dlg == null)
        {
            return;
        }
        tooltip_Dlg.Set_Tooltip(G_ID.TOOLTIP_DLG, gateToolTip);
    }
Esempio n. 21
0
    public static void Item_Tooltip(Form cForm, string strText)
    {
        float fFontSize;

        if (TsPlatform.IsWeb)
        {
            fFontSize = 15f;
        }
        else
        {
            fFontSize = 22f;
        }
        float num  = 25f;
        float num2 = 0f;

        for (int i = 0; i < strText.Length; i++)
        {
            if (strText[i] > '가' && strText[i] < '힟')
            {
                num2 += 20f;
            }
            else
            {
                num2 += 8f;
            }
        }
        string strName = "TooltipText";
        Rect   rcRect  = new Rect(0f, 0f, num2, num);

        Tooltip_Dlg.s_laText = Tooltip_Dlg.Create_Text(cForm, strName, strText, rcRect, fFontSize, SpriteText.Anchor_Pos.Upper_Left, false, NrTSingleton <CTextParser> .Instance.GetTextColor("1101"));
        SpriteText spriteText = Tooltip_Dlg.s_laText.spriteText;

        if (spriteText != null)
        {
            num2 = spriteText.TotalWidth + 20f;
            num  = spriteText.TotalHeight + 10f;
        }
        cForm.SetSize((int)num2, (int)num);
        Tooltip_Dlg.s_laText.SetLocation(10, 5);
    }
Esempio n. 22
0
    private static void Draw_Weapon(Form cForm, float fY, float fWidth, int nValid_Weapons)
    {
        Rect  rcRect = default(Rect);
        float num    = fWidth / 2f - 75f;
        int   num2   = 0;

        for (int i = 1; i < 11; i++)
        {
            float alpha = 1f;
            if ((nValid_Weapons & (int)((short)Math.Pow(2.0, (double)(i - 1)))) == 0)
            {
                alpha = 0.3f;
            }
            string text = "Win_I_Weapon" + i;
            rcRect.x      = num + (float)num2 * 38f;
            rcRect.y      = fY;
            rcRect.width  = 36f;
            rcRect.height = Tooltip_Dlg.F_WEAPON_HEIGHT;
            Tooltip_Dlg.Create_DrawTexture(cForm, text, text, rcRect, alpha);
            num2++;
        }
    }
Esempio n. 23
0
 private static DrawTexture Create_DrawTexture(Form cForm, string strName, string l_strTexture, Rect rcRect)
 {
     return(Tooltip_Dlg.Create_DrawTexture(cForm, strName, l_strTexture, rcRect, 1f));
 }
Esempio n. 24
0
    public bool IsHaveEquipItem(eEQUIP_ITEM Slot, ref ITEM srcItem, NkSoldierInfo solInfo)
    {
        if (solInfo == null)
        {
            return(false);
        }
        int itemPosType;

        if (Slot == eEQUIP_ITEM.EQUIP_WEAPON1)
        {
            itemPosType = solInfo.GetItemPosTypeByWeaponType();
        }
        else
        {
            itemPosType = 1;
        }
        int      inventoryIndex = this.GetInventoryIndex(itemPosType);
        bool     result         = false;
        ITEM     iTEM           = null;
        ITEMINFO iTEMINFO       = null;

        if (inventoryIndex > -1 && inventoryIndex < 7)
        {
            for (int i = 0; i < ItemDefine.INVENTORY_ITEMSLOT_MAX; i++)
            {
                ITEM item = this.m_Inventory[inventoryIndex].GetItem(i);
                if (item != null)
                {
                    if (NrTSingleton <ItemManager> .Instance.GetItemMinLevelFromItem(item) <= (int)solInfo.GetLevel())
                    {
                        ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(item.m_nItemUnique);

                        if (itemTypeInfo != null)
                        {
                            if (solInfo.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE))
                            {
                                ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique);

                                int equipItemPos = (int)NrTSingleton <ItemManager> .Instance.GetEquipItemPos(item.m_nItemUnique);

                                if (Slot == (eEQUIP_ITEM)equipItemPos)
                                {
                                    if (itemInfo.m_nMinDamage != 0)
                                    {
                                        int num = 0;
                                        if (iTEM != null)
                                        {
                                            num = Tooltip_Dlg.GetOptionValue(iTEM.m_nOption[0], iTEMINFO.m_nMinDamage);
                                        }
                                        int optionValue = Tooltip_Dlg.GetOptionValue(item.m_nOption[0], itemInfo.m_nMinDamage);
                                        if (num < optionValue)
                                        {
                                            iTEM     = item;
                                            iTEMINFO = itemInfo;
                                            srcItem  = item;
                                            result   = true;
                                        }
                                    }
                                    else if (itemInfo.m_nDefense != 0)
                                    {
                                        int num2 = 0;
                                        if (iTEM != null)
                                        {
                                            num2 = Tooltip_Dlg.GetOptionValue(iTEM.m_nOption[0], iTEMINFO.m_nDefense);
                                        }
                                        int optionValue2 = Tooltip_Dlg.GetOptionValue(item.m_nOption[0], itemInfo.m_nDefense);
                                        if (num2 < optionValue2)
                                        {
                                            iTEM     = item;
                                            iTEMINFO = itemInfo;
                                            srcItem  = item;
                                            result   = true;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return(result);
    }
Esempio n. 25
0
    public ITEM GetBatterItemByUnique(ITEM item, short level)
    {
        ITEMINFO iTEMINFO = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique);

        if (iTEMINFO == null)
        {
            return(null);
        }
        ITEM iTEM = null;

        for (int i = 0; i < ItemDefine.INVENTORY_ITEMSLOT_MAX; i++)
        {
            if (NrTSingleton <ItemManager> .Instance.GetItemMinLevelFromItem(this.m_kInvenItem[i]) <= (int)level)
            {
                ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_kInvenItem[i].m_nItemUnique);

                if (itemInfo != null)
                {
                    if (itemInfo.m_nItemType == iTEMINFO.m_nItemType)
                    {
                        if (iTEMINFO.m_nMinDamage != 0 && itemInfo.m_nMinDamage != 0)
                        {
                            int num;
                            if (iTEM != null)
                            {
                                num  = Tooltip_Dlg.GetOptionValue(iTEM.m_nOption[0], iTEMINFO.m_nMinDamage);
                                num += Tooltip_Dlg.GetOptionValue(iTEM.m_nOption[0], iTEMINFO.m_nMaxDamage);
                            }
                            else
                            {
                                num  = Tooltip_Dlg.GetOptionValue(item.m_nOption[0], iTEMINFO.m_nMinDamage);
                                num += Tooltip_Dlg.GetOptionValue(item.m_nOption[0], iTEMINFO.m_nMaxDamage);
                            }
                            num /= 2;
                            int num2 = Tooltip_Dlg.GetOptionValue(this.m_kInvenItem[i].m_nOption[0], itemInfo.m_nMinDamage);
                            num2 += Tooltip_Dlg.GetOptionValue(this.m_kInvenItem[i].m_nOption[0], itemInfo.m_nMaxDamage);
                            num2 /= 2;
                            if (num < num2)
                            {
                                iTEM     = this.m_kInvenItem[i];
                                iTEMINFO = itemInfo;
                            }
                        }
                        else if (iTEMINFO.m_nDefense != 0 && itemInfo.m_nDefense != 0)
                        {
                            int optionValue;
                            if (iTEM != null)
                            {
                                optionValue = Tooltip_Dlg.GetOptionValue(iTEM.m_nOption[0], iTEMINFO.m_nDefense);
                            }
                            else
                            {
                                optionValue = Tooltip_Dlg.GetOptionValue(item.m_nOption[0], iTEMINFO.m_nDefense);
                            }
                            int optionValue2 = Tooltip_Dlg.GetOptionValue(this.m_kInvenItem[i].m_nOption[0], itemInfo.m_nDefense);
                            if (optionValue < optionValue2)
                            {
                                iTEM     = this.m_kInvenItem[i];
                                iTEMINFO = itemInfo;
                            }
                        }
                    }
                }
            }
        }
        return(iTEM);
    }
Esempio n. 26
0
    public static Tooltip_Dlg.Tooltip_Text_Info[] Get_Item_Text_Info(ITEM pkItem, ITEM pkEquipedItem, G_ID eWidowID, bool bEquiped)
    {
        int level = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1).GetLevel(0L);

        int nItemUnique = pkItem.m_nItemUnique;
        int num;

        if (pkItem.m_nItemID > 0L)
        {
            num = pkItem.m_nDurability;
        }
        else
        {
            num = 100;
        }
        string strTextColorCode  = "1101";
        string strTextColorCode2 = "1101";
        string text = "1101";
        string strTextColorCode3 = "1101";
        string strTextColorCode4 = "1104";
        string text2             = "1401";
        string strTextColorCode5 = "1401";
        string strTextColorCode6 = "1304";
        string strTextColorCode7 = "1113";
        int    num2  = 21;
        int    num3  = 0;
        string text3 = "1101";
        string text4 = "1106";
        string text5 = "1401";
        List <Tooltip_Dlg.Tooltip_Text_Info> list = new List <Tooltip_Dlg.Tooltip_Text_Info>();

        Tooltip_Dlg.Tooltip_Text_Info item = default(Tooltip_Dlg.Tooltip_Text_Info);
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(nItemUnique);

        if (itemInfo != null)
        {
            item.m_strText = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(pkItem);

            item.m_eAnchor          = SpriteText.Anchor_Pos.Middle_Center;
            item.m_fFontSize        = 22f;
            item.m_strTextColorCode = strTextColorCode;
            list.Add(item);
            item.m_fFontSize = 22f;
            string strText = string.Empty;
            if (bEquiped)
            {
                strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1479");

                item.m_strText          = strText;
                item.m_strTextColorCode = strTextColorCode7;
                list.Add(item);
            }
            item.m_eAnchor      = SpriteText.Anchor_Pos.Middle_Left;
            item.m_nTextureType = 1;
            list.Add(item);
            item.m_nTextureType = 0;
            int           count        = list.Count;
            ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(nItemUnique);

            int useMinLevel = itemInfo.GetUseMinLevel(pkItem);
            if (itemTypeInfo != null)
            {
                item.m_strText = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1257"), NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(itemTypeInfo.TEXTKEY));

                item.m_strTextColorCode = ((useMinLevel <= level) ? text : text2);
                list.Add(item);
            }
            if (pkItem.m_nPosType == 5 || pkItem.m_nPosType == 6 || pkItem.m_nPosType == 7)
            {
                item.m_strText = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("265"), " ", pkItem.m_nItemNum.ToString());

                list.Add(item);
            }
            item.m_strText          = ((useMinLevel > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1258") + useMinLevel) : null);
            item.m_strTextColorCode = ((useMinLevel <= level) ? text : text2);
            list.Add(item);
            item.m_strText          = ((itemInfo.m_nUseMaxLevel > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1259") + itemInfo.m_nUseMaxLevel) : null);
            item.m_strTextColorCode = ((itemInfo.m_nUseMaxLevel >= level) ? text : text2);
            list.Add(item);
            if (!NrTSingleton <ItemManager> .Instance.IsItemATB(nItemUnique, 2L))
            {
                item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("159");

                item.m_strTextColorCode = text2;
                list.Add(item);
            }
            else
            {
                item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("158");

                item.m_strTextColorCode = strTextColorCode4;
                list.Add(item);
            }
            if (NrTSingleton <ItemManager> .Instance.IsItemATB(nItemUnique, 4L))
            {
                item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("160");

                item.m_strTextColorCode = strTextColorCode4;
                list.Add(item);
            }
            for (int i = count; i < list.Count; i++)
            {
                if (list[i].m_strText != null)
                {
                    item.m_nTextureType = 1;
                    list.Add(item);
                    item.m_nTextureType = 0;
                    break;
                }
            }
            count = list.Count;
            int num4 = 0;
            int num5 = 0;
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Min_Damage(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 1);
                int nValue2 = Protocol_Item.Get_Max_Damage(pkEquipedItem);
                num5 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue2, 1);
            }
            int  num6         = Protocol_Item.Get_Min_Damage(pkItem);
            int  optionValue  = Tooltip_Dlg.GetOptionValue(pkItem, num6, 1);
            int  nValue3      = Protocol_Item.Get_Max_Damage(pkItem);
            int  optionValue2 = Tooltip_Dlg.GetOptionValue(pkItem, nValue3, 1);
            bool flag         = false;
            int  num7         = optionValue - num4;
            int  num8         = optionValue2 - num5;
            if (num7 != 0 || num8 != 0)
            {
                flag = true;
            }
            if (!bEquiped && flag && pkEquipedItem != null)
            {
                string text6 = string.Empty;
                if (num8 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text6 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), " ~ ", num8.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text6 = string.Concat(new string[]
                    {
                        "(+",
                        num7.ToString(),
                        " ~ +",
                        num8.ToString(),
                        ")"
                    });
                }
                item.m_strText = ((itemInfo.m_nMinDamage > 0 && itemInfo.m_nMaxDamage > 0) ? string.Concat(new string[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1263"),
                    optionValue.ToString(),
                    " ~ ",
                    optionValue2.ToString(),
                    " ",
                    text6
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nMinDamage > 0 && itemInfo.m_nMaxDamage > 0) ? NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1263"), optionValue.ToString(), " ~ ", optionValue2.ToString()) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Defense(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 2);
            }
            num6        = Protocol_Item.Get_Defense(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 2);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text7 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text7 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text7 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nDefense > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1264"),
                    optionValue,
                    " ",
                    text7
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nDefense > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1264") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_ADDHP(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 4);
            }
            num6        = Protocol_Item.Get_ADDHP(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 4);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text8 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text8 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text8 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nAddHP > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1265"),
                    optionValue,
                    " ",
                    text8
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nAddHP > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1265") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            num6                    = Protocol_Item.Get_STR(pkItem);
            item.m_strText          = ((itemInfo.m_nSTR > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1271") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            num6                    = Protocol_Item.Get_DEX(pkItem);
            item.m_strText          = ((itemInfo.m_nDEX > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1272") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            num6                    = Protocol_Item.Get_INT(pkItem);
            item.m_strText          = ((itemInfo.m_nINT > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1274") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            num6                    = Protocol_Item.Get_VIT(pkItem);
            item.m_strText          = ((itemInfo.m_nVIT > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1263") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Critical_Plus(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 3);
            }
            num6        = Protocol_Item.Get_Critical_Plus(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 3);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text9 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text9 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text9 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nCriticalPlus > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1267"),
                    optionValue,
                    " ",
                    text9
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nCriticalPlus > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1267") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            num6                    = Protocol_Item.Get_AttackSpeed(pkItem);
            item.m_strText          = ((itemInfo.m_nAttackSpeed > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1276") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Hitrate_Plus(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 6);
            }
            num6        = Protocol_Item.Get_Hitrate_Plus(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 6);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text10 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text10 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text10 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nHitratePlus > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("173"),
                    optionValue,
                    " ",
                    text10
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nHitratePlus > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("173") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Evasion_Plus(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 7);
            }
            num6        = Protocol_Item.Get_Evasion_Plus(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 7);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text11 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text11 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text11 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nEvasionPlus > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("174"),
                    optionValue,
                    " ",
                    text11
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nEvasionPlus > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("174") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            num6                    = Protocol_Item.Get_Move_Speed(pkItem);
            item.m_strText          = ((itemInfo.m_nMoveSpeed > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("175") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            item.m_strText = ((itemInfo.m_nDurability > 0) ? string.Concat(new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("176"),
                num,
                " / ",
                itemInfo.m_nDurability
            }) : null);
            item.m_strTextColorCode = ((num < num2) ? ((num > num3) ? text4 : text5) : text3);
            list.Add(item);
            for (int j = count; j < list.Count; j++)
            {
                if (list[j].m_strText != null)
                {
                    item.m_nTextureType = 1;
                    list.Add(item);
                    item.m_nTextureType = 0;
                    break;
                }
            }
            count = list.Count;
            for (int k = count; k < list.Count; k++)
            {
                if (list[k].m_strText != null)
                {
                    item.m_nTextureType = 1;
                    list.Add(item);
                    item.m_nTextureType = 0;
                    break;
                }
            }
            string empty  = string.Empty;
            string empty2 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                empty2
            });

            item.m_eAnchor          = SpriteText.Anchor_Pos.Upper_Left;
            item.m_strText          = empty;
            item.m_strTextColorCode = strTextColorCode2;
            list.Add(item);
            return(list.ToArray());
        }
        return(null);
    }
Esempio n. 27
0
    private static void Tooltip_Base(Form cForm, Tooltip_Dlg.Tooltip_Text_Info[] saTextInfo, int nRank, G_ID eWidowID, int Valid_Weapons)
    {
        Tooltip_Dlg.Create_Texture        item = default(Tooltip_Dlg.Create_Texture);
        List <Tooltip_Dlg.Create_Texture> list = new List <Tooltip_Dlg.Create_Texture>();
        float num    = 230f;
        float num2   = 0f;
        float num3   = 0f;
        Rect  rcRect = default(Rect);

        num2 += 13f;
        int i = 0;

        while (i < saTextInfo.Length)
        {
            string strName = "ItemInfo_" + i;
            float  num4;
            if (saTextInfo[i].m_nTextureType == 3)
            {
                item.m_fY    = num2 + saTextInfo[i].m_fY;
                item.m_nRank = nRank;
                num4         = Tooltip_Dlg.F_STAR_HEIGHT + saTextInfo[i].m_fY;
                goto IL_2A9;
            }
            if (saTextInfo[i].m_nTextureType == 4)
            {
                item.m_fY = num2 + saTextInfo[i].m_fY;
                num4      = Tooltip_Dlg.F_WEAPON_HEIGHT + saTextInfo[i].m_fY;
                goto IL_2A9;
            }
            if (saTextInfo[i].m_nTextureType == 1)
            {
                item.m_fY = num2 + 8f - Tooltip_Dlg.F_LINE_TEXTURE_HEIGHT;
                num4      = 16f + Tooltip_Dlg.F_LINE_TEXTURE_HEIGHT;
                goto IL_2A9;
            }
            if (saTextInfo[i].m_nTextureType == 2)
            {
                item.m_fY = num2 + 8f - Tooltip_Dlg.F_LINE_TEXTURE_HEIGHT;
                num4      = 16f + Tooltip_Dlg.F_LINE_TEXTURE_HEIGHT;
                goto IL_2A9;
            }
            if (saTextInfo[i].m_strText != null)
            {
                if (i == 0)
                {
                    num4 = 22f;
                }
                else if (i == saTextInfo.Length - 1)
                {
                    int num5 = 0;
                    if (i == saTextInfo.Length - 1)
                    {
                        num5 = saTextInfo[i].m_strText.Length / 20;
                        num5++;
                    }
                    num4 = 20f * (float)num5;
                }
                else
                {
                    num4 = 20f;
                }
                string strText = saTextInfo[i].m_strText;
                rcRect.x      = ((i != 0) ? 13f : 0f);
                rcRect.y      = num2;
                rcRect.width  = ((i != 0) ? (num - 26f) : num);
                rcRect.height = num4;
                SpriteText.Anchor_Pos ePso = SpriteText.Anchor_Pos.Upper_Left;
                Tooltip_Dlg.s_laText = Tooltip_Dlg.Create_Text(cForm, strName, strText, rcRect, saTextInfo[i].m_fFontSize, ePso, false, NrTSingleton <CTextParser> .Instance.GetTextColor(saTextInfo[i].m_strTextColorCode));
                item.m_laText        = Tooltip_Dlg.s_laText;
                if (num3 < Tooltip_Dlg.s_laText.spriteText.TotalWidth)
                {
                    num3 = Tooltip_Dlg.s_laText.spriteText.TotalWidth;
                }
                num4 = Tooltip_Dlg.s_laText.spriteText.TotalHeight + 5f;
                goto IL_2A9;
            }
IL_2DD:
            i++;
            continue;
IL_2A9:
            item.m_nTextureType = saTextInfo[i].m_nTextureType;
            item.m_eAnchor      = saTextInfo[i].m_eAnchor;
            list.Add(item);
            num2 += num4;
            goto IL_2DD;
        }
        num2 += 13f;
        if (num3 < Tooltip_Dlg.F_STAR_MAX_WIDTH)
        {
            num3 = Tooltip_Dlg.F_STAR_MAX_WIDTH + 26f;
        }
        float num6 = num3 + 26f;

        cForm.SetSize((int)num6, (int)num2);
        for (int j = 0; j < list.Count; j++)
        {
            switch (list[j].m_nTextureType)
            {
            case 0:
                if (list[j].m_eAnchor == SpriteText.Anchor_Pos.Middle_Center)
                {
                    float x = num6 / 2f - list[j].m_laText.spriteText.TotalWidth / 2f;
                    list[j].m_laText.SetLocation(x, list[j].m_laText.GetLocationY());
                }
                break;

            case 1:
                Tooltip_Dlg.Draw_Line(cForm, list[j].m_fY, num6, false);
                break;

            case 2:
                Tooltip_Dlg.Draw_Line(cForm, list[j].m_fY, num6, true);
                break;

            case 3:
                Tooltip_Dlg.Draw_Star(cForm, list[j].m_fY, num6, list[j].m_nRank);
                break;

            case 4:
                Tooltip_Dlg.Draw_Weapon(cForm, list[j].m_fY, num6, Valid_Weapons);
                break;
            }
        }
    }
Esempio n. 28
0
    private void GetStatString(int ItemUnique, GS_ENHANCEITEM_ACK pPacket)
    {
        StringBuilder stringBuilder  = new StringBuilder();
        StringBuilder stringBuilder2 = new StringBuilder();
        string        text           = string.Empty;
        string        textColor      = NrTSingleton <CTextParser> .Instance.GetTextColor("1011");

        string textColor2 = NrTSingleton <CTextParser> .Instance.GetTextColor("1401");

        string textColor3 = NrTSingleton <CTextParser> .Instance.GetTextColor("1304");

        if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(ItemUnique) == eITEM_PART.ITEMPART_WEAPON)
        {
            int num          = Protocol_Item.Get_Min_Damage(ItemUnique, 0);
            int optionValue  = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMOPTION[0], num, 1);
            int nValue       = Protocol_Item.Get_Max_Damage(ItemUnique, 0);
            int optionValue2 = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMOPTION[0], nValue, 1);
            stringBuilder.AppendLine(textColor + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("242") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString(), " ~ ", optionValue2.ToString()));
            int num2         = Protocol_Item.Get_Min_Damage(ItemUnique, 0);
            int optionValue3 = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMUPGRADE[0], num2, 1);
            int nValue2      = Protocol_Item.Get_Max_Damage(ItemUnique, 0);
            int optionValue4 = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMUPGRADE[0], nValue2, 1);
            int num3         = optionValue3 - optionValue;
            int num4         = optionValue4 - optionValue2;
            if (num4 != 0)
            {
                text = ((num4 <= 0) ? textColor2 : textColor3) + NrTSingleton <UIDataManager> .Instance.GetString("(", ((num3 <= 0) ? string.Empty : "+") + num3.ToString(), " ~ ", ((num4 <= 0) ? string.Empty : "+") + num4.ToString(), ")");
            }
            stringBuilder2.AppendLine(string.Concat(new string[]
            {
                textColor,
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("242"),
                NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue3.ToString(), " ~ ", optionValue4.ToString()),
                " ",
                text
            }));
            text        = string.Empty;
            num         = Protocol_Item.Get_Critical_Plus(ItemUnique, 0);
            optionValue = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMOPTION[1], num, 3);
            stringBuilder.AppendLine(textColor + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("256") + " " + optionValue.ToString());
            num2         = Protocol_Item.Get_Critical_Plus(ItemUnique, 0);
            optionValue3 = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMUPGRADE[1], num2, 3);
            num3         = optionValue3 - optionValue;
            if (num3 != 0)
            {
                text = ((num3 <= 0) ? textColor2 : textColor3) + NrTSingleton <UIDataManager> .Instance.GetString("(", (num3 <= 0)?string.Empty : "+", num3.ToString(), ")");
            }
            stringBuilder2.AppendLine(string.Concat(new string[]
            {
                textColor,
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("256"),
                " ",
                optionValue3.ToString(),
                " ",
                text
            }));
        }
        else if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(ItemUnique) == eITEM_PART.ITEMPART_ARMOR)
        {
            int num         = Protocol_Item.Get_Defense(ItemUnique, 0);
            int optionValue = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMOPTION[0], num, 2);
            stringBuilder.AppendLine(textColor + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("243") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString()));
            int num2         = Protocol_Item.Get_Defense(ItemUnique, 0);
            int optionValue3 = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMUPGRADE[0], num2, 2);
            int num3         = optionValue3 - optionValue;
            if (num3 != 0)
            {
                text = ((num3 <= 0) ? textColor2 : textColor3) + NrTSingleton <UIDataManager> .Instance.GetString("(", (num3 <= 0)?string.Empty : "+", num3.ToString(), ")");
            }
            stringBuilder2.AppendLine(string.Concat(new string[]
            {
                textColor,
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("243"),
                " ",
                optionValue3.ToString(),
                " ",
                text
            }));
            text = string.Empty;
            num  = Protocol_Item.Get_ADDHP(ItemUnique, 0);
            if (num != 0)
            {
                optionValue = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMOPTION[1], num, 4);
                stringBuilder.AppendLine(textColor + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1216") + " " + optionValue.ToString());
                num2         = Protocol_Item.Get_ADDHP(ItemUnique, 0);
                optionValue3 = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMUPGRADE[1], num2, 4);
                num3         = optionValue3 - optionValue;
                if (num3 != 0)
                {
                    text = ((num3 <= 0) ? textColor2 : textColor3) + NrTSingleton <UIDataManager> .Instance.GetString("(", (num3 <= 0)?string.Empty : "+", num3.ToString(), ")");
                }
                if (num2 != 0)
                {
                    stringBuilder2.AppendLine(string.Concat(new string[]
                    {
                        textColor,
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1216"),
                        " ",
                        optionValue3.ToString(),
                        " ",
                        text
                    }));
                }
            }
            num = Protocol_Item.Get_Critical_Plus(ItemUnique, 0);
            if (num != 0)
            {
                optionValue = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMOPTION[1], num, 3);
                stringBuilder.AppendLine(textColor + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("256") + " " + optionValue.ToString());
                num2         = Protocol_Item.Get_Critical_Plus(ItemUnique, 0);
                optionValue3 = Tooltip_Dlg.GetOptionValue(ItemUnique, pPacket.i32ITEMUPGRADE[1], num2, 3);
                num3         = optionValue3 - optionValue;
                if (num3 != 0)
                {
                    text = ((num3 <= 0) ? textColor2 : textColor3) + NrTSingleton <UIDataManager> .Instance.GetString("(", (num3 <= 0)?string.Empty : "+", num3.ToString(), ")");
                }
                if (num2 != 0)
                {
                    stringBuilder2.AppendLine(string.Concat(new string[]
                    {
                        textColor,
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("256"),
                        " ",
                        optionValue3.ToString(),
                        " ",
                        text
                    }));
                }
            }
        }
        this.m_lbItemAfterStat.Text = stringBuilder2.ToString();
    }