aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt8
2 files changed, 17 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java b/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
index 424c478ba..00392bcc4 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
@@ -113,6 +113,16 @@ public class Slayer {
@ConfigOption(name = "Minimum Price", desc = "Items below this price will not show up in chat.")
@ConfigEditorSlider(minValue = 1, maxValue = 5_000_000, minStep = 1)
public int minimumPrice = 100_000;
+
+ @Expose
+ @ConfigOption(name = "Title Warning", desc = "Show an title for expensive item pickups.")
+ @ConfigEditorBoolean
+ public boolean titleWarning = false;
+
+ @Expose
+ @ConfigOption(name = "Title Price", desc = "Items above this price will show up as title.")
+ @ConfigEditorSlider(minValue = 1, maxValue = 20_000_000, minStep = 1)
+ public int minimumPriceWarning = 500_000;
}
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
index 2933017d1..b32073c60 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.Storage
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.data.SlayerAPI
+import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.*
import at.hannibal2.skyhanni.features.bazaar.BazaarApi
import at.hannibal2.skyhanni.features.bazaar.BazaarData
@@ -127,10 +128,15 @@ class SlayerItemProfitTracker {
addItemPickup(internalName, itemStack.stackSize)
logger.log("Coins gained for picking up an item ($itemName) ${price.addSeparators()}")
if (config.priceInChat) {
- if (config.minimumPrice < price) {
+ if (price > config.minimumPrice) {
LorenzUtils.chat("§e[SkyHanni] §a+Slayer Drop§7: §r$itemName")
}
}
+ if (config.titleWarning) {
+ if (price > config.minimumPriceWarning) {
+ TitleUtils.sendTitle("§a+ $itemName", 5_000)
+ }
+ }
}
fun update() {