using System; namespace ET { [ActorMessageHandler] public class C2M_GetBattleStateBuffHandler : AMActorLocationRpcHandler { 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(); // foreach (var buff in buffcomponent.GetAllBuffs()) // { // if (buff.buffDataBase is not ChangePropertyBuffData data) // continue; // StateBuffInfo stateBuffInfo = new StateBuffInfo // { // StateType = (int)data.buffEffect.data.As().workType, // Layer =buff.CurrentOverlay, // UserData = buff.userData // }; // response.InfoList.Add(stateBuffInfo); // } reply(); await ETTask.CompletedTask; } } }