Skip to content

Commit

Permalink
fix: console error related to wrong "monster" to "self"
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Dec 3, 2024
1 parent 34b6fa8 commit 27230b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/lib/monster_functions.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Monster:handleCobraOnSpawn()
if Game.getStorageValue(Global.Storage.CobraFlask) >= os.time() then
monster:setHealth(monster:getMaxHealth() * 0.75)
monster:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
self:setHealth(self:getMaxHealth() * 0.75)
self:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
else
Game.setStorageValue(Global.Storage.CobraFlask, -1)
end
Expand Down

0 comments on commit 27230b3

Please sign in to comment.