예제 #1
0
        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;
            }
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
 void GameEvents_OnGameJoined(object sender, EventArgs e)
 {
     eventHandler = new GreedEvents();
 }
예제 #4
0
 public void OnEnabled()
 {
     eventHandler = new GreedEvents();
     Logger.Log("Plugin - Enabled");
     GameEvents.OnGameJoined += GameEvents_OnGameJoined;
 }
예제 #5
0
 public void OnDisabled()
 {
     Logger.Log("Plugin - Disabled");
     eventHandler             = null;
     GameEvents.OnGameJoined -= GameEvents_OnGameJoined;
 }
예제 #6
0
 public void OnShutdown()
 {
     eventHandler             = null;
     GameEvents.OnGameJoined -= GameEvents_OnGameJoined;
 }
예제 #7
0
 public void OnShutdown()
 {
     eventHandler = null;
     GameEvents.OnGameJoined -= GameEvents_OnGameJoined;
 }
예제 #8
0
 void GameEvents_OnGameJoined(object sender, EventArgs e)
 {
     eventHandler = new GreedEvents();
 }
예제 #9
0
 public void OnEnabled()
 {
     eventHandler = new GreedEvents();
     Logger.Log("Plugin - Enabled");
     GameEvents.OnGameJoined += GameEvents_OnGameJoined;            
 }
예제 #10
0
 public void OnDisabled()
 {
     Logger.Log("Plugin - Disabled");
     eventHandler = null;
     GameEvents.OnGameJoined -= GameEvents_OnGameJoined;
 }