From 6c8dfbdc4d7eca1a0d7d1bcc0e28a0009ce4f6ef Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 1 May 2015 20:40:46 -0400 Subject: [PATCH] Mobs that were blinded were being included in every use of IsFeared() which was bad. Blinded mobs can still cast spells when in melee range. The original fear code had no blind rolled into it, I added that. This was an overright. I changed the macro to use bonues and fleemode instead of looking at curfp. Testing looks good to me. --- zone/mob.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zone/mob.h b/zone/mob.h index ada2c56dd..1d41f4098 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -803,8 +803,7 @@ public: //old fear function //void SetFeared(Mob *caster, uint32 duration, bool flee = false); float GetFearSpeed(); - bool IsFeared() { return curfp; } // This returns true if the mob is feared or fleeing due to low HP - //old fear: inline void StartFleeing() { SetFeared(GetHateTop(), FLEE_RUN_DURATION, true); } + bool IsFeared() { return (spellbonuses.IsFeared || flee_mode); } // This returns true if the mob is feared or fleeing due to low HP inline void StartFleeing() { flee_mode = true; CalculateNewFearpoint(); } void ProcessFlee(); void CheckFlee();