You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
431 B

namespace ET
{
[MessageHandler]
public class M2C_RemoveUnitsHandler : AMHandler<M2C_RemoveUnits>
{
protected override void Run(Session session, M2C_RemoveUnits message)
{
UnitComponent unitComponent = session.DomainScene().CurrentScene()?.GetComponent<UnitComponent>();
if (unitComponent == null)
{
return;
}
foreach (long unitId in message.Units)
{
unitComponent.Remove(unitId);
}
}
}
}