| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 | using ET;using GFGGame;namespace ET{    public class M2C_NoticeUnitNumericHandler : AMHandler<M2C_NoticeUnitNumeric>    {        protected override async ETTask Run(Session session, M2C_NoticeUnitNumeric message)        {            var oldValue = GameGlobal.myNumericComponent.GetAsInt(message.NumericType);            GameGlobal.myNumericComponent.Set(message.NumericType, message.NewValue);            switch (message.NumericType)            {                case NumericType.Lvl:                    FunctionOpenDataManager.Instance.CheckHasLvFunOpen((int)message.NewValue,                        oldValue); //等级变化要加测是否有功能开启                    RoleDataManager.RoleLvUp(oldValue);                    break;                case NumericType.Power:                    RoleDataManager.powerTimeServerLock = false;                    break;                case NumericType.DailyLiveness:                case NumericType.WeeklyLiveness:                    EventAgent.DispatchEvent(ConstMessage.LIVENESS_CHANGE);                    break;                case NumericType.PassLevel:                    EventAgent.DispatchEvent(ConstMessage.BATTLEPASS_LEVEL_CHANGE);                    break;            }            EventAgent.DispatchEvent(ConstMessage.NUMERIC_CHANGE, message.NumericType);            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE, message.NumericType);            await ETTask.CompletedTask;        }    }}namespace GFGGame{    public static class CommonSProxy    {        //客户端请求每日重置        public static async ETTask ResetDailyData()        {            M2C_ResetDailyData response = null;            response = (M2C_ResetDailyData)await MessageHelper.SendToServer(new C2M_ResetDailyData());            if (response != null)            {                if (response.Error == ErrorCode.ERR_Success)                {                    // RechargeSProxy.ReqRequestGiftBagInfo().Coroutine();                    // RechargeSProxy.ReqExchangeInfo().Coroutine();                    ShopSProxy.ReqShopInfo().Coroutine();                    DailyTaskSProxy.ReqDailyTaskInfos().Coroutine();                    SuitFosterProxy.SendGetSuitInfos().Coroutine();                    FieldSProxy.ReqFieldInstanceInfos().Coroutine();                    ArenaSproxy.ReqArenaInfos().Coroutine();                    EnduringGiftBoxSProxy.ReqGetAllGiftBagRebateStatus().Coroutine();                    LuckyBoxSProxy.ReqGetLuckyBoxRotatingInfo().Coroutine();                    await ActivitySProxy.ReqSevenDayLoginInfos();                    await ActivityGlobalSProxy.GetActivityInfo();                    EventAgent.DispatchEvent(ConstMessage.RESET_DAILY_DATA);                    PromptController.Instance.ShowFloatTextPrompt("每日次数已重置", MessageType.SUCCESS);                }            }        }    }}
 |