diff --git a/zone/bot.cpp b/zone/bot.cpp index 05dead52a..b1b926520 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -16279,11 +16279,9 @@ bool Bot::HasOrMayGetAggro() { void Bot::SetHasBeenSummoned(bool wasSummoned) { _hasBeenSummoned = wasSummoned; - if(!wasSummoned) { - _preSummonX = 0; - _preSummonY = 0; - _preSummonZ = 0; - } + if(!wasSummoned) + m_PreSummonLocation = xyz_location::Origin(); + } void Bot::SetDefaultBotStance() { diff --git a/zone/bot.h b/zone/bot.h index 6e7b452af..ffb757c7b 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -448,9 +448,9 @@ public: uint32 GetAA(uint32 aa_id); void ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon); bool GetHasBeenSummoned() { return _hasBeenSummoned; } - float GetPreSummonX() { return _preSummonX; } - float GetPreSummonY() { return _preSummonY; } - float GetPreSummonZ() { return _preSummonZ; } + float GetPreSummonX() { return m_PreSummonLocation.m_X; } + float GetPreSummonY() { return m_PreSummonLocation.m_Y; } + float GetPreSummonZ() { return m_PreSummonLocation.m_Z; } bool GetGroupMessagesOn() { return _groupMessagesOn; } bool GetInHealRotation() { return _isInHealRotation; } bool GetHealRotationActive() { return (GetInHealRotation() && _isHealRotationActive); } @@ -535,9 +535,9 @@ public: void SetSpellRecastTimer(int timer_index, int32 recast_delay); void SetDisciplineRecastTimer(int timer_index, int32 recast_delay); void SetHasBeenSummoned(bool s); - void SetPreSummonX(float x) { _preSummonX = x; } - void SetPreSummonY(float y) { _preSummonY = y; } - void SetPreSummonZ(float z) { _preSummonZ = z; } + void SetPreSummonX(float x) { m_PreSummonLocation.m_X = x; } + void SetPreSummonY(float y) { m_PreSummonLocation.m_Y = y; } + void SetPreSummonZ(float z) { m_PreSummonLocation.m_Z = z; } void SetGroupMessagesOn(bool groupMessagesOn) { _groupMessagesOn = groupMessagesOn; } void SetInHealRotation( bool inRotation ) { _isInHealRotation = inRotation; } void SetHealRotationActive( bool isActive ) { _isHealRotationActive = isActive; } @@ -604,9 +604,7 @@ private: int32 end_regen; uint32 timers[MaxTimer]; bool _hasBeenSummoned; - float _preSummonX; - float _preSummonY; - float _preSummonZ; + xyz_location m_PreSummonLocation; uint8 _spellCastingChances[MaxStances][MaxSpellTypes]; bool _groupMessagesOn; bool _isInHealRotation;