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

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()

View File

@ -1026,7 +1026,7 @@ void SetConsumption(int32 in_hunger, int32 in_thirst);
void DoItemEnterZone();
bool DoItemEnterZone(uint32 slot_x, uint32 slot_y); // behavior change: 'slot_y' is now [RANGE]_END and not [RANGE]_END + 1
void SummonAndRezzAllCorpses();
void SummonAllCorpses(float dest_x, float dest_y, float dest_z, float dest_heading);
void SummonAllCorpses(const xyz_heading& position);
void DepopAllCorpses();
void DepopPlayerCorpse(uint32 dbid);
void BuryPlayerCorpses();

View File

@ -1753,7 +1753,7 @@ bool QuestManager::summonallplayercorpses(uint32 char_id, const xyz_heading& pos
return false;
Client* c = entity_list.GetClientByCharID(char_id);
c->SummonAllCorpses(position.m_X, position.m_Y, position.m_Z, position.m_Heading);
c->SummonAllCorpses(position);
return true;
}