From f9036ddc6ac0c369619c30bb152b166d34d4dc94 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Sun, 30 Nov 2014 15:05:50 -0800 Subject: [PATCH] GetGuardPointX(), GetGuardPointY(), GetGuardPointZ(), and GetGuardPointH() replaced with GetGuardPoint() --- zone/lua_npc.cpp | 6 +++--- zone/npc.h | 5 +---- zone/perl_npc.cpp | 6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index 869efb019..e247e34e3 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -334,17 +334,17 @@ float Lua_NPC::GetSpawnPointH() { float Lua_NPC::GetGuardPointX() { Lua_Safe_Call_Real(); - return self->GetGuardPointX(); + return self->GetGuardPoint().m_X; } float Lua_NPC::GetGuardPointY() { Lua_Safe_Call_Real(); - return self->GetGuardPointY(); + return self->GetGuardPoint().m_Y; } float Lua_NPC::GetGuardPointZ() { Lua_Safe_Call_Real(); - return self->GetGuardPointZ(); + return self->GetGuardPoint().m_Z; } void Lua_NPC::SetPrimSkill(int skill_id) { diff --git a/zone/npc.h b/zone/npc.h index 9b0b68b28..4bb15de9a 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -215,10 +215,7 @@ public: float GetSpawnPointY() const { return m_SpawnPoint.m_Y; } float GetSpawnPointZ() const { return m_SpawnPoint.m_Z; } float GetSpawnPointH() const { return m_SpawnPoint.m_Heading; } - float GetGuardPointX() const { return m_GuardPoint.m_X; } - float GetGuardPointY() const { return m_GuardPoint.m_Y; } - float GetGuardPointZ() const { return m_GuardPoint.m_Z; } - float GetGuardPointH() const { return m_GuardPoint.m_Heading; } + xyz_heading const GetGuardPoint() const { return m_GuardPoint; } EmuAppearance GetGuardPointAnim() const { return guard_anim; } void SaveGuardPointAnim(EmuAppearance anim) { guard_anim = anim; } diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index c1f8d8828..2696eae7d 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -1653,7 +1653,7 @@ XS(XS_NPC_GetGuardPointX) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - RETVAL = THIS->GetGuardPointX(); + RETVAL = THIS->GetGuardPoint().m_X; XSprePUSH; PUSHn((double)RETVAL); } XSRETURN(1); @@ -1680,7 +1680,7 @@ XS(XS_NPC_GetGuardPointY) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - RETVAL = THIS->GetGuardPointY(); + RETVAL = THIS->GetGuardPoint().m_Y; XSprePUSH; PUSHn((double)RETVAL); } XSRETURN(1); @@ -1707,7 +1707,7 @@ XS(XS_NPC_GetGuardPointZ) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - RETVAL = THIS->GetGuardPointZ(); + RETVAL = THIS->GetGuardPoint().m_Z; XSprePUSH; PUSHn((double)RETVAL); } XSRETURN(1);