using CoreGame; namespace CoreGame.Render { public class Trigger_OnCatchDropItem : TriggerBase { public override void OnEvent(TriggerSpec self, int eventId, object param1) { OnTrigger(self, eventId, param1); } public override bool OnPreExecuteCheck(TriggerSpec self, int eventId, object param1) { var dropItemData = param1 as DropItemDataComponent; return dropItemData != null && triggerCfg.param1 == dropItemData.dropItemID; } public override void Init(TriggerSpec self) { RegEntityEvent(self, ClientEvent.OnCatchDropItem); } public override void UnInit(TriggerSpec self) { UnRegEntityEvent(self, ClientEvent.OnCatchDropItem); } } }