Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Removing the UnidentifiedDungeon State.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilpersi committed Sep 9, 2020
1 parent 7fc5e32 commit 411b3c3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/main/java/com/github/ilpersi/BHBot/AutoRuneManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ void handleMinorBossRunes() {
}

String activity = bot.getState().getShortcut();
// Hack to work around unknown dungeons
if (activity.equals("ud"))
activity = "d";
if (!bot.settings.autoBossRune.containsKey(activity)) {
BHBot.logger.info("No autoBossRunes assigned for " + bot.getState().getName() + ", skipping.");
return;
Expand All @@ -342,8 +339,7 @@ void handleAutoBossRune(long outOfEncounterTimestamp, long inEncounterTimestamp)
if ((bot.getState() == BHBot.State.Raid && !bot.settings.autoShrine.contains("r") && bot.settings.autoBossRune.containsKey("r")) ||
(bot.getState() == BHBot.State.Trials && !bot.settings.autoShrine.contains("t") && bot.settings.autoBossRune.containsKey("t")) ||
(bot.getState() == BHBot.State.Expedition && !bot.settings.autoShrine.contains("e") && bot.settings.autoBossRune.containsKey("e")) ||
(bot.getState() == BHBot.State.Dungeon && bot.settings.autoBossRune.containsKey("d")) ||
bot.getState() == BHBot.State.UnidentifiedDungeon) {
(bot.getState() == BHBot.State.Dungeon && bot.settings.autoBossRune.containsKey("d")) ) {
if (!autoBossRuned) {
if ((((outOfEncounterTimestamp - inEncounterTimestamp) >= bot.settings.battleDelay) && guildButtonSeg != null)) {
BHBot.logger.autorune(bot.settings.battleDelay + "s since last encounter, changing runes for boss encounter");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ void processAutoShrine(long battleDelay) {

if ((bot.getState() == BHBot.State.Raid && bot.settings.autoShrine.contains("r")) ||
(bot.getState() == BHBot.State.Trials && bot.settings.autoShrine.contains("t")) ||
(bot.getState() == BHBot.State.Expedition && bot.settings.autoShrine.contains("e")) ||
(bot.getState() == BHBot.State.UnidentifiedDungeon)) {
(bot.getState() == BHBot.State.Expedition && bot.settings.autoShrine.contains("e"))) {

guildButtonSeg = MarvinSegment.fromCue(BHBot.cues.get("GuildButton"), bot.browser);

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/github/ilpersi/BHBot/BHBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,6 @@ enum State {
PVP("PVP", "p"),
Raid("Raid", "r"),
Trials("Trials", "t"),
UnidentifiedDungeon("Unidentified dungeon", "ud"), // this one is used when we log in and we get a "You were recently disconnected from a dungeon. Do you want to continue the dungeon?" window
WorldBoss("World Boss", "w");

private final String name;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/github/ilpersi/BHBot/DungeonThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public void run() {
}

// process dungeons of any kind (if we are in any):
if (bot.getState() == BHBot.State.Raid || bot.getState() == BHBot.State.Trials || bot.getState() == BHBot.State.Gauntlet || bot.getState() == BHBot.State.Dungeon || bot.getState() == BHBot.State.PVP || bot.getState() == BHBot.State.GVG || bot.getState() == BHBot.State.Invasion || bot.getState() == BHBot.State.UnidentifiedDungeon || bot.getState() == BHBot.State.Expedition || bot.getState() == BHBot.State.WorldBoss) {
if (bot.getState() == BHBot.State.Raid || bot.getState() == BHBot.State.Trials || bot.getState() == BHBot.State.Gauntlet || bot.getState() == BHBot.State.Dungeon || bot.getState() == BHBot.State.PVP || bot.getState() == BHBot.State.GVG || bot.getState() == BHBot.State.Invasion || bot.getState() == BHBot.State.Expedition || bot.getState() == BHBot.State.WorldBoss) {
processDungeon();
continue;
}
Expand Down Expand Up @@ -2388,7 +2388,7 @@ private void processDungeon() {
/*
* autoBribe/Persuasion code
*/
if ((bot.getState() == BHBot.State.Raid || bot.getState() == BHBot.State.Dungeon || bot.getState() == BHBot.State.UnidentifiedDungeon) && (activityDuration % 5 == 0) && encounterStatus) {
if ((bot.getState() == BHBot.State.Raid || bot.getState() == BHBot.State.Dungeon) && (activityDuration % 5 == 0) && encounterStatus) {
seg = MarvinSegment.fromCue(BHBot.cues.get("Persuade"), bot.browser);
if (seg != null) {
handleFamiliarEncounter();
Expand Down Expand Up @@ -2460,7 +2460,7 @@ private void processDungeon() {
/*
* Check for the 'Cleared' dialogue and handle post-activity tasks
*/
if (bot.getState() == BHBot.State.Raid || bot.getState() == BHBot.State.Dungeon || bot.getState() == BHBot.State.Expedition || bot.getState() == BHBot.State.Trials || bot.getState() == BHBot.State.UnidentifiedDungeon) {
if (bot.getState() == BHBot.State.Raid || bot.getState() == BHBot.State.Dungeon || bot.getState() == BHBot.State.Expedition || bot.getState() == BHBot.State.Trials) {
seg = MarvinSegment.fromCue(BHBot.cues.get("Cleared"), bot.browser);
if (seg != null) {

Expand Down

0 comments on commit 411b3c3

Please sign in to comment.