Files
dsrc/sku.0/sys.server/compiled/game/script/turnstile/turnstile_cleanup.java
T
2018-06-07 00:32:29 +01:00

34 lines
1.1 KiB
Java
Executable File

package script.turnstile;
import script.dictionary;
import script.library.turnstile;
import script.obj_id;
public class turnstile_cleanup extends script.base_script
{
public turnstile_cleanup()
{
}
public static final String HANDLER_EXPIRED_CLEANUP = "handleExpiredCleanup";
public int OnInitialize(obj_id self) throws InterruptedException
{
messageTo(self, HANDLER_EXPIRED_CLEANUP, null, turnstile.TURNSTILE_CLEANUP_HEARTBEAT, false);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
messageTo(self, HANDLER_EXPIRED_CLEANUP, null, turnstile.TURNSTILE_CLEANUP_HEARTBEAT, false);
return SCRIPT_CONTINUE;
}
public int OnDetach(obj_id self) throws InterruptedException
{
return SCRIPT_CONTINUE;
}
public int handleExpiredCleanup(obj_id self, dictionary params) throws InterruptedException
{
turnstile.cleanupExpiredPatrons(self);
messageTo(self, HANDLER_EXPIRED_CLEANUP, null, turnstile.TURNSTILE_CLEANUP_HEARTBEAT, false);
return SCRIPT_CONTINUE;
}
}