From dc4b632b31019efe9d3d314637c9c3da86a5603e Mon Sep 17 00:00:00 2001 From: xp Date: Mon, 6 Dec 2021 22:14:59 -0800 Subject: [PATCH] Added SAM/WAR self-buffs --- .../main/java/gg/xp/reevent/scan/AutoHandlerScan.java | 10 ++++++---- .../events/triggers/jobs/DotRefreshReminderGui.java | 2 +- .../events/triggers/jobs/gui/DotTrackerOverlay.java | 8 +++++++- xivdata/src/main/java/gg/xp/xivdata/jobs/Cooldown.java | 10 +++++++++- xivdata/src/main/java/gg/xp/xivdata/jobs/DotBuff.java | 4 ++++ 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/reevent/src/main/java/gg/xp/reevent/scan/AutoHandlerScan.java b/reevent/src/main/java/gg/xp/reevent/scan/AutoHandlerScan.java index fbc4a8a1ed88..fd1737c4ef75 100644 --- a/reevent/src/main/java/gg/xp/reevent/scan/AutoHandlerScan.java +++ b/reevent/src/main/java/gg/xp/reevent/scan/AutoHandlerScan.java @@ -9,12 +9,14 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.net.URL; import java.util.ArrayList; -import java.util.HashMap; +import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; import java.util.stream.Stream; import static org.reflections.scanners.Scanners.MethodsAnnotated; @@ -37,8 +39,8 @@ public AutoHandlerScan(AutoHandlerInstanceProvider instanceProvider, AutoHandler public List build() { log.info("Scanning packages"); List out = new ArrayList<>(); - ClassLoader loader = new ForceReloadClassLoader(); - ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); +// ClassLoader loader = new ForceReloadClassLoader(); +// ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); try { // TODO: Reload of existing classes is broken because reloading basic classes such as 'Event' // in a new classloader causes the JVM to no longer see it as the same class, causing signature @@ -114,7 +116,7 @@ public List build() { return out; } finally { - Thread.currentThread().setContextClassLoader(oldLoader); +// Thread.currentThread().setContextClassLoader(oldLoader); } diff --git a/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/DotRefreshReminderGui.java b/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/DotRefreshReminderGui.java index ab6472fe8a16..eea8d56f1c69 100644 --- a/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/DotRefreshReminderGui.java +++ b/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/DotRefreshReminderGui.java @@ -28,7 +28,7 @@ public DotRefreshReminderGui(DotRefreshReminders backend) { @Override public String getTabName() { - return "DoT Tracker"; + return "DoT/Buff Tracker"; } @Override diff --git a/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/gui/DotTrackerOverlay.java b/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/gui/DotTrackerOverlay.java index 23b03cad5751..da9a251b62c4 100644 --- a/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/gui/DotTrackerOverlay.java +++ b/triggers/src/main/java/gg/xp/xivsupport/events/triggers/jobs/gui/DotTrackerOverlay.java @@ -111,7 +111,13 @@ private void getAndSort() { })) .forEach((k, v) -> { if (v.size() == 1) { - out.add(new VisualDotInfo(v.get(0))); + BuffApplied thisBuff = v.get(0); + if (thisBuff.getTarget().isThePlayer()) { + out.add(new VisualDotInfo(thisBuff, thisBuff.getBuff().getName())); + } + else { + out.add(new VisualDotInfo(thisBuff)); + } } else { out.add(new VisualDotInfo(v.get(0), String.format("%s Targets", v.size()))); diff --git a/xivdata/src/main/java/gg/xp/xivdata/jobs/Cooldown.java b/xivdata/src/main/java/gg/xp/xivdata/jobs/Cooldown.java index bd16a4e48e39..0bf69e0c640c 100644 --- a/xivdata/src/main/java/gg/xp/xivdata/jobs/Cooldown.java +++ b/xivdata/src/main/java/gg/xp/xivdata/jobs/Cooldown.java @@ -70,10 +70,18 @@ public enum Cooldown { Tactician(MCH, 120.0, "Tactician", CooldownType.PARTY_TODO_CATEGORIZE_ME, 0x41f9, -1), - FOO(JobType.TANK, 30.0d, "Foo Buff", CooldownType.DEFENSIVE, 0x123, 0x456); public enum CooldownType { + // TODO: change these to: + /* + Personal Mit, + Party Mit, + Personal Burst (both buff and damage CD), + Party Buff, + Personal Utility (lucid, etc), + Party utility (rescue, scholoton) + */ DEFENSIVE, OFFENSIVE, PERSONAL, diff --git a/xivdata/src/main/java/gg/xp/xivdata/jobs/DotBuff.java b/xivdata/src/main/java/gg/xp/xivdata/jobs/DotBuff.java index ef605888d0b2..9c935b9e744e 100644 --- a/xivdata/src/main/java/gg/xp/xivdata/jobs/DotBuff.java +++ b/xivdata/src/main/java/gg/xp/xivdata/jobs/DotBuff.java @@ -15,7 +15,11 @@ public enum DotBuff { MNK_Demolish(MNK, "Demolish", 0xf6L), NIN_ShadowFang(NIN, "Shadow Fang", 0x1fcL), PLD_GoringBlade(PLD, "Goring Blade", 0x2d5L), + WAR_StormsEye(WAR, "Storm's Eye", 0x5AL), SAM_Higanbana(SAM, "Higanbana", 0x4ccL), + // TODO: this isn't really a dot, but it's something you'd want 100% uptime on + SAM_Fugetsu(SAM, "Fugetsu", 0x512L), + SAM_Fuka(SAM, "Fuka", 0x513L), SCH_Bio(SCH, "Bio/II/Biolysis", 0xb3L, 0xbdL, 0x767L), // SMN_Bio(SMN, "Bio/II/III", 0xb3L, 0xbdL, 0x4beL), // SMN_Miasma(SMN, "Miasma/II/III", 0xb4L, 0xbcL, 0x4bfL),