All pastes #961873 Raw Edit

Miscellany

public text v1 · immutable
#961873 ·published 2008-03-29 08:11 UTC
rendered paste body
Index: Unit.cpp
===================================================================
--- Unit.cpp    (revision 5378)
+++ Unit.cpp    (working copy)
@@ -7868,10 +7868,23 @@
         ((Creature*)this)->AI()->AttackStart(target);
         return true;
     }
-
-    // no target but something prevent go to evade mode
+    // no target but something prevent go to evade mode
+    // Check for Hunter Freezing Traps & Rouge Blind Spell
+    // These auras need removing if creature has no valid target.
+    if( ((Creature*)this)->hasUnitState(UNIT_STAT_STUNDED) || ((Creature*)this)->hasUnitState(UNIT_STAT_CONFUSED))
+    {
+     if( ((Creature*)this)->HasAura(3355, 0 ) || ((Creature*)this)->HasAura(14308, 0 ) || ((Creature*)this)->HasAura(14309, 0 ) || ((Creature*)this)->HasAura(2094, 0 ) )
+        {
+        ((Creature*)this)->RemoveAurasDueToSpell(2094);// Blind
+        ((Creature*)this)->RemoveAurasDueToSpell(3355);// Freezing Trap Effect 1
+        ((Creature*)this)->RemoveAurasDueToSpell(14308);// Freezing Trap Effect 2
+        ((Creature*)this)->RemoveAurasDueToSpell(14309);// Freezing Trap Effect 3
+        }
+    }
+ 
     if( !isInCombat() || HasAuraType(SPELL_AURA_MOD_TAUNT) || !CanFreeMove() )
         return false;
+    

     // last case when creature don't must go to evade mode:
     // it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list