public void OnPulse() { if (ZetaDia.Me == null) { return; } if (!ZetaDia.IsInGame || !ZetaDia.Me.IsValid || ZetaDia.IsLoadingWorld || ZetaDia.IsPlayingCutscene || ZetaDia.WorldType != Act.OpenWorld) { return; } if (eventHandler == null) { eventHandler = new GreedEvents(); } switch (eventHandler.state) { case GreedState.LookingForPortal: { eventHandler.state = eventHandler.FindPortal(); return; } case GreedState.FoundPortal: { eventHandler.state = eventHandler.FoundPortal(); return; } case GreedState.InsidePortal: { eventHandler.state = eventHandler.InsidePortal(); return; } case GreedState.InBossArea: { eventHandler.state = eventHandler.InsideBossArea(); return; } case GreedState.BossDead: { eventHandler.state = eventHandler.BossDead(); return; } default: return; } }
public void OnPulse() { if (ZetaDia.Me == null) return; if (!ZetaDia.IsInGame || !ZetaDia.Me.IsValid || ZetaDia.IsLoadingWorld || ZetaDia.IsPlayingCutscene || ZetaDia.WorldType != Act.OpenWorld) return; if (eventHandler == null) eventHandler = new GreedEvents(); switch (eventHandler.state) { case GreedState.LookingForPortal: { eventHandler.state = eventHandler.FindPortal(); return; } case GreedState.FoundPortal: { eventHandler.state = eventHandler.FoundPortal(); return; } case GreedState.InsidePortal: { eventHandler.state = eventHandler.InsidePortal(); return; } case GreedState.InBossArea: { eventHandler.state = eventHandler.InsideBossArea(); return; } case GreedState.BossDead: { eventHandler.state = eventHandler.BossDead(); return; } default: return; } }
void GameEvents_OnGameJoined(object sender, EventArgs e) { eventHandler = new GreedEvents(); }
public void OnEnabled() { eventHandler = new GreedEvents(); Logger.Log("Plugin - Enabled"); GameEvents.OnGameJoined += GameEvents_OnGameJoined; }
public void OnDisabled() { Logger.Log("Plugin - Disabled"); eventHandler = null; GameEvents.OnGameJoined -= GameEvents_OnGameJoined; }
public void OnShutdown() { eventHandler = null; GameEvents.OnGameJoined -= GameEvents_OnGameJoined; }