1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using ET;
- using GFGGame;
- namespace ET
- {
- public class M2C_NoticeUnitNumericHandler : AMHandler<M2C_NoticeUnitNumeric>
- {
- protected override async ETTask Run(Session session, M2C_NoticeUnitNumeric message)
- {
- int 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);//等级变化要加测是否有功能开启
- RoleDataManager.RoleLvUp(oldValue);
- break;
- case NumericType.Power:
- RoleDataManager.powerTimeServerLock = false;
- break;
- }
- EventAgent.DispatchEvent(ConstMessage.NUMERIC_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)
- {
- PromptController.Instance.ShowFloatTextPrompt("每日次数已重置", MessageType.SUCCESS);
- }
- }
- }
- }
- }
|