diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index ba2e397b5..6df722934 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -1765,12 +1765,9 @@ XS(XS__summonallplayercorpses) bool RETVAL; uint32 char_id = (int)SvIV(ST(0)); - float dest_x = (float)SvIV(ST(1)); - float dest_y = (float)SvIV(ST(2)); - float dest_z = (float)SvIV(ST(3)); - float dest_heading = (float)SvIV(ST(4)); + auto position = xyz_heading((float)SvIV(ST(1)),(float)SvIV(ST(2)),(float)SvIV(ST(3)),(float)SvIV(ST(4))); - RETVAL = quest_manager.summonallplayercorpses(char_id, dest_x, dest_y, dest_z, dest_heading); + RETVAL = quest_manager.summonallplayercorpses(char_id, position); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 7d619803a..28dbba206 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -489,7 +489,7 @@ void lua_summon_burried_player_corpse(uint32 char_id, float x, float y, float z, } void lua_summon_all_player_corpses(uint32 char_id, float x, float y, float z, float h) { - quest_manager.summonallplayercorpses(char_id, x, y, z, h); + quest_manager.summonallplayercorpses(char_id, xyz_heading(x, y, z, h)); } int lua_get_player_burried_corpse_count(uint32 char_id) { diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 8ec522537..25e43752e 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1747,15 +1747,15 @@ bool QuestManager::summonburriedplayercorpse(uint32 char_id, const xyz_heading& return true; } -bool QuestManager::summonallplayercorpses(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading) { - bool Result = false; +bool QuestManager::summonallplayercorpses(uint32 char_id, const xyz_heading& position) { - if(char_id > 0) { - Client* c = entity_list.GetClientByCharID(char_id); - c->SummonAllCorpses(dest_x, dest_y, dest_z, dest_heading); - Result = true; - } - return Result; + if(char_id <= 0) + return false; + + Client* c = entity_list.GetClientByCharID(char_id); + c->SummonAllCorpses(position.m_X, position.m_Y, position.m_Z, position.m_Heading); + + return true; } uint32 QuestManager::getplayerburriedcorpsecount(uint32 char_id) { diff --git a/zone/questmgr.h b/zone/questmgr.h index c6c28111e..d001beab4 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -157,7 +157,7 @@ public: void clear_zone_flag(int zone_id); void sethp(int hpperc); bool summonburriedplayercorpse(uint32 char_id, const xyz_heading& position); - bool summonallplayercorpses(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading); + bool summonallplayercorpses(uint32 char_id, const xyz_heading& position); uint32 getplayerburriedcorpsecount(uint32 char_id); bool buryplayercorpse(uint32 char_id); void forcedooropen(uint32 doorid, bool altmode);