From f6c98132f08a08a5cdd71682e6dbcf0c6cfbe1c3 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Tue, 2 Dec 2014 14:50:48 -0800 Subject: [PATCH] SummonAllCorpses converted to xyz_heading --- zone/client.cpp | 17 +++++------------ zone/client.h | 2 +- zone/questmgr.cpp | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index 02c35feaa..4bde10bc0 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -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() diff --git a/zone/client.h b/zone/client.h index caec8513d..b39777046 100644 --- a/zone/client.h +++ b/zone/client.h @@ -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(); diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 3ced16e87..d49528163 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -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; }