diff options
| author | Duarte Duarte <dnpd.dd@gmail.com> | 2014-09-27 21:40:41 +0100 |
|---|---|---|
| committer | Duarte Duarte <dnpd.dd@gmail.com> | 2014-09-27 21:40:41 +0100 |
| commit | 1854eafcb609cf955d415ef8344ac54f0c4af703 (patch) | |
| tree | 2a0f0fda95bb2bcb85e2ba66e4d1ce93f61b6632 | |
| parent | 3282dea5c5ef3205cf3409c4f03480b7f2221d69 (diff) | |
| parent | a51c3ac5fe557a3ac8ecbde5f72a3eca9ed37ba7 (diff) | |
Merge pull request #13140 from Unholychick/preventfleeing
Core/Mechanics: Fix prevent fleeing + fear
| -rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 3 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 7e6a2a3df16..3278c64b1ad 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -481,9 +481,6 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time) if (!enemy) return; - if (_owner->HasAuraType(SPELL_AURA_PREVENTS_FLEEING)) - return; - if (_owner->GetTypeId() == TYPEID_PLAYER) { TC_LOG_DEBUG("misc", "Player (GUID: %u) flee from %s (GUID: %u)", _owner->GetGUIDLow(), diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index f88ec42280b..5dc8e632bc5 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2751,8 +2751,12 @@ void AuraEffect::HandlePreventFleeing(AuraApplication const* aurApp, uint8 mode, Unit* target = aurApp->GetTarget(); - if (target->HasAuraType(SPELL_AURA_MOD_FEAR)) - target->SetControlled(!(apply), UNIT_STATE_FLEEING); + // Since patch 3.0.2 this mechanic no longer affects fear effects. It will ONLY prevent humanoids from fleeing due to low health. + if (!apply || target->HasAuraType(SPELL_AURA_MOD_FEAR)) + return; + /// TODO: find a way to cancel fleeing for assistance. + /// Currently this will only stop creatures fleeing due to low health that could not find nearby allies to flee towards. + target->SetControlled(false, UNIT_STATE_FLEEING); } /***************************/ |
