aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-04-15 18:40:25 +0200
committerGitHub <noreply@github.com>2024-04-15 18:40:25 +0200
commit53f2cfd71a6e97fe59e2ced18045e8eed0434f4e (patch)
tree884716ca3418796b0d51ed01b4a08eea4fd5ff6e
parent15e454fbf1b88611025317d318c9224cdf9db9f4 (diff)
downloadskyhanni-53f2cfd71a6e97fe59e2ced18045e8eed0434f4e.tar.gz
skyhanni-53f2cfd71a6e97fe59e2ced18045e8eed0434f4e.tar.bz2
skyhanni-53f2cfd71a6e97fe59e2ced18045e8eed0434f4e.zip
Fix: Fixed Fame Rankup not updating the rank (#1450)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt
index eca5bbcc3..a69622916 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt
@@ -67,10 +67,15 @@ object BitsAPI {
private val bitsChatGroup = bitsDataGroup.group("chat")
private val bitsFromFameRankUpChatPattern by bitsChatGroup.pattern(
- "famerankup",
+ "rankup.bits",
"§eYou gained §3(?<amount>.*) Bits Available §ecompounded from all your §epreviously eaten §6cookies§e! Click here to open §6cookie menu§e!"
)
+ private val fameRankUpPattern by bitsChatGroup.pattern(
+ "rankup.rank",
+ "[§\\w\\s]+FAME RANK UP (?:§.)+(?<rank>.*)"
+ )
+
private val boosterCookieAte by bitsChatGroup.pattern(
"boostercookieate",
"§eYou consumed a §6Booster Cookie§e!.*"
@@ -173,6 +178,21 @@ object BitsAPI {
return
}
+ fameRankUpPattern.matchMatcher(message) {
+ val rank = group("rank")
+
+ currentFameRank = getFameRankByNameOrNull(rank)
+ ?: return ErrorManager.logErrorWithData(
+ FameRankNotFoundException(rank),
+ "FameRank $rank not found",
+ "Rank" to rank,
+ "Message" to message,
+ "FameRanks" to FameRanks.fameRanks
+ )
+
+ return
+ }
+
boosterCookieAte.matchMatcher(message) {
bitsAvailable += (defaultcookiebits * (currentFameRank?.bitsMultiplier ?: return)).toInt()
val cookieTime = cookieBuffTime