aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Combat/ThreatManager.cpp
diff options
context:
space:
mode:
authorFrca <killerfrca@gmail.com>2012-04-22 19:19:32 +0200
committerFrca <killerfrca@gmail.com>2012-04-22 19:19:32 +0200
commitc7a70803b41bc9ce162a6aa1aa8cd0926353f9e3 (patch)
tree584f0d6f8f33fd97ad52b7094dfeada744515230 /src/server/game/Combat/ThreatManager.cpp
parent284894b20b40af00951bdc25dd66dc759bc1d273 (diff)
parent57e937e171e632e37b4ee28da0cd4ed65ec733b7 (diff)
Merge branch 'master' of git://github.com/TrinityCore/TrinityCore
Diffstat (limited to 'src/server/game/Combat/ThreatManager.cpp')
-rwxr-xr-xsrc/server/game/Combat/ThreatManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index d82e43ba83b..e604eaf9024 100755
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -75,7 +75,7 @@ bool ThreatCalcHelper::isValidProcess(Unit* hatedUnit, Unit* hatingUnit, SpellIn
return false;
// not in same map or phase
- if (!hatedUnit->IsInMap(hatingUnit))
+ if (!hatedUnit->IsInMap(hatingUnit) || !hatedUnit->InSamePhase(hatingUnit))
return false;
// spell not causing threat
@@ -182,6 +182,7 @@ void HostileReference::updateOnlineStatus()
&& (getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->isGameMaster())
&& !getTarget()->HasUnitState(UNIT_STATE_IN_FLIGHT)
&& getTarget()->IsInMap(getSourceUnit())
+ && getTarget()->InSamePhase(getSourceUnit())
)
{
Creature* creature = getSourceUnit()->ToCreature();