mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
SummonAllCharacterCorpses converted to xyz_heading
This commit is contained in:
+7
-8
@@ -3806,21 +3806,20 @@ Corpse* ZoneDatabase::SummonBuriedCharacterCorpses(uint32 char_id, uint32 dest_z
|
||||
return corpse;
|
||||
}
|
||||
|
||||
bool ZoneDatabase::SummonAllCharacterCorpses(uint32 char_id, uint32 dest_zone_id, uint16 dest_instance_id, float dest_x, float dest_y, float dest_z, float dest_heading) {
|
||||
bool ZoneDatabase::SummonAllCharacterCorpses(uint32 char_id, uint32 dest_zone_id, uint16 dest_instance_id, const xyz_heading& position) {
|
||||
Corpse* NewCorpse = 0;
|
||||
int CorpseCount = 0;
|
||||
|
||||
std::string query = StringFormat(
|
||||
"UPDATE character_corpses SET zone_id = %i, instance_id = %i, x = %f, y = %f, z = %f, heading = %f, is_buried = 0, was_at_graveyard = 0 WHERE charid = %i",
|
||||
dest_zone_id, dest_instance_id, dest_x, dest_y, dest_z, dest_heading, char_id
|
||||
dest_zone_id, dest_instance_id, position.m_X, position.m_Y, position.m_Z, position.m_Heading, char_id
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
query = StringFormat(
|
||||
"SELECT `id`, `charname`, `time_of_death`, `is_rezzed` FROM `character_corpses` WHERE `charid` = '%u'"
|
||||
"ORDER BY time_of_death",
|
||||
char_id
|
||||
);
|
||||
char_id);
|
||||
results = QueryDatabase(query);
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
@@ -3828,10 +3827,10 @@ bool ZoneDatabase::SummonAllCharacterCorpses(uint32 char_id, uint32 dest_zone_id
|
||||
atoll(row[0]),
|
||||
char_id,
|
||||
row[1],
|
||||
dest_x,
|
||||
dest_y,
|
||||
dest_z,
|
||||
dest_heading,
|
||||
position.m_X,
|
||||
position.m_Y,
|
||||
position.m_Z,
|
||||
position.m_Heading,
|
||||
row[2],
|
||||
atoi(row[3]) == 1,
|
||||
false);
|
||||
|
||||
Reference in New Issue
Block a user