CTT/Server/Hotfix/Game/Handler/UI/Skill/C2M_SaveAutoSkillHandler.cs

23 lines
586 B
C#
Executable File

using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_SaveAutoSkillHandler : AMActorLocationRpcHandler<Unit, C2M_SaveAutoSkill, M2C_SaveAutoSkill>
{
protected override async ETTask Run(Unit unit, C2M_SaveAutoSkill request, M2C_SaveAutoSkill response, Action reply)
{
UserSetting setting = unit.GetComponent<UserSetting>();
if (setting == null)
{
Log.Error("setting == null");
response.Message = "系统错误";
reply();
return;
}
setting.UpdateAutoSkills(request.AutoSkillList);
reply();
await ETTask.CompletedTask;
}
}
}