Skip to content

Commit 4595f32

Browse files
committed
Adding some specific exceptions.
1 parent c419deb commit 4595f32

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/main/kotlin/com/wikia/tibia/v2/domain/CreaturesService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CreaturesService(
3434
?.map { lootItem ->
3535
async {
3636
withContext(Dispatchers.IO) {
37-
getItem(lootItem.itemName)?.let { addCreatureToDroppedByListOfItem(creature, it) }
37+
getItem(lootItem.itemName, creature.name)?.let { addCreatureToDroppedByListOfItem(creature, it) }
3838
}
3939
}
4040
}
@@ -98,10 +98,10 @@ class CreaturesService(
9898
}
9999

100100
// TODO check WikiObject pagename or Item.Actualname, not Item.Name
101-
private suspend fun getItem(itemName: String): TibiaObject? {
101+
private suspend fun getItem(itemName: String, creatureName: String): TibiaObject? {
102102
return getItems().firstOrNull { it.name.equals(itemName, ignoreCase = true) }
103103
?: run {
104-
logger.error("Could not find item with name '$itemName' in collection of items.")
104+
logger.error("Looking at loot list of creature $creatureName, but could not find item with name '$itemName' in collection of items.")
105105
null
106106
}
107107
}

src/main/kotlin/com/wikia/tibia/v2/domain/LootStatisticsService.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,16 @@ class LootStatisticsService(
168168
"Lesser Fire Devil" to listOf("Small Pitchfork"),
169169
"Troll Marauder" to listOf("Bunch of Troll Hair", "Trollroot"),
170170
"The Percht Queen" to listOf("The Crown of the Percht Queen", "Giant Shimmering Pearl"),
171+
"Lady Tenebris" to listOf("Part of a Rune"),
172+
"Melting Frozen Horror" to listOf("Part of a Rune"),
173+
"Soul of Dragonking Zyrtarch" to listOf("Part of a Rune"),
174+
"The Time Guardian" to listOf("Part of a Rune"),
175+
"The Blazing Time Guardian" to listOf("Part of a Rune"),
176+
"The Freezing Time Guardian" to listOf("Part of a Rune"),
171177
)
172178
private val lootStatisticsTableEntriesNotToBeUsedOnCreaturePage = listOf(
173179
"Empty",
180+
"Music Sheet",
174181
"Old Rag",
175182
"Part of a Jester Doll",
176183
"Secret Instruction",

0 commit comments

Comments
 (0)