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