diff options
author | StormBytePP <stormbyte@gmail.com> | 2015-08-29 02:35:17 +0200 |
---|---|---|
committer | StormBytePP <stormbyte@gmail.com> | 2015-08-29 02:35:58 +0200 |
commit | 4ada913d02bb5376914e46843873b3285116154f (patch) | |
tree | 87c19f9943660936f35883d245583851f157873c /src | |
parent | e27588fdbaf79e949829d8480813360e5f4edb35 (diff) |
Core/Unit: Prevent AoE damage to have effect in some cases when faction is unfriendly but they don't attack you and you don't have at war enabled (Example, Sporaggar faction)
Fixes #15374
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index fdfa62ea78e..d02a22d43f4 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11947,9 +11947,9 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo || target->GetReactionTo(this) > REP_NEUTRAL) return false; - // Not all neutral creatures can be attacked + // Not all neutral creatures can be attacked (even some unfriendly faction does not react aggresive to you, like Sporaggar) if (GetReactionTo(target) == REP_NEUTRAL && - target->GetReactionTo(this) == REP_NEUTRAL) + target->GetReactionTo(this) <= REP_NEUTRAL) { if (!(target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER) && !(target->GetTypeId() == TYPEID_UNIT && GetTypeId() == TYPEID_UNIT)) |