private bool OnNewRiftLevel() { EnablePulse(); RiftData.AddEntryPortal(); if (AdvDia.CurrentLevelAreaId == 276150 && !_holyCowEventCompleted) { _possiblyCowLevel = true; } if (_RiftType == RiftType.Nephalem && PluginSettings.Current.NephalemRiftFullExplore && AdvDia.RiftQuest.Step == RiftStep.Cleared) { State = States.SearchingForTownstoneOrExitPortal; } else { State = States.SearchingForExitPortal; } if (Randomizer.GetRandomNumber(1, 10) > 5) { Logger.Info("[Rift] Let the massacre continue!"); } else { Logger.Info("[Rift] Crom, Count the Dead!"); } return(false); }
private void PulseChecks() { if (BrainBehavior.IsVendoring || !ZetaDia.IsInGame || ZetaDia.IsLoadingWorld || ZetaDia.IsPlayingCutscene) { DisablePulse(); return; } //AdvDia.Update(true); if (AdvDia.CurrentWorldId == ExplorationData.ActHubWorldIds[Act.A1] && (AdvDia.RiftQuest.Step == RiftStep.KillingMobs || AdvDia.RiftQuest.Step == RiftStep.BossSpawned || AdvDia.RiftQuest.Step == RiftStep.UrshiSpawned)) { if (!EnteringRiftStates.Contains(State)) { Logger.Info( "[Rift] Oh darn, I managed to return to town, I better go back in the rift before anyone notices."); State = States.MoveToRiftStone; return; } } if (AdvDia.CurrentWorldId == ExplorationData.ActHubWorldIds[Act.A1] && State != States.EnteringRift) { DisablePulse(); return; } if (_currentWorldDynamicId != AdvDia.CurrentWorldDynamicId && _previusWorldDynamicId != AdvDia.CurrentWorldDynamicId && AdvDia.CurrentWorldId != ExplorationData.ActHubWorldIds[Act.A1]) { RiftData.AddEntryPortal(); _previusWorldDynamicId = _currentWorldDynamicId; _currentWorldDynamicId = AdvDia.CurrentWorldDynamicId; } switch (AdvDia.RiftQuest.Step) { case RiftStep.BossSpawned: if (!BossSpawnedStates.Contains(State)) { Logger.Info("[Rift] Behold the Rift Boss!"); State = States.BossSpawned; } break; case RiftStep.UrshiSpawned: if (!UrshiSpawnedStates.Contains(State)) { _riftEndTime = DateTime.UtcNow; var totalTime = _riftEndTime - _riftStartTime; if (totalTime.TotalSeconds < 3600 && totalTime.TotalSeconds > 0) { Logger.Info("[Rift] All done. (Total Time: {0} mins {1} seconds)", totalTime.Minutes, totalTime.Seconds); Logger.Info("[Rift] Level: {0}", ZetaDia.Me.InTieredLootRunLevel + 1); } else { Logger.Info("[Rift] All done. (Partial rift, no stats available)"); } Logger.Info("[Rift] My dear Urshi, I have some gems for you."); State = States.UrshiSpawned; } break; case RiftStep.Cleared: if (_RiftType == RiftType.Nephalem && PluginSettings.Current.NephalemRiftFullExplore && State != States.TownstoneFound) { break; } if (!ClearedStates.Contains(State)) { _riftEndTime = DateTime.UtcNow; var totalTime = _riftEndTime - _riftStartTime; if (totalTime.TotalSeconds < 3600 && totalTime.TotalSeconds > 0) { Logger.Info("[Rift] All done. (Total Time: {0} mins {1} seconds)", totalTime.Minutes, totalTime.Seconds); } else { Logger.Info("[Rift] All done. (Partial rift, no stats available)"); } State = States.ReturningToTown; } break; } }