mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
GetCWPX(), GetCWPY(), GetCWPZ(), GetCWPH() converted to GetCurrentWayPoint
This commit is contained in:
parent
f63c5ab6ba
commit
d9d89ba9b3
@ -7590,7 +7590,7 @@ void command_pf(Client *c, const Seperator *sep)
|
||||
{
|
||||
Mob *who = c->GetTarget();
|
||||
c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ());
|
||||
c->Message(0, "WP: (%.2f, %.2f, %.2f) (%d/%d)", who->GetCWPX(), who->GetCWPY(), who->GetCWPZ(), who->GetCWP(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1);
|
||||
c->Message(0, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1);
|
||||
c->Message(0, "TAR: (%.2f, %.2f, %.2f)", who->GetTarX(), who->GetTarY(), who->GetTarZ());
|
||||
c->Message(0, "TARV: (%.2f, %.2f, %.2f)", who->GetTarVX(), who->GetTarVY(), who->GetTarVZ());
|
||||
c->Message(0, "|TV|=%.2f index=%d", who->GetTarVector(), who->GetTarNDX());
|
||||
|
||||
@ -669,22 +669,22 @@ double Lua_Mob::GetHeading() {
|
||||
|
||||
double Lua_Mob::GetWaypointX() {
|
||||
Lua_Safe_Call_Real();
|
||||
return self->GetCWPX();
|
||||
return self->GetCurrentWayPoint().m_X;
|
||||
}
|
||||
|
||||
double Lua_Mob::GetWaypointY() {
|
||||
Lua_Safe_Call_Real();
|
||||
return self->GetCWPY();
|
||||
return self->GetCurrentWayPoint().m_Y;
|
||||
}
|
||||
|
||||
double Lua_Mob::GetWaypointZ() {
|
||||
Lua_Safe_Call_Real();
|
||||
return self->GetCWPZ();
|
||||
return self->GetCurrentWayPoint().m_Z;
|
||||
}
|
||||
|
||||
double Lua_Mob::GetWaypointH() {
|
||||
Lua_Safe_Call_Real();
|
||||
return self->GetCWPH();
|
||||
return self->GetCurrentWayPoint().m_Heading;
|
||||
}
|
||||
|
||||
double Lua_Mob::GetWaypointPause() {
|
||||
|
||||
@ -862,10 +862,7 @@ public:
|
||||
Shielders_Struct shielder[MAX_SHIELDERS];
|
||||
Trade* trade;
|
||||
|
||||
inline float GetCWPX() const { return(m_CurrentWayPoint.m_X); }
|
||||
inline float GetCWPY() const { return(m_CurrentWayPoint.m_Y); }
|
||||
inline float GetCWPZ() const { return(m_CurrentWayPoint.m_Z); }
|
||||
inline float GetCWPH() const { return(m_CurrentWayPoint.m_Heading); }
|
||||
inline xyz_heading GetCurrentWayPoint() const { return m_CurrentWayPoint; }
|
||||
inline float GetCWPP() const { return(static_cast<float>(cur_wp_pause)); }
|
||||
inline int GetCWP() const { return(cur_wp); }
|
||||
void SetCurrentWP(uint16 waypoint) { cur_wp = waypoint; }
|
||||
|
||||
@ -3525,7 +3525,7 @@ XS(XS_Mob_GetWaypointX)
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCWPX();
|
||||
RETVAL = THIS->GetCurrentWayPoint().m_X;
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
@ -3551,7 +3551,7 @@ XS(XS_Mob_GetWaypointY)
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCWPY();
|
||||
RETVAL = THIS->GetCurrentWayPoint().m_Y;
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
@ -3577,7 +3577,7 @@ XS(XS_Mob_GetWaypointZ)
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCWPZ();
|
||||
RETVAL = THIS->GetCurrentWayPoint().m_Z;
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
@ -3603,7 +3603,7 @@ XS(XS_Mob_GetWaypointH)
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCWPH();
|
||||
RETVAL = THIS->GetCurrentWayPoint().m_Heading;
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user