mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Added Mob::HasTargetReflection()
This commit is contained in:
parent
dc308e2ecb
commit
da9792160d
@ -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;
|
||||
}
|
||||
|
||||
@ -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<int>(cur_hp * 100 / max_hp); }
|
||||
inline int32 GetAC() const { return AC; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user