aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-05 00:45:55 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-05 00:45:55 +0200
commit4ba9cd16a9ef2f7f37454d81248cd96d7846c8aa (patch)
tree80bbb17410595b45a41d66dd88ed7f901b9516f2 /src
parentd20d9d3fbeaa3edbf3549eee7e42a1cfc3cff375 (diff)
downloadskyhanni-4ba9cd16a9ef2f7f37454d81248cd96d7846c8aa.tar.gz
skyhanni-4ba9cd16a9ef2f7f37454d81248cd96d7846c8aa.tar.bz2
skyhanni-4ba9cd16a9ef2f7f37454d81248cd96d7846c8aa.zip
Fixed farming talisman detection from accessory bag when having only one page or after switching from main profile
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt
index 48b1c67b1..ed524e233 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt
@@ -32,6 +32,8 @@ class CropAccessoryData {
@SubscribeEvent
fun onProfileJoin(event: ProfileJoinEvent) {
loadedAccessoryThisProfile = false
+
+ accessoryPage.clear()
}
@SubscribeEvent
@@ -48,6 +50,15 @@ class CropAccessoryData {
// Handle accessory bag detection
@SubscribeEvent
fun onInventoryOpen(event: InventoryOpenEvent) {
+
+ // handling accessory bags with only one page
+ if (event.inventoryName == "Accessory Bag") {
+ isLoadingAccessories = true
+ accessoryBagPageCount = 1
+ accessoryBagPageNumber = 1
+ return
+ }
+
val groups = accessoryBagNamePattern.matchEntire(event.inventoryName)?.groups ?: return
isLoadingAccessories = true
accessoryBagPageCount = groups[2]!!.value.toInt()