using System; namespace ET { [ActorMessageHandler] public class C2M_ResetPointHandler : AMActorLocationRpcHandler { protected override async ETTask Run(Unit unit, C2M_ResetPoint request, M2C_ResetPoint response, Action reply) { if (TeamComponent.Instance.Get(unit.TeamLeaderId).TeamState == TeamState.Fight) { response.Message = "战斗中..."; reply(); return; } CharacterHelper.ResetPoint(unit); CharacterHelper.SyncNumeric(unit); UnitHelper.Save(unit).Coroutine(); UnitHelper.Save(unit).Coroutine(); response.Character =await CharacterHelper.GetUnitCharacter(unit); reply(); await ETTask.CompletedTask; } } }