using Model; using MongoDB.Bson; namespace Controller { [Event(EventType.BuffTimeout, ServerType.City)] public class BuffTimeoutEvent: AEvent { public override void Run(Env env) { Unit owner = World.Instance.GetComponent().Get(env.Get(EnvKey.OwnerId)); if (owner == null) { return; } owner.GetComponent().RemoveById(env.Get(EnvKey.BuffId)); } } }