private void LoadIconTexture(ITEM_ICON_TYPE icon_type, int icon_id) { iconID = icon_id; icon.set_enabled(true); switch (icon_type) { case ITEM_ICON_TYPE.UNKNOWN: icon.set_enabled(false); break; case ITEM_ICON_TYPE.COMMON: icon.mainTexture = null; if (icon_id <= 0) { icon.set_enabled(false); } else { ResourceLoad.ItemIconLoadCommonTexture(this, icon_id, delegate(ItemIcon _item_icon, Texture _tex, int _icon_id) { if (iconID == _icon_id) { icon.mainTexture = _tex; OnIconLoaded(); } }); icon.depth = rarityFrame.depth - 1; UITexture uITexture5 = icon; int num = 64; icon.height = num; uITexture5.width = num; UISprite uISprite5 = rarityFrame; num = 120; rarityFrame.height = num; uISprite5.width = num; iconTypeSprite.depth = rarityFrame.depth + 1; } break; case ITEM_ICON_TYPE.STAMP: icon.mainTexture = null; if (icon_id <= 0) { icon.set_enabled(false); } else { ResourceLoad.ItemIconLoadStampTexture(this, icon_id, delegate(ItemIcon _item_icon, Texture _tex, int _icon_id) { if (iconID == _icon_id) { icon.mainTexture = _tex; OnIconLoaded(); } }); icon.depth = rarityFrame.depth - 1; UITexture uITexture3 = icon; int num = 64; icon.height = num; uITexture3.width = num; UISprite uISprite3 = rarityFrame; num = 120; rarityFrame.height = num; uISprite3.width = num; iconTypeSprite.depth = rarityFrame.depth + 1; } break; case ITEM_ICON_TYPE.QUEST_ITEM: { icon.mainTexture = null; ResourceLoad.ItemIconLoadQuestItemIconTexture(this, icon_id, delegate(ItemIcon _item_icon, Texture _tex, int _icon_id) { if (iconID == _icon_id) { icon.mainTexture = _tex; OnIconLoaded(); } }); icon.depth = rarityFrame.depth + 1; SetQuestIconItemSize(questIconSizeType, out int monsterIconSize, out int rarityFrameSize); UITexture uITexture2 = icon; int num = monsterIconSize; icon.height = num; uITexture2.width = num; UISprite uISprite2 = rarityFrame; num = rarityFrameSize; rarityFrame.height = num; uISprite2.width = num; iconTypeSprite.depth = icon.depth + 1; break; } case ITEM_ICON_TYPE.DEGREE: icon.mainTexture = null; if (icon_id <= 0) { icon.set_enabled(false); } else { DegreeTable.DegreeData data = Singleton <DegreeTable> .I.GetData((uint)icon_id); if (data == null) { icon.set_enabled(false); } else { ResourceLoad.ItemIconLoadDegreeIconTexture(this, data.type, delegate(ItemIcon _item_icon, Texture _tex, DEGREE_TYPE _type_id) { icon.mainTexture = _tex; OnIconLoaded(); }); icon.depth = rarityFrame.depth - 1; UITexture uITexture6 = icon; int num = 64; icon.height = num; uITexture6.width = num; UISprite uISprite6 = rarityFrame; num = 120; rarityFrame.height = num; uISprite6.width = num; iconTypeSprite.depth = rarityFrame.depth + 1; } } break; case ITEM_ICON_TYPE.POINT_SHOP_ICON: icon.mainTexture = null; if (icon_id <= 0) { icon.set_enabled(false); } else { ResourceLoad.ItemIconLoadPointShopPointIconTexture(this, icon_id, delegate(ItemIcon _item_icon, Texture _tex, int _type_id) { icon.mainTexture = _tex; OnIconLoaded(); }); icon.depth = rarityFrame.depth - 1; UITexture uITexture4 = icon; int num = 64; icon.height = num; uITexture4.width = num; UISprite uISprite4 = rarityFrame; num = 120; rarityFrame.height = num; uISprite4.width = num; iconTypeSprite.depth = rarityFrame.depth + 1; } break; default: icon.mainTexture = null; if (icon_id <= 0) { icon.set_enabled(false); } else { ResourceLoad.ItemIconLoadItemIconTexture(this, icon_id, delegate(ItemIcon _item_icon, Texture _tex, int _icon_id) { if (iconID == _icon_id) { icon.mainTexture = _tex; OnIconLoaded(); } }); icon.depth = rarityFrame.depth - 1; UITexture uITexture = icon; int num = 64; icon.height = num; uITexture.width = num; UISprite uISprite = rarityFrame; num = 120; rarityFrame.height = num; uISprite.width = num; iconTypeSprite.depth = rarityFrame.depth + 1; } break; } }