summonallplayercorpses converted to xyz_heading

This commit is contained in:
Arthur Ice 2014-12-02 12:42:47 -08:00
parent dd5265dc02
commit 7a74df5ff1
4 changed files with 12 additions and 15 deletions

View File

@ -1765,12 +1765,9 @@ XS(XS__summonallplayercorpses)
bool RETVAL; bool RETVAL;
uint32 char_id = (int)SvIV(ST(0)); uint32 char_id = (int)SvIV(ST(0));
float dest_x = (float)SvIV(ST(1)); auto position = xyz_heading((float)SvIV(ST(1)),(float)SvIV(ST(2)),(float)SvIV(ST(3)),(float)SvIV(ST(4)));
float dest_y = (float)SvIV(ST(2));
float dest_z = (float)SvIV(ST(3));
float dest_heading = (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); ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0)); sv_2mortal(ST(0));

View File

@ -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) { 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) { int lua_get_player_burried_corpse_count(uint32 char_id) {

View File

@ -1747,15 +1747,15 @@ bool QuestManager::summonburriedplayercorpse(uint32 char_id, const xyz_heading&
return true; return true;
} }
bool QuestManager::summonallplayercorpses(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading) { bool QuestManager::summonallplayercorpses(uint32 char_id, const xyz_heading& position) {
bool Result = false;
if(char_id > 0) { if(char_id <= 0)
Client* c = entity_list.GetClientByCharID(char_id); return false;
c->SummonAllCorpses(dest_x, dest_y, dest_z, dest_heading);
Result = true; Client* c = entity_list.GetClientByCharID(char_id);
} c->SummonAllCorpses(position.m_X, position.m_Y, position.m_Z, position.m_Heading);
return Result;
return true;
} }
uint32 QuestManager::getplayerburriedcorpsecount(uint32 char_id) { uint32 QuestManager::getplayerburriedcorpsecount(uint32 char_id) {

View File

@ -157,7 +157,7 @@ public:
void clear_zone_flag(int zone_id); void clear_zone_flag(int zone_id);
void sethp(int hpperc); void sethp(int hpperc);
bool summonburriedplayercorpse(uint32 char_id, const xyz_heading& position); 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); uint32 getplayerburriedcorpsecount(uint32 char_id);
bool buryplayercorpse(uint32 char_id); bool buryplayercorpse(uint32 char_id);
void forcedooropen(uint32 doorid, bool altmode); void forcedooropen(uint32 doorid, bool altmode);