diff --git a/zone/bot.cpp b/zone/bot.cpp index 2a8921dd7..f2bde8980 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -10715,12 +10715,12 @@ void Bot::BotGroupSummon(Group* group, Client* client) { if(botMember->GetBotOwnerCharacterID() == client->CharacterID()) { botMember->SetTarget(botMember->GetBotOwner()); botMember->WipeHateList(); - botMember->Warp(botMember->GetBotOwner()->GetX(), botMember->GetBotOwner()->GetY(), botMember->GetBotOwner()->GetZ()); + botMember->Warp(botMember->GetBotOwner()->GetPosition()); if(botMember->HasPet() && botMember->GetPet()) { botMember->GetPet()->SetTarget(botMember); botMember->GetPet()->WipeHateList(); - botMember->GetPet()->Warp(botMember->GetBotOwner()->GetX(), botMember->GetBotOwner()->GetY(), botMember->GetBotOwner()->GetZ()); + botMember->GetPet()->Warp(botMember->GetBotOwner()->GetPosition()); } } } @@ -11729,7 +11729,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { else { b->SetTarget(c->CastToMob()); - b->Warp(c->GetX(), c->GetY(), c->GetZ()); + b->Warp(c->GetPosition()); } } } diff --git a/zone/mob.cpp b/zone/mob.cpp index d2cd3d6df..48aee2260 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2590,20 +2590,16 @@ void Mob::SetNextIncHPEvent( int inchpevent ) nextinchpevent = inchpevent; } //warp for quest function,from sandy -void Mob::Warp( float x, float y, float z ) +void Mob::Warp(const xyz_location& location) { - if(IsNPC()) { - entity_list.ProcessMove(CastToNPC(), x, y, z); - } + if(IsNPC()) + entity_list.ProcessMove(CastToNPC(), location.m_X, location.m_Y, location.m_Z); - m_Position.m_X = x; - m_Position.m_Y = y; - m_Position.m_Z = z; + m_Position = location; Mob* target = GetTarget(); - if (target) { + if (target) FaceTarget( target ); - } SendPosition(); } diff --git a/zone/mob.h b/zone/mob.h index 8d42642c3..cf904a97d 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -420,7 +420,7 @@ public: virtual inline int32 GetPrimaryFaction() const { return 0; } //Movement - void Warp( float x, float y, float z ); + void Warp(const xyz_location& location); inline bool IsMoving() const { return moving; } virtual void SetMoving(bool move) { moving = move; m_Delta = xyz_heading::Origin(); } virtual void GoToBind(uint8 bindnum = 0) { } diff --git a/zone/position.cpp b/zone/position.cpp index d7e0d48f4..2d7d48cf8 100644 --- a/zone/position.cpp +++ b/zone/position.cpp @@ -40,14 +40,6 @@ xyz_heading::xyz_heading(const xy_location& locationDir, float z, float heading) m_Heading(heading) { } - -xyz_heading::xyz_heading(const xyz_location locationDir, float heading) : - m_X(locationDir.m_X), - m_Y(locationDir.m_Y), - m_Z(locationDir.m_Z), - m_Heading(heading) { -} - xyz_heading::xyz_heading(const xy_location locationDir, float z, float heading) : m_X(locationDir.m_X), m_Y(locationDir.m_Y), diff --git a/zone/position.h b/zone/position.h index eadd187ce..591c14b10 100644 --- a/zone/position.h +++ b/zone/position.h @@ -63,7 +63,6 @@ public: xyz_heading(float x = 0.0f, float y = 0.0f, float z = 0.0f, float heading = 0.0f); xyz_heading(const xyz_heading& locationDir); xyz_heading(const xyz_location& locationDir, float heading = 0.0f); - xyz_heading(const xyz_location locationDir, float heading = 0.0f); explicit xyz_heading(const xy_location& locationDir, float z, float heading); explicit xyz_heading(const xy_location locationDir, float z, float heading);