Merge pull request #13140 from Unholychick/preventfleeing
Core/Mechanics: Fix prevent fleeing + fear
This commit is contained in:
commit
1854eafcb6
2 files changed
+6
-5
No files matched your search
@@ -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(),
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/***************************/
|
||||
|
||||
Reference in new issue
Block a user