Turns out the player also spawns out of the inn for the nightmare. Fixed (and renamed a spawn).

This commit is contained in:
Filip Maj 2019-07-27 23:11:39 -04:00
parent 7883143089
commit d588dd0348

View File

@ -20,18 +20,24 @@ function onEventStarted(player, actor, triggerName, dreamCode, innCode, narg1, n
warpOutOfInn(player, innCode);
--Nael Nightmare
elseif (dreamCode == 20) then
GetWorldManager():DoZoneChange(player, 244, nil, 0, SPAWN_NIGHTMARE, player.positionX, player.positionY, player.positionZ, player.rotation);
warpOutOfInn(player, innCode, true);
end
player:EndEvent();
end
function warpOutOfInn(player, innCode)
function warpOutOfInn(player, innCode, isNightmare)
local spawnCode = SPAWN_NO_ANIM;
if (isNightmare) then
spawnCode = SPAWN_NIGHTMARE;
end
if (innCode == 1) then
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -444.266, 39.518, 191, 1.9);
GetWorldManager():DoZoneChange(player, 133, nil, 0, spawnCode, -444.266, 39.518, 191, 1.9);
elseif (innCode == 2) then
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, 59.252, 4, -1219.342, 0.852);
GetWorldManager():DoZoneChange(player, 155, nil, 0, spawnCode, 59.252, 4, -1219.342, 0.852);
elseif (innCode == 3) then
GetWorldManager():DoZoneChange(player, 209, nil, 0, 15, -110.157, 202, 171.345, 0);
GetWorldManager():DoZoneChange(player, 209, nil, 0, spawnCode, -110.157, 202, 171.345, 0);
end
end