Skip to content

Commit

Permalink
Fix pet numbers not showing in item list
Browse files Browse the repository at this point in the history
  • Loading branch information
nea89o committed Aug 8, 2024
1 parent 325ea56 commit 71d0db2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ data class PetData(
val levelData by lazy { ExpLadders.getExpLadder(petId, rarity).getPetLevel(exp) }
}

data class SBItemStack(
data class SBItemStack constructor(
val skyblockId: SkyblockId,
val neuItem: NEUItem?,
private var stackSize: Int,
Expand Down Expand Up @@ -133,7 +133,8 @@ data class SBItemStack(
return@run ItemCache.coinItem(stackSize).also { it.appendLore(extraLore) }
val replacementData = mutableMapOf<String, String>()
injectReplacementDataForPets(replacementData)
return@run neuItem.asItemStack(idHint = skyblockId, replacementData).copyWithCount(stackSize)
return@run neuItem.asItemStack(idHint = skyblockId, replacementData)
.copyWithCount(stackSize)
.also { it.appendLore(extraLore) }
.also { enhanceStatsByStars(it, stars) }
}
Expand Down Expand Up @@ -212,7 +213,8 @@ object SBItemEntryDefinition : EntryDefinition<SBItemStack> {
}

override fun wildcard(entry: EntryStack<SBItemStack>?, value: SBItemStack): SBItemStack {
return value.copy(stackSize = 1, petData = null, stars = 0, extraLore = listOf())
return value.copy(stackSize = 1, petData = RepoManager.getPotentialStubPetData(value.skyblockId),
stars = 0, extraLore = listOf())
}

override fun normalize(entry: EntryStack<SBItemStack>?, value: SBItemStack): SBItemStack {
Expand Down
2 changes: 0 additions & 2 deletions src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


package moe.nea.firmament.repo

import io.github.moulberry.repo.NEURepository
Expand Down

0 comments on commit 71d0db2

Please sign in to comment.