diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 0e65240d4..3ec5801ef 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -1392,7 +1392,7 @@ XS(XS__moveto) else saveguard = false; - quest_manager.moveto(x, y, z, h, saveguard); + quest_manager.moveto(xyz_heading(x, y, z, h), saveguard); XSRETURN_EMPTY; } diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index efc6c48fe..9238278cc 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -421,15 +421,15 @@ void lua_pause(int duration) { } void lua_move_to(float x, float y, float z) { - quest_manager.moveto(x, y, z, 0, false); + quest_manager.moveto(xyz_heading(x, y, z, 0.0f), false); } void lua_move_to(float x, float y, float z, float h) { - quest_manager.moveto(x, y, z, h, false); + quest_manager.moveto(xyz_heading(x, y, z, h), false); } void lua_move_to(float x, float y, float z, float h, bool save_guard_spot) { - quest_manager.moveto(x, y, z, h, save_guard_spot); + quest_manager.moveto(xyz_heading(x, y, z, h), save_guard_spot); } void lua_path_resume() { diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 425175e43..e8da20496 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1553,12 +1553,11 @@ void QuestManager::pause(int duration) { owner->CastToNPC()->PauseWandering(duration); } -void QuestManager::moveto(float x, float y, float z, float h, bool saveguardspot) { +void QuestManager::moveto(const xyz_heading& position, bool saveguardspot) { QuestManagerCurrentQuestVars(); if (!owner || !owner->IsNPC()) return; - auto position = xyz_heading(x,y,z,h); owner->CastToNPC()->MoveTo(position, saveguardspot); } diff --git a/zone/questmgr.h b/zone/questmgr.h index de824c8a2..4a01a6e49 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -135,7 +135,7 @@ public: void start(int wp); void stop(); void pause(int duration); - void moveto(float x, float y, float z, float h, bool saveguardspot); + void moveto(const xyz_heading& position, bool saveguardspot); void resume(); void addldonpoints(int32 points, uint32 theme); void addldonwin(int32 wins, uint32 theme);