Exemplo n.º 1
0
 protected static void _Create(ItemIcon item_icon, ITEM_ICON_TYPE icon_type, int icon_id, RARITY_TYPE?rarity, Transform parent, ELEMENT_TYPE element, EQUIPMENT_TYPE?magi_enable_icon_type, int num, string event_name, int event_data, bool is_new, int toggle_group, bool is_select, string icon_under_text, bool is_equipping, int enemy_icon_id, int enemy_icon_id2, bool disable_rarity_text, QUEST_ICON_SIZE_TYPE questIconSizeType, GET_TYPE getType)
 {
     //IL_02d6: Unknown result type (might be due to invalid IL or missing references)
     //IL_037b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0396: Unknown result type (might be due to invalid IL or missing references)
     //IL_03ac: Unknown result type (might be due to invalid IL or missing references)
     //IL_03d9: Unknown result type (might be due to invalid IL or missing references)
     //IL_03f5: Unknown result type (might be due to invalid IL or missing references)
     //IL_044e: Unknown result type (might be due to invalid IL or missing references)
     //IL_04a9: Unknown result type (might be due to invalid IL or missing references)
     //IL_04fb: Unknown result type (might be due to invalid IL or missing references)
     //IL_0527: Unknown result type (might be due to invalid IL or missing references)
     if (icon_id == 24019000)
     {
         icon_type = ITEM_ICON_TYPE.SKILL_GROW;
     }
     item_icon.itemID   = 0;
     item_icon.iconType = icon_type;
     if (icon_id >= 0)
     {
         int iconBGID = GetIconBGID(icon_type, icon_id, rarity);
         item_icon.bgID           = iconBGID;
         item_icon.bg.mainTexture = null;
         item_icon.frameTexture   = null;
         ResourceLoad.ItemIconLoadIconBGTexture(item_icon, iconBGID, delegate(ItemIcon _item_icon, Texture _tex, int _icon_id)
         {
             if (_item_icon.bgID == _icon_id)
             {
                 item_icon.frameTexture   = _tex;
                 item_icon.bg.mainTexture = ((!item_icon.isVisible) ? null : item_icon.frameTexture);
             }
         });
         item_icon.VisibleIcon(item_icon.isVisible, !string.IsNullOrEmpty(event_name));
         item_icon.bg.set_enabled(iconBGID >= 0);
         SetupElementIcon(item_icon, icon_type, element);
         item_icon.SetRarity(icon_type, rarity, disable_rarity_text, getType);
         item_icon.enemyIconID = enemy_icon_id;
         item_icon.enemyIconItem.mainTexture = null;
         if (enemy_icon_id != 0)
         {
             item_icon.enemyIconItem.set_enabled(true);
             ResourceLoad.ItemIconLoadEnemyIconItemTexture(item_icon, enemy_icon_id, delegate(ItemIcon _item_icon, Texture _tex, int _enemy_icon_id)
             {
                 if (_item_icon.enemyIconID == _enemy_icon_id)
                 {
                     _item_icon.enemyIconItem.mainTexture = _tex;
                 }
             });
         }
         else
         {
             item_icon.enemyIconItem.set_enabled(false);
         }
         if (!object.ReferenceEquals(item_icon.enemyIconItem2, null))
         {
             item_icon.enemyIconID2 = enemy_icon_id2;
             item_icon.enemyIconItem2.mainTexture = null;
             if (enemy_icon_id2 != 0)
             {
                 item_icon.enemyIconItem2.set_enabled(true);
                 ResourceLoad.ItemIconLoadEnemyIconItemTexture(item_icon, enemy_icon_id2, delegate(ItemIcon _item_icon, Texture _tex, int _enemy_icon_id2)
                 {
                     if (_item_icon.enemyIconID2 == _enemy_icon_id2)
                     {
                         _item_icon.enemyIconItem2.mainTexture = _tex;
                     }
                 });
             }
             else
             {
                 item_icon.enemyIconItem2.set_enabled(false);
             }
         }
         item_icon.questIconSizeType = questIconSizeType;
         item_icon.LoadIconTexture(icon_type, icon_id);
     }
     else
     {
         item_icon.icon.mainTexture = null;
         item_icon.frameTexture     = null;
         item_icon.bg.mainTexture   = item_icon.emptyTexture;
         item_icon.iconTypeSprite.set_enabled(false);
         item_icon.rarityFrame.set_enabled(false);
         item_icon.rarityTextIcon.set_enabled(false);
         item_icon.enemyIconItem.mainTexture = null;
         if (!object.ReferenceEquals(item_icon.enemyIconItem2, null))
         {
             item_icon.enemyIconItem2.mainTexture = null;
         }
     }
     if (num == -1)
     {
         num = 1;
     }
     item_icon.label.text = "×" + num.ToString();
     item_icon.label.get_gameObject().SetActive(num > 1);
     if (!string.IsNullOrEmpty(event_name))
     {
         item_icon.button.set_enabled(true);
         item_icon.sender.eventName = event_name;
         item_icon.sender.eventData = event_data;
     }
     else
     {
         item_icon.button.set_enabled(false);
     }
     if (!string.IsNullOrEmpty(icon_under_text))
     {
         item_icon.textLabel.supportEncoding = true;
         item_icon.textLabel.text            = icon_under_text;
         item_icon.textLabel.get_gameObject().SetActive(true);
     }
     else
     {
         item_icon.textLabel.get_gameObject().SetActive(false);
     }
     item_icon.equippingSprite.get_gameObject().SetActive(is_equipping);
     if (item_icon.favoriteSprite != null)
     {
         item_icon.favoriteSprite.get_gameObject().SetActive(false);
     }
     item_icon.gridEquippingMark = item_icon.equippingSprite.get_gameObject().GetComponentInParent <UIGrid>();
     if (item_icon.gridEquippingMark != null)
     {
         item_icon.gridEquippingMark.Reposition();
     }
     if (toggle_group < 0)
     {
         item_icon.toggleSelectFrame.set_enabled(false);
         item_icon.selectFrame.get_gameObject().SetActive(false);
     }
     else
     {
         if (!item_icon.toggleSelectFrame.get_enabled())
         {
             item_icon.toggleSelectFrame.activeSprite.alpha = 0f;
         }
         item_icon.toggleSelectFrame.set_enabled(true);
         item_icon.selectFrame.get_gameObject().SetActive(true);
         item_icon.toggleSelectFrame.group = toggle_group;
         item_icon.toggleSelectFrame.Set(is_select);
     }
     if (is_new)
     {
         item_icon.newIcon.set_enabled(true);
         item_icon.newIcon.get_gameObject().SetActive(true);
     }
     else
     {
         item_icon.newIcon.set_enabled(false);
         item_icon.newIcon.get_gameObject().SetActive(false);
     }
     item_icon.SetSkillEnableEquipIcon(magi_enable_icon_type);
     item_icon.SetRewardBG(false);
 }