SummonAllCorpses converted to xyz_heading

This commit is contained in:
Arthur Ice
2014-12-02 14:50:48 -08:00
parent 4daf4ab507
commit f6c98132f0
3 changed files with 7 additions and 14 deletions
+5 -12
View File
@@ -4942,13 +4942,11 @@ void Client::SummonAndRezzAllCorpses()
Message(clientMessageYellow, "All your corpses have been summoned to your feet and have received a 100% resurrection.");
}
void Client::SummonAllCorpses(float dest_x, float dest_y, float dest_z, float dest_heading)
void Client::SummonAllCorpses(const xyz_heading& position)
{
if(dest_x == 0 && dest_y == 0 && dest_z == 0 && dest_heading == 0)
{
dest_x = GetX(); dest_y = GetY(); dest_z = GetZ(); dest_heading = GetHeading();
}
auto summonLocation = position;
if(position.m_X == 0.0f && position.m_Y == 0.0f && position.m_Z == 0.0f && position.m_Heading == 0.0f)
summonLocation = GetPosition();
ServerPacket *Pack = new ServerPacket(ServerOP_DepopAllPlayersCorpses, sizeof(ServerDepopAllPlayersCorpses_Struct));
@@ -4964,12 +4962,7 @@ void Client::SummonAllCorpses(float dest_x, float dest_y, float dest_z, float de
entity_list.RemoveAllCorpsesByCharID(CharacterID());
int CorpseCount = database.SummonAllCharacterCorpses(CharacterID(), zone->GetZoneID(), zone->GetInstanceID(),
xyz_heading(dest_x, dest_y, dest_z, dest_heading));
if(CorpseCount <= 0)
{
return;
}
database.SummonAllCharacterCorpses(CharacterID(), zone->GetZoneID(), zone->GetInstanceID(), summonLocation);
}
void Client::DepopAllCorpses()