aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-22 17:58:46 -0500
committermegamage <none@none>2009-04-22 17:58:46 -0500
commit3b49bfb1ff8fc7a275714fffc2494f767f287574 (patch)
tree9916063007efa26f95b4cffbfb7e7f4a92ec6c80
parent3a316370b1bc71c68fda3b6d27a8373033e16d83 (diff)
[7697] Interrupt casting at enter to evade mode. Author: VladimirMangos
--HG-- branch : trunk
-rw-r--r--src/game/AggressorAI.cpp4
-rw-r--r--src/game/CreatureEventAI.cpp2
-rw-r--r--src/game/GuardAI.cpp4
-rw-r--r--src/game/ReactorAI.cpp4
-rw-r--r--src/game/TotemAI.cpp2
-rw-r--r--src/game/Unit.cpp10
-rw-r--r--src/game/Unit.h4
7 files changed, 15 insertions, 15 deletions
diff --git a/src/game/AggressorAI.cpp b/src/game/AggressorAI.cpp
index 37a876bb059..a637e7e40f0 100644
--- a/src/game/AggressorAI.cpp
+++ b/src/game/AggressorAI.cpp
@@ -47,7 +47,7 @@ void AggressorAI::EnterEvadeMode()
{
DEBUG_LOG("Creature stopped attacking cuz his dead [guid=%u]", m_creature->GetGUIDLow());
i_victimGuid = 0;
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
m_creature->DeleteThreatList();
return;
}
@@ -90,7 +90,7 @@ void AggressorAI::EnterEvadeMode()
m_creature->DeleteThreatList();
i_victimGuid = 0;
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
m_creature->SetLootRecipient(NULL);
}
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 729cee20fb9..9727bb650b1 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -1081,7 +1081,7 @@ void CreatureEventAI::EnterEvadeMode()
m_creature->InterruptNonMeleeSpells(true);
m_creature->RemoveAllAuras();
m_creature->DeleteThreatList();
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
if (m_creature->isAlive())
m_creature->GetMotionMaster()->MoveTargetedHome();
diff --git a/src/game/GuardAI.cpp b/src/game/GuardAI.cpp
index 710acede150..b716642ebd7 100644
--- a/src/game/GuardAI.cpp
+++ b/src/game/GuardAI.cpp
@@ -67,7 +67,7 @@ void GuardAI::EnterEvadeMode()
i_state = STATE_NORMAL;
i_victimGuid = 0;
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
m_creature->DeleteThreatList();
return;
}
@@ -98,7 +98,7 @@ void GuardAI::EnterEvadeMode()
m_creature->RemoveAllAuras();
m_creature->DeleteThreatList();
i_victimGuid = 0;
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
i_state = STATE_NORMAL;
// Remove TargetedMovementGenerator from MotionMaster stack list, and add HomeMovementGenerator instead
diff --git a/src/game/ReactorAI.cpp b/src/game/ReactorAI.cpp
index 30847405c9e..362a8c9fe56 100644
--- a/src/game/ReactorAI.cpp
+++ b/src/game/ReactorAI.cpp
@@ -75,7 +75,7 @@ ReactorAI::EnterEvadeMode()
m_creature->GetMotionMaster()->MovementExpired();
m_creature->GetMotionMaster()->MoveIdle();
i_victimGuid = 0;
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
m_creature->DeleteThreatList();
return;
}
@@ -102,7 +102,7 @@ ReactorAI::EnterEvadeMode()
m_creature->RemoveAllAuras();
m_creature->DeleteThreatList();
i_victimGuid = 0;
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
m_creature->SetLootRecipient(NULL);
if(!m_creature->GetCharmerOrOwner())
diff --git a/src/game/TotemAI.cpp b/src/game/TotemAI.cpp
index 4efced3bc3a..08c70308d1c 100644
--- a/src/game/TotemAI.cpp
+++ b/src/game/TotemAI.cpp
@@ -50,7 +50,7 @@ TotemAI::MoveInLineOfSight(Unit *)
void TotemAI::EnterEvadeMode()
{
- m_creature->CombatStop();
+ m_creature->CombatStop(true);
}
void
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index eb8a6e919e7..887ef6993df 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7845,9 +7845,9 @@ bool Unit::AttackStop()
return true;
}
-void Unit::CombatStop(bool cast)
+void Unit::CombatStop(bool includingCast)
{
- if(cast && IsNonMeleeSpellCasted(false))
+ if (includingCast && IsNonMeleeSpellCasted(false))
InterruptNonMeleeSpells(false);
AttackStop();
@@ -7857,12 +7857,12 @@ void Unit::CombatStop(bool cast)
ClearInCombat();
}
-void Unit::CombatStopWithPets(bool cast)
+void Unit::CombatStopWithPets(bool includingCast)
{
- CombatStop(cast);
+ CombatStop(includingCast);
for(ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
- (*itr)->CombatStop(cast);
+ (*itr)->CombatStop(includingCast);
}
bool Unit::isAttackingPlayer() const
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 26b2acb0220..e89b6732a14 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -967,8 +967,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
AttackerSet const& getAttackers() const { return m_attackers; }
bool isAttackingPlayer() const;
Unit* getVictim() const { return m_attacking; }
- void CombatStop(bool cast = false);
- void CombatStopWithPets(bool cast = false);
+ void CombatStop(bool includingCast = false);
+ void CombatStopWithPets(bool includingCast = false);
Unit* SelectNearbyTarget(float dist = NOMINAL_MELEE_RANGE) const;
bool hasNegativeAuraWithInterruptFlag(uint32 flag);