|
@@ -124,14 +124,6 @@ namespace GFGGame
|
|
item.m_listGiftBag.data = lastVipCfg.bonusOnceArr;
|
|
item.m_listGiftBag.data = lastVipCfg.bonusOnceArr;
|
|
item.m_listGiftBag.numItems = lastVipCfg.bonusOnceArr.Length;
|
|
item.m_listGiftBag.numItems = lastVipCfg.bonusOnceArr.Length;
|
|
|
|
|
|
- item.m_txtWeekGiftBag.SetVar("value", vipCfg.id.ToString()).FlushVars();
|
|
|
|
- if (item.m_listWeekGiftBag.data == null)
|
|
|
|
- {
|
|
|
|
- item.m_listWeekGiftBag.itemRenderer = ListRewardItemRender;
|
|
|
|
- }
|
|
|
|
- item.m_listWeekGiftBag.data = vipCfg.bonusWeekArr;
|
|
|
|
- item.m_listWeekGiftBag.numItems = vipCfg.bonusWeekArr.Length;
|
|
|
|
-
|
|
|
|
if (item.m_holder.data == null)
|
|
if (item.m_holder.data == null)
|
|
{
|
|
{
|
|
DressUpObjUI dressUpObjUI = new DressUpObjUI("SceneSuitFoster");
|
|
DressUpObjUI dressUpObjUI = new DressUpObjUI("SceneSuitFoster");
|
|
@@ -156,14 +148,14 @@ namespace GFGGame
|
|
bool isGet = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipGetStatus), vipCfg.id);
|
|
bool isGet = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipGetStatus), vipCfg.id);
|
|
item.m_btnGetGiftBag.grayed = isGet || vipCfg.id > RoleDataManager.vipLv;
|
|
item.m_btnGetGiftBag.grayed = isGet || vipCfg.id > RoleDataManager.vipLv;
|
|
RedDotController.Instance.SetComRedDot(item.m_btnGetGiftBag, !isGet && RoleDataManager.vipLv >= vipCfg.id);
|
|
RedDotController.Instance.SetComRedDot(item.m_btnGetGiftBag, !isGet && RoleDataManager.vipLv >= vipCfg.id);
|
|
- if (item.m_btnGetWeekGiftBag.data == null)
|
|
|
|
|
|
+ if (item.m_btnWeek.data == null)
|
|
{
|
|
{
|
|
- item.m_btnGetWeekGiftBag.onClick.Add(OnBtnGetWeekGiftBagClick);
|
|
|
|
|
|
+ item.m_btnWeek.onClick.Add(OnBtnWeekClick);
|
|
}
|
|
}
|
|
- item.m_btnGetWeekGiftBag.data = vipCfg.id;
|
|
|
|
|
|
+ item.m_btnWeek.data = vipCfg.id;
|
|
bool canGet = GameGlobal.myNumericComponent.GetAsInt(NumericType.VipWeekGetStatus) == 0 && RoleDataManager.vipLv == vipCfg.id;
|
|
bool canGet = GameGlobal.myNumericComponent.GetAsInt(NumericType.VipWeekGetStatus) == 0 && RoleDataManager.vipLv == vipCfg.id;
|
|
- item.m_btnGetWeekGiftBag.grayed = !canGet;
|
|
|
|
- RedDotController.Instance.SetComRedDot(item.m_btnGetWeekGiftBag, canGet);
|
|
|
|
|
|
+ item.m_btnWeek.grayed = !canGet;
|
|
|
|
+ RedDotController.Instance.SetComRedDot(item.m_btnWeek, canGet);
|
|
UI_ListVipItem.ProxyEnd();
|
|
UI_ListVipItem.ProxyEnd();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -196,6 +188,14 @@ namespace GFGGame
|
|
}
|
|
}
|
|
ViewManager.Show<SuitShowView>(new object[] { _suitTypeId, suitId, new List<int>() { suitId }, false });
|
|
ViewManager.Show<SuitShowView>(new object[] { _suitTypeId, suitId, new List<int>() { suitId }, false });
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private void OnBtnWeekClick(EventContext context)
|
|
|
|
+ {
|
|
|
|
+ GObject obj = context.sender as GObject;
|
|
|
|
+ int vipLv = (int)obj.data;
|
|
|
|
+ ViewManager.Show<WeekGiftView>(vipLv);
|
|
|
|
+ }
|
|
|
|
+
|
|
private void OnBtnGetGiftBagClick(EventContext context)
|
|
private void OnBtnGetGiftBagClick(EventContext context)
|
|
{
|
|
{
|
|
GObject obj = context.sender as GObject;
|
|
GObject obj = context.sender as GObject;
|
|
@@ -213,26 +213,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
ShopSProxy.ReqGetVipGiftBag(vipLv).Coroutine();
|
|
ShopSProxy.ReqGetVipGiftBag(vipLv).Coroutine();
|
|
}
|
|
}
|
|
- private void OnBtnGetWeekGiftBagClick(EventContext context)
|
|
|
|
- {
|
|
|
|
- GObject obj = context.sender as GObject;
|
|
|
|
- int vipLv = (int)obj.data;
|
|
|
|
- if (GameGlobal.myNumericComponent.GetAsInt(NumericType.VipWeekGetStatus) == 1)
|
|
|
|
- {
|
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("会员每周礼包已领取");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (RoleDataManager.vipLv < vipLv)
|
|
|
|
- {
|
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("会员等级不足");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- AlertUI.Show("提升VIP等级能领取更高级的礼包,是否继续领取当前等级的VIP礼包?", "(该礼包每周只能领取1次)")
|
|
|
|
- .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
|
|
|
|
- {
|
|
|
|
- ShopSProxy.ReqGetVipWeekGiftBag(vipLv).Coroutine();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
private void OnBtnLeftClick()
|
|
private void OnBtnLeftClick()
|
|
{
|
|
{
|
|
|
|
|