public EatResponse OnEvent(EventId id, object cookie) { EventManager eventManager = Service.Get <EventManager>(); if (id != EventId.WorldLoadComplete) { if (id == EventId.IAPProductIDsReady) { eventManager.UnregisterObserver(this, EventId.IAPProductIDsReady); PromoCodeTest.RunTest(); } } else { eventManager.UnregisterObserver(this, EventId.WorldLoadComplete); if (!Service.Get <InAppPurchaseController>().AreProductIdsReady) { eventManager.RegisterObserver(this, EventId.IAPProductIDsReady, EventPriority.Default); } else { PromoCodeTest.RunTest(); } } return(EatResponse.NotEaten); }
public unsafe static long $Invoke1(long instance, long *args) { PromoCodeTest.RunTest(); return(-1L); }