diff --git a/data/scripts/commands/TeleportCommand.lua b/data/scripts/commands/TeleportCommand.lua index 6d6a4497..327608f4 100644 --- a/data/scripts/commands/TeleportCommand.lua +++ b/data/scripts/commands/TeleportCommand.lua @@ -92,6 +92,14 @@ function onEventStarted(player, actor, triggerName, isTeleport) if (choice == 1) then player:PlayAnimation(0x4000FFB); player:SendGameMessage(worldMaster, 34104, 0x20); + + --bandaid fix for returning while dead, missing things like weakness and the heal number + if (player:GetHP() == 0) then + player:SetHP(player.GetMaxHP()); + player:ChangeState(0); + player:PlayAnimation(0x01000066); + end + if (isInn) then --Return to Inn if (player:GetHomePointInn() == 1) then @@ -107,12 +115,6 @@ function onEventStarted(player, actor, triggerName, isTeleport) if (destination ~= nil) then randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5); rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]); - --bandaid fix for returning while dead, missing things like weakness and the heal number - if (player:IsDead()) then - player:SetHP(player.GetMaxHP()); - player:ChangeState(0); - player:PlayAnimation(0x01000066); - end GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation); end