Skip to content

Commit

Permalink
fix: DungeonListener doesn't recognize start of dungeon
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Aug 5, 2023
1 parent 68c9566 commit 2472361
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ object DungeonListener {
fun onPacket(event: MainReceivePacketEvent<*, *>) {
if (!Utils.inDungeons) return
if (event.packet is S02PacketChat) {
if (event.packet.chatComponent.unformattedText.startsWith("Dungeon starts in 1 second.")) {
if (event.packet.chatComponent.unformattedText.startsWith("Starting in 1 second.")) {
team.clear()
deads.clear()
missingPuzzles.clear()
Expand Down Expand Up @@ -132,7 +132,7 @@ object DungeonListener {
missingPuzzles.addAll(localMissingPuzzles)
}
TickTask(2, repeats = true) {
if (Utils.inDungeons && DungeonTimer.scoreShownAt == -1L || System.currentTimeMillis() - DungeonTimer.scoreShownAt < 1500) {
if (Utils.inDungeons && (DungeonTimer.scoreShownAt == -1L || System.currentTimeMillis() - DungeonTimer.scoreShownAt < 1500)) {
val tabEntries = TabListUtils.tabEntries
for (teammate in team.values) {
if (tabEntries.size <= teammate.tabEntryIndex) continue
Expand All @@ -159,7 +159,7 @@ object DungeonListener {
if (Skytils.config.dungeonDeathCounter) {
TickTask(1) {
UChat.chat(
"§bThis is §e${teammate.playerName}§b's §e${teammate.deaths.addSuffix()}§b death out of §e${totalDeaths}§b total deaths.${
"§bThis is §e${teammate.playerName}§b's §e${teammate.deaths.addSuffix()}§b death out of §e${totalDeaths}§b total tracked deaths.${
" §6(SPIRIT)".toStringIfTrue(
`silly~churl, billy~churl, silly~billy hilichurl`
)
Expand Down

0 comments on commit 2472361

Please sign in to comment.