converted Warp to xyz_location instead of x,y,z

This commit is contained in:
Arthur Ice 2014-11-29 21:24:57 -08:00
parent 4b48ed7cbc
commit 82cc830297
5 changed files with 9 additions and 22 deletions

View File

@ -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());
}
}
}

View File

@ -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();
}

View File

@ -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) { }

View File

@ -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),

View File

@ -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);