From f81e5cd5faff04bbedc39c3a3dccd71ed4703787 Mon Sep 17 00:00:00 2001 From: Jean Carlo de Souza Date: Fri, 27 Dec 2024 12:25:00 -0300 Subject: [PATCH] fix: for lava tiles in entrance of The Pits of Inferno Quest (#3196) 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 --- data-otservbr-global/scripts/lib/register_actions.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data-otservbr-global/scripts/lib/register_actions.lua b/data-otservbr-global/scripts/lib/register_actions.lua index a65de89e017..ec68c90e27c 100644 --- a/data-otservbr-global/scripts/lib/register_actions.lua +++ b/data-otservbr-global/scripts/lib/register_actions.lua @@ -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)