using System; using System.Collections.Generic; using System.Net.Sockets; namespace ET { [ActorMessageHandler] public class C2M_ReSetSkillHandler : AMActorLocationRpcHandler { public const int RESET_Price = 500; protected override async ETTask Run(Unit unit, C2M_ReSetSkill request, M2C_ReSetSkill response, Action reply) { var ret = CharacterHelper.ReduceMoney(unit, CharacterHelper.MoneyType.Voucher, RESET_Price); if (ret != null) { response.Message = ret; reply(); return; } var skill = unit.GetComponent(); await skill.ResetSkill(); reply(); await ETTask.CompletedTask; } } }