Skip to content

Commit

Permalink
fix: for lava tiles in entrance of The Pits of Inferno Quest (#3196)
Browse files Browse the repository at this point in the history
Implements an alternative solution to handle lava
tiles in The Pits of Inferno Quest. The logic in register_actions.lua
has been modified to transform existing lava items (ID: 21477) into the
floor item (ID: 5815) using Tile:getItemById and Item:transform, instead
of relying on Game.createItem.
This addresses an issue where lava tiles in The Pits of Inferno Quest
were not behaving as expected
Resolves #3144
  • Loading branch information
jeansouzak authored Dec 27, 2024
1 parent 145da70 commit f81e5cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data-otservbr-global/scripts/lib/register_actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,10 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey)
-- The Pits of Inferno Quest
if toPosition == Position(32808, 32334, 11) then
for i = 1, #lava do
Game.createItem(5815, 1, lava[i])
local lavaTile = Tile(lava[i]):getItemById(21477)
if lavaTile then
lavaTile:transform(5815)
end
end
target:transform(3141)
toPosition:sendMagicEffect(CONST_ME_SMOKE)
Expand Down

0 comments on commit f81e5cd

Please sign in to comment.