Replace GetPreSummonX(), GetPreSummonY(), GetPreSummonZ() with GetPreSummonLocation as xyz_location

This commit is contained in:
Arthur Ice 2014-11-30 19:23:35 -08:00
parent 381dc7574f
commit 98a8ddbb21
2 changed files with 4 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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); }