|
@@ -10,7 +10,8 @@ namespace GFGGame
|
|
|
{
|
|
|
private UI_LuckBoxBonusShowUI _ui;
|
|
|
private List<ItemData> _rewardList = new List<ItemData>();
|
|
|
- private List<EffectUI> _effList = new List<EffectUI>();
|
|
|
+ private Dictionary<int , Dictionary<int, EffectUI>> _effListTen = new Dictionary<int, Dictionary<int, EffectUI>>();
|
|
|
+ private Dictionary<int, EffectUI> _effList = new Dictionary<int, EffectUI>();
|
|
|
|
|
|
private EffectUI _effectUI1;
|
|
|
private EffectUI _effectUI2;
|
|
@@ -25,6 +26,31 @@ namespace GFGGame
|
|
|
EffectUIPool.Recycle(_effectUI3);
|
|
|
_effectUI3 = null;
|
|
|
|
|
|
+ for (int key = 0; key < _effListTen.Count; key++) {
|
|
|
+ if (_effListTen.ContainsKey(key))
|
|
|
+ {
|
|
|
+ for (int key1 = 0; key1 < _effListTen[key].Count; key1++)
|
|
|
+ {
|
|
|
+ if (_effListTen[key].ContainsKey(key1))
|
|
|
+ {
|
|
|
+ EffectUIPool.Recycle(_effListTen[key][key1]);
|
|
|
+ _effListTen[key][key1] = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _effListTen.Clear();
|
|
|
+
|
|
|
+ for (int key = 0; key < _effList.Count; key++)
|
|
|
+ {
|
|
|
+ if (_effList.ContainsKey(key))
|
|
|
+ {
|
|
|
+ EffectUIPool.Recycle(_effList[key]);
|
|
|
+ _effList[key] = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _effList.Clear();
|
|
|
+
|
|
|
if (_ui != null)
|
|
|
{
|
|
|
_ui.Dispose();
|
|
@@ -73,12 +99,6 @@ namespace GFGGame
|
|
|
|
|
|
protected override void OnHide()
|
|
|
{
|
|
|
- for (int key = 0; key < _effList.Count; key++)
|
|
|
- {
|
|
|
- EffectUIPool.Recycle(_effList[key]);
|
|
|
- _effList[key] = null;
|
|
|
- }
|
|
|
- _effList.Clear();
|
|
|
_rewardList.Clear();
|
|
|
|
|
|
base.OnHide();
|
|
@@ -96,13 +116,43 @@ namespace GFGGame
|
|
|
item.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
|
|
|
RarityIconController.UpdateRarityIcon(item.m_comIcon.m_rarity, itemData.id, false);
|
|
|
|
|
|
+ item.m_comIcon.m_holder.visible = false;
|
|
|
+ item.m_comIcon.m_holder1.visible = false;
|
|
|
+
|
|
|
if (itemCfg.rarity > 2) {
|
|
|
string resPath = itemCfg.rarity == ConstDressRarity.Rarity_TIANYI ? "CK_all_01" : "CK_all_02";
|
|
|
- if (item != null && item.m_comIcon.m_holder != null && item.m_comIcon.m_holder1 != null)
|
|
|
+ GGraph holder = itemCfg.rarity == 3 ? item.m_comIcon.m_holder : item.m_comIcon.m_holder1;
|
|
|
+ holder.visible = true;
|
|
|
+ if (countType == 10 && (!_effListTen.ContainsKey(index) ||
|
|
|
+ ((itemCfg.rarity == 3 && !_effListTen[index].ContainsKey(0)) || (itemCfg.rarity == 4 && !_effListTen[index].ContainsKey(1)))))
|
|
|
+ {
|
|
|
+ EffectUI _effectUI = EffectUIPool.CreateEffectUI(holder, "ui_LuckyBox", resPath);
|
|
|
+
|
|
|
+ if (!_effListTen.ContainsKey(index))
|
|
|
+ {
|
|
|
+ Dictionary<int, EffectUI> effectList = new Dictionary<int, EffectUI>();
|
|
|
+ if (itemCfg.rarity == 3)
|
|
|
+ effectList.Add(0, _effectUI);
|
|
|
+ else if (itemCfg.rarity == 4)
|
|
|
+ effectList.Add(1, _effectUI);
|
|
|
+ _effListTen.Add(index, effectList);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if (itemCfg.rarity == 3)
|
|
|
+ _effListTen[index].Add(0, _effectUI);
|
|
|
+ else if (itemCfg.rarity == 4)
|
|
|
+ _effListTen[index].Add(1, _effectUI);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (countType == 1 &&
|
|
|
+ ((itemCfg.rarity == 3 && !_effList.ContainsKey(0)) || (itemCfg.rarity == 4 && !_effList.ContainsKey(1))))
|
|
|
{
|
|
|
- GGraph holder = itemCfg.rarity == 3 ? item.m_comIcon.m_holder : item.m_comIcon.m_holder1;
|
|
|
EffectUI _effectUI = EffectUIPool.CreateEffectUI(holder, "ui_LuckyBox", resPath);
|
|
|
- _effList.Add(_effectUI);
|
|
|
+ if (itemCfg.rarity == 3)
|
|
|
+ _effList.Add(0, _effectUI);
|
|
|
+ else if (itemCfg.rarity == 4)
|
|
|
+ _effList.Add(1, _effectUI);
|
|
|
}
|
|
|
}
|
|
|
|