Skip to content

Commit

Permalink
refactor: split player death event handler into smaller functions
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires committed Nov 13, 2024
1 parent 73f5c5a commit 73c5351
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 260 deletions.
114 changes: 0 additions & 114 deletions data-canary/scripts/creaturescripts/player_death.lua

This file was deleted.

146 changes: 0 additions & 146 deletions data-otservbr-global/scripts/creaturescripts/others/player_death.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
local svargrondArenaPlayerDeath = CreatureEvent("SvargrondArenaPlayerDeath")

function svargrondArenaPlayerDeath.onDeath(player, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified)
if player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor) > 0 then
player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, 0)
end
end

svargrondArenaPlayerDeath:register()
Loading

0 comments on commit 73c5351

Please sign in to comment.