Skip to content

Commit

Permalink
fix: error of soulwar to custom data
Browse files Browse the repository at this point in the history
This fixes the loot error and does not call the function if the soulwar quest does not exist in the custom data
  • Loading branch information
Leonardo Mateus Petry Frohlich committed Oct 10, 2024
1 parent 28c7dcc commit be0c210
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data/libs/functions/monstertype.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function MonsterType:generateLootRoll(config, resultTable, player)
end

local chance = item.chance
if iType:getId() == SoulWarQuest.bagYouDesireItemId then
if SoulWarQuest and iType:getId() == SoulWarQuest.bagYouDesireItemId then
result[item.itemId].chance = self:calculateBagYouDesireChance(player, chance)
logger.debug("Final chance for bag you desire: {}, original chance: {}", result[item.itemId].chance, chance)
end
Expand Down
2 changes: 2 additions & 0 deletions data/scripts/lib/quests.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
-- We need to register the variables beforehand to avoid accessing null values.
if RegisterSoulWarBossesLevers then
RegisterSoulWarBossesLevers()
end

0 comments on commit be0c210

Please sign in to comment.