34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
|
using System;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
[ActorMessageHandler]
|
|||
|
public class C2M_GetBattleStateBuffHandler : AMActorLocationRpcHandler<Unit, C2M_GetBattleStateBuff, M2C_GetBattleStateBuff>
|
|||
|
{
|
|||
|
protected override async ETTask Run(Unit unit, C2M_GetBattleStateBuff request, M2C_GetBattleStateBuff response, Action reply)
|
|||
|
{
|
|||
|
//var targetUnit = UnitComponent.Instance.Get(request.UnitId);
|
|||
|
// if (targetUnit == null)
|
|||
|
// {
|
|||
|
// response.Message = "该玩家不在线";
|
|||
|
// reply();
|
|||
|
// return;
|
|||
|
// }
|
|||
|
//var buffcomponent = targetUnit.GetComponent<BuffComponent>();
|
|||
|
// foreach (var buff in buffcomponent.GetAllBuffs())
|
|||
|
// {
|
|||
|
// if (buff.buffDataBase is not ChangePropertyBuffData data)
|
|||
|
// continue;
|
|||
|
// StateBuffInfo stateBuffInfo = new StateBuffInfo
|
|||
|
// {
|
|||
|
// StateType = (int)data.buffEffect.data.As<BasicStateBuffData>().workType,
|
|||
|
// Layer =buff.CurrentOverlay,
|
|||
|
// UserData = buff.userData
|
|||
|
// };
|
|||
|
// response.InfoList.Add(stateBuffInfo);
|
|||
|
// }
|
|||
|
reply();
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|