|
@@ -3,6 +3,7 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using ET;
|
|
|
using FairyGUI;
|
|
|
+using Hutool;
|
|
|
using UI.DailyWelfare;
|
|
|
using UnityEngine;
|
|
|
|
|
@@ -109,7 +110,7 @@ namespace GFGGame
|
|
|
|
|
|
private void UpdateSignView()
|
|
|
{
|
|
|
- _signCount = MathHelper.CountOnes(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay));
|
|
|
+ _signCount = MathUtil.CountOnes2(GameGlobal.myNumericComponent.GetAsLong(NumericType.SignDay));
|
|
|
_ui.m_proSign.m_txtSignCount.text = _signCount.ToString();
|
|
|
List<DailySignBonusCfg> signBonusCfgs = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month);
|
|
|
_ui.m_proSign.target.max = signBonusCfgs.Count;
|
|
@@ -130,7 +131,7 @@ namespace GFGGame
|
|
|
item.target.onClick.Add(OnBtnGetProBonus);
|
|
|
}
|
|
|
item.target.data = signCfgs[i];
|
|
|
- bool isGot = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignReward), signCfgs[i].day);
|
|
|
+ bool isGot = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignReward), signCfgs[i].day);
|
|
|
item.m_imgGot.visible = isGot;
|
|
|
bool canGet = _signCount >= signCfgs[i].day && !isGot;
|
|
|
if (canGet)
|
|
@@ -152,7 +153,7 @@ namespace GFGGame
|
|
|
{
|
|
|
GObject obj = context.sender as GObject;
|
|
|
DailySignCfg signCfg = obj.data as DailySignCfg;
|
|
|
- if (_signCount < signCfg.day || MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignReward), signCfg.day))
|
|
|
+ if (_signCount < signCfg.day || MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignReward), signCfg.day))
|
|
|
{
|
|
|
GoodsItemTipsController.ShowItemTips(signCfg.bonusArr[0][0]);
|
|
|
}
|
|
@@ -179,7 +180,7 @@ namespace GFGGame
|
|
|
int _index = index >= 29 ? index - 1 : index;
|
|
|
DailySignBonusCfg bonusCfg = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month)[_index];
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(bonusCfg.bonusArr[0][0]);
|
|
|
- bool isGot = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay), bonusCfg.day);
|
|
|
+ bool isGot = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsLong(NumericType.SignDay), bonusCfg.day);
|
|
|
if (bonusCfg.day == _day && !isGot && _gameObject3 == null)
|
|
|
{
|
|
|
string resPath3 = ResPathUtil.GetViewEffectPath("ui_Activity", "everyday_kuang");
|
|
@@ -215,7 +216,7 @@ namespace GFGGame
|
|
|
int day = (int)obj.data;
|
|
|
bool result = false;
|
|
|
if (day > _day) return;
|
|
|
- bool isGot = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay), day);
|
|
|
+ bool isGot = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsLong(NumericType.SignDay), day);
|
|
|
if (isGot)
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt("已领取");
|
|
@@ -241,10 +242,10 @@ namespace GFGGame
|
|
|
{
|
|
|
result = await DailyWelfareSProxy.ReqSign(day);
|
|
|
}
|
|
|
- if (result)
|
|
|
- {
|
|
|
- _ui.m_list.numItems = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month).Count;
|
|
|
- }
|
|
|
+ // if (result)
|
|
|
+ // {
|
|
|
+ // _ui.m_list.numItems = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month).Count;
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
}
|