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