aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Combat/CombatManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Combat/CombatManager.cpp')
-rw-r--r--src/server/game/Combat/CombatManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Combat/CombatManager.cpp b/src/server/game/Combat/CombatManager.cpp
index ba752dcc20b..edf47fdca87 100644
--- a/src/server/game/Combat/CombatManager.cpp
+++ b/src/server/game/Combat/CombatManager.cpp
@@ -43,6 +43,12 @@
return false;
if (a->HasUnitState(UNIT_STATE_IN_FLIGHT) || b->HasUnitState(UNIT_STATE_IN_FLIGHT))
return false;
+ if (Creature const* aCreature = a->ToCreature())
+ if (aCreature->IsCombatDisallowed())
+ return false;
+ if (Creature const* bCreature = b->ToCreature())
+ if (bCreature->IsCombatDisallowed())
+ return false;
if (a->IsFriendlyTo(b) || b->IsFriendlyTo(a))
return false;
Player const* playerA = a->GetCharmerOrOwnerPlayerOrPlayerItself();