diff options
| author | Blaymoira <none@none> | 2008-12-13 21:22:02 +0100 |
|---|---|---|
| committer | Blaymoira <none@none> | 2008-12-13 21:22:02 +0100 |
| commit | 4c2f8b222299add4f4ddcebdb5476562b5b1ae0a (patch) | |
| tree | 8b8c0c84d1ac5bc626b41a7fe9ae35bec675df28 /src | |
| parent | ed7a4d9831b20e424deeb90d7c2c0dc053467841 (diff) | |
| parent | 4b64670f70aa7997f361aa2fe392f032fc683d84 (diff) | |
*Merged with 487
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index b5b54f063d7..bb72530490d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12824,6 +12824,7 @@ void Unit::SetFeared(bool apply) if(HasAuraType(SPELL_AURA_PREVENTS_FLEEING)) return; + SetUInt64Value(UNIT_FIELD_TARGET, 0); SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); CastStop(); //GetMotionMaster()->MovementExpired(false); @@ -12839,7 +12840,10 @@ void Unit::SetFeared(bool apply) if(isAlive()) { if( GetTypeId() != TYPEID_PLAYER && getVictim()) + { + SetUInt64Value(UNIT_FIELD_TARGET, getVictim()->GetGUID()); GetMotionMaster()->MoveChase(getVictim()); + } else GetMotionMaster()->Initialize(); } @@ -12853,6 +12857,7 @@ void Unit::SetConfused(bool apply) { if(apply) { + SetUInt64Value(UNIT_FIELD_TARGET, 0); SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); CastStop(); GetMotionMaster()->MoveConfused(); @@ -12863,7 +12868,10 @@ void Unit::SetConfused(bool apply) if(isAlive()) { if( GetTypeId() != TYPEID_PLAYER && getVictim()) + { + SetUInt64Value(UNIT_FIELD_TARGET, getVictim()->GetGUID()); GetMotionMaster()->MoveChase(getVictim()); + } else GetMotionMaster()->Initialize(); } |
