diff --git a/zone/bot.cpp b/zone/bot.cpp index 0ce204d06..174c4568e 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2273,7 +2273,7 @@ void Bot::AI_Process() { if(AI_movement_timer->Check()) { if (!IsMoving()) { if (GetClass() == ROGUE) { - if ((GetTarget()->GetTarget() == this) && !GetTarget()->IsFeared() && !GetTarget()->IsStunned()) { + if (HasTargetReflection() && !GetTarget()->IsFeared() && !GetTarget()->IsStunned()) { // Hate redux actions if (evade_timer.Check(false)) { // Attempt to evade @@ -2299,7 +2299,7 @@ void Bot::AI_Process() { float newZ = 0; FaceTarget(GetTarget()); if (PlotPositionAroundTarget(this, newX, newY, newZ)) { - Bot::BotGroupSay(this, "Backing off of %s", GetTarget()->GetCleanName()); + Emote("steps back from %s", GetTarget()->GetCleanName()); CalculateNewPosition2(newX, newY, newZ, GetRunspeed()); return; } diff --git a/zone/mob.h b/zone/mob.h index d6fd610cd..dfa0cb16f 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -420,6 +420,7 @@ public: strn0cpy(name, GetName(), 64); return; }; inline Mob* GetTarget() const { return target; } virtual void SetTarget(Mob* mob); + inline bool HasTargetReflection() const { return (target && target->target == this); } virtual inline float GetHPRatio() const { return max_hp == 0 ? 0 : ((float)cur_hp/max_hp*100); } virtual inline int GetIntHPRatio() const { return max_hp == 0 ? 0 : static_cast(cur_hp * 100 / max_hp); } inline int32 GetAC() const { return AC; }