26 lines
663 B
C#
26 lines
663 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
|
|||
|
[ActorMessageHandler]
|
|||
|
public class C2M_UpgradePetHandler : AMActorLocationRpcHandler<Unit, C2M_UpgradePet, M2C_UpgradePet>
|
|||
|
{
|
|||
|
protected override async ETTask Run(Unit unit, C2M_UpgradePet request, M2C_UpgradePet response, Action reply)
|
|||
|
{
|
|||
|
Pet pet = unit.GetComponent<Pet>();
|
|||
|
string ret = pet.UpgradePet(request.index);
|
|||
|
if (ret != null)
|
|||
|
{
|
|||
|
response.Message = ret;
|
|||
|
reply();
|
|||
|
return;
|
|||
|
}
|
|||
|
reply();
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|