diff --git a/zone/mob.h b/zone/mob.h index eb6e6e99f..493288c51 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -807,10 +807,10 @@ public: void SetDontCureMeBefore(uint32 time) { pDontCureMeBefore = time; } // calculate interruption of spell via movement of mob - void SaveSpellLoc() {spell_x = m_Position.m_X; spell_y = m_Position.m_Y; spell_z = m_Position.m_Z; } - inline float GetSpellX() const {return spell_x;} - inline float GetSpellY() const {return spell_y;} - inline float GetSpellZ() const {return spell_z;} + void SaveSpellLoc() {m_SpellLocation = m_Position; } + inline float GetSpellX() const {return m_SpellLocation.m_X;} + inline float GetSpellY() const {return m_SpellLocation.m_Y;} + inline float GetSpellZ() const {return m_SpellLocation.m_Z;} inline bool IsGrouped() const { return isgrouped; } void SetGrouped(bool v); inline bool IsRaidGrouped() const { return israidgrouped; } @@ -1069,7 +1069,7 @@ protected: //spell casting vars Timer spellend_timer; uint16 casting_spell_id; - float spell_x, spell_y, spell_z; + xyz_location m_SpellLocation; int attacked_count; bool delaytimer; uint16 casting_spell_targetid; diff --git a/zone/spells.cpp b/zone/spells.cpp index f50d74bbf..52bb094fa 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -350,7 +350,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot, casting_spell_type = type; SaveSpellLoc(); - mlog(SPELLS__CASTING, "Casting %d Started at (%.3f,%.3f,%.3f)", spell_id, spell_x, spell_y, spell_z); + mlog(SPELLS__CASTING, "Casting %d Started at (%.3f,%.3f,%.3f)", spell_id, m_SpellLocation.m_X, m_SpellLocation.m_Y, m_SpellLocation.m_Z); // if this spell doesn't require a target, or if it's an optional target // and a target wasn't provided, then it's us; unless TGB is on and this