Skip to content

Commit

Permalink
another two small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
doej1367 committed Apr 26, 2022
1 parent c689665 commit 3fc8b44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/java/me/hyblockrnganalyzer/HypixelEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ else if (plainText.startsWith("[NPC] Elle: Okay adventurers, I will go and fish
main.getKuudraChestStatus().resetKuudraChestStatus();
else if (plainText.startsWith("[BOSS] Kuudra"))
main.getKuudraChestStatus().setHotKuudraTier();
else if (plainText.trim().matches("Percentage Complete: "))
else if (plainText.trim().startsWith("Percentage Complete: "))
main.getKuudraChestStatus().setPercentage(Integer.parseInt(plainText.trim().split(": ")[1].split("%")[0]));
else if (plainText.trim().matches("Tokens Earned: "))
else if (plainText.trim().startsWith("Tokens Earned: "))
main.getKuudraChestStatus().setTokens(Integer.parseInt(plainText.trim().split(": ")[1]));
else if (plainText.trim().matches("Damage To Kuudra: "))
else if (plainText.trim().startsWith("Damage To Kuudra: "))
main.getKuudraChestStatus().setDamage(plainText.trim().split(": ")[1]);
else if (plainText.startsWith("You've earned a Crystal Loot Bundle!"))
new Thread() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public TreeMap<String, Integer> getChestContentsSummary() {
String tmp = key.contains("Mithril Powder") ? "Mithril Powder" : "Gemstone Powder";
count = Integer.parseInt(key.replaceAll(tmp, "").trim());
key = tmp;
} else if (key.contains("Enchanted Book")) { // TODO adapt for Experiments (if 'Item Reward' -> [2], c=0.5)
} else if (key.contains("Enchanted Book") || key.contains("Attribute Shard")) { // TODO adapt for Experiments (if 'Item Reward' -> [2], c=0.5)
key = item.getTagCompound().getCompoundTag("display").getTagList("Lore", 8).get(0).toString()
.replaceAll("\\u00a7.", "").replaceAll("\"", "");
} else if (key.contains("Open Reward Chest")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public void onOpenCustomChest(OpenCustomChestEvent event) {
int percentage = main.getKuudraChestStatus().getPercentage();
int tokens = main.getKuudraChestStatus().getTokens();
int damage = main.getKuudraChestStatus().getDamage();
sb.append("_chestType:" + chestType + ",_tierType:" + tierType + ",_percentage:" + percentage + ","
+ ",_tokens:" + tokens + "," + ",_damage:" + damage + ",");
sb.append("_chestType:" + chestType + ",_tierType:" + tierType + ",_percentage:" + percentage + ",_tokens:"
+ tokens + ",_damage:" + damage + ",");
for (Entry e : event.getChestContentsSummary().entrySet())
sb.append(e.getKey() + ":" + e.getValue() + ",");
main.getKuudraChestStatus().setStatusSaved(chestType);
Expand Down

0 comments on commit 3fc8b44

Please sign in to comment.