diff --git a/zone/bot.cpp b/zone/bot.cpp index b1b926520..add609d9a 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -3371,7 +3371,7 @@ void Bot::AI_Process() { if(GetHasBeenSummoned()) { if(IsBotCaster() || IsBotArcher()) { if (AImovement_timer->Check()) { - if(!GetTarget() || (IsBotCaster() && !IsBotCasterCombatRange(GetTarget())) || (IsBotArcher() && IsArcheryRange(GetTarget())) || (DistNoRootNoZ(GetPreSummonX(), GetPreSummonY()) < 10)) { + if(!GetTarget() || (IsBotCaster() && !IsBotCasterCombatRange(GetTarget())) || (IsBotArcher() && IsArcheryRange(GetTarget())) || (DistNoRootNoZ(m_PreSummonLocation.m_X, m_PreSummonLocation.m_Y) < 10)) { if(GetTarget()) FaceTarget(GetTarget()); SetHasBeenSummoned(false); @@ -3380,8 +3380,8 @@ void Bot::AI_Process() { if(GetTarget() && GetTarget()->GetHateTop() && GetTarget()->GetHateTop() != this) { mlog(AI__WAYPOINTS, "Returning to location prior to being summoned."); - CalculateNewPosition2(GetPreSummonX(), GetPreSummonY(), GetPreSummonZ(), GetRunspeed()); - SetHeading(CalculateHeadingToTarget(GetPreSummonX(), GetPreSummonY())); + CalculateNewPosition2(m_PreSummonLocation.m_X, m_PreSummonLocation.m_Y, m_PreSummonLocation.m_Z, GetRunspeed()); + SetHeading(CalculateHeadingToTarget(m_PreSummonLocation.m_X, m_PreSummonLocation.m_Y)); return; } } diff --git a/zone/bot.h b/zone/bot.h index ffb757c7b..a370f9ece 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -448,9 +448,7 @@ public: uint32 GetAA(uint32 aa_id); void ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon); bool GetHasBeenSummoned() { return _hasBeenSummoned; } - float GetPreSummonX() { return m_PreSummonLocation.m_X; } - float GetPreSummonY() { return m_PreSummonLocation.m_Y; } - float GetPreSummonZ() { return m_PreSummonLocation.m_Z; } + const xyz_location GetPreSummonLocation() const { return m_PreSummonLocation; } bool GetGroupMessagesOn() { return _groupMessagesOn; } bool GetInHealRotation() { return _isInHealRotation; } bool GetHealRotationActive() { return (GetInHealRotation() && _isHealRotationActive); }