CTT/Server/Hotfix/Game/Event/SyncAttributeEvent.cs

18 lines
558 B
C#
Executable File

using ET.EventType;
using System;
using System.Collections.Generic;
namespace ET
{
public class SyncAttributeEvent : AEvent<SyncAttribute>
{
public override async ETTask Run(SyncAttribute args)
{
Unit unit = args.unit;
M2C_SyncUnitAttribute syncUnitAttribute = new M2C_SyncUnitAttribute { UnitId = unit.Id, NumericType = args.numericType, Value = args.value };
unit.GetComponent<BrocastComponent>()?.BrocastInterval(syncUnitAttribute);
await ETTask.CompletedTask;
}
}
}