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.
28 lines
808 B
28 lines
808 B
1 month ago
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|