Skip to content

Commit b78dff1

Browse files
authored
fix: bossCount paw and fur quest (#534)
1 parent f558246 commit b78dff1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

data-global/scripts/quests/killing_in_the_name_of/creaturescripts_boss_kill.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ function deathEvent.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller)
4040
local targetName = creature:getName():lower()
4141

4242
onDeathForParty(creature, mostDamageKiller, function(creature, player)
43-
for i, bossName in ipairs(taskBoss) do
43+
for i, bossName in pairs(taskBoss) do
4444
if targetName == bossName then
45-
if player:getStorageValue(bossKillCount + i) == 0 then
46-
player:setStorageValue(bossKillCount + i, 1)
45+
local storageKey = bossKillCount + i
46+
local current = player:getStorageValue(storageKey)
47+
48+
if current < 0 then
49+
current = 0
4750
end
51+
52+
player:setStorageValue(storageKey, current + 1)
4853
return true
4954
end
5055
end

0 commit comments

Comments
 (0)