From cab1f986f18b5d902fdbcf98489703ac120b8e60 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Tue, 25 Nov 2014 23:44:02 -0800 Subject: [PATCH] targetring_x, targetring_y, targetring_z replaced with m_TargetRing as an xyz_location --- zone/client_packet.cpp | 8 ++------ zone/mob.cpp | 4 +--- zone/mob.h | 10 ++++------ 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 3c440a8ff..4c5017917 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3984,9 +3984,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app) CastSpell_Struct* castspell = (CastSpell_Struct*)app->pBuffer; - targetring_x = castspell->x_pos; - targetring_y = castspell->y_pos; - targetring_z = castspell->z_pos; + m_TargetRing = xyz_location(castspell->x_pos, castspell->y_pos, castspell->z_pos); #ifdef _EQDEBUG LogFile->write(EQEMuLog::Debug, "cs_unknown2: %u %i", (uint8)castspell->cs_unknown[0], castspell->cs_unknown[0]); @@ -4018,9 +4016,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app) return; } - targetring_x = castspell->x_pos; - targetring_y = castspell->y_pos; - targetring_z = castspell->z_pos; + m_TargetRing = xyz_location(castspell->x_pos, castspell->y_pos, castspell->z_pos); CastSpell(spell_to_cast, castspell->target_id, castspell->slot); } diff --git a/zone/mob.cpp b/zone/mob.cpp index 3087ccfb7..bc9d7885f 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -367,9 +367,7 @@ Mob::Mob(const char* in_name, nimbus_effect3 = 0; m_targetable = true; - targetring_x = 0.0f; - targetring_y = 0.0f; - targetring_z = 0.0f; + m_TargetRing = xyz_location::Origin(); flymode = FlyMode3; // Pathing diff --git a/zone/mob.h b/zone/mob.h index f1e79d1a1..a00eb56bb 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -290,9 +290,9 @@ public: inline virtual uint32 GetNimbusEffect2() const { return nimbus_effect2; } inline virtual uint32 GetNimbusEffect3() const { return nimbus_effect3; } void RemoveNimbusEffect(int effectid); - inline float GetTargetRingX() const { return targetring_x; } - inline float GetTargetRingY() const { return targetring_y; } - inline float GetTargetRingZ() const { return targetring_z; } + inline float GetTargetRingX() const { return m_TargetRing.m_X; } + inline float GetTargetRingY() const { return m_TargetRing.m_Y; } + inline float GetTargetRingZ() const { return m_TargetRing.m_Z; } inline bool HasEndurUpkeep() const { return endur_upkeep; } inline void SetEndurUpkeep(bool val) { endur_upkeep = val; } @@ -1241,9 +1241,7 @@ protected: float tar_vz; float test_vector; - float targetring_x; - float targetring_y; - float targetring_z; + xyz_location m_TargetRing; uint32 m_spellHitsLeft[38]; // Used to track which spells will have their numhits incremented when spell finishes casting, 38 Buffslots int flymode;