aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/scripts/include')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp26
-rw-r--r--src/bindings/scripts/include/sc_creature.h9
2 files changed, 3 insertions, 32 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index 4b91519172c..fde0f92f1c9 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -68,14 +68,6 @@ void ScriptedAI::AttackStart(Unit* who, bool melee)
if (m_creature->Attack(who, melee))
{
- m_creature->AddThreat(who, 0.0f);
-
- if (!InCombat)
- {
- InCombat = true;
- Aggro(who);
- }
-
if(melee)
DoStartMovement(who);
else
@@ -90,14 +82,6 @@ void ScriptedAI::AttackStart(Unit* who)
if (m_creature->Attack(who, true))
{
- m_creature->AddThreat(who, 0.0f);
-
- if (!InCombat)
- {
- InCombat = true;
- Aggro(who);
- }
-
DoStartMovement(who);
}
}
@@ -139,13 +123,11 @@ void ScriptedAI::EnterEvadeMode()
m_creature->GetMotionMaster()->MoveTargetedHome();
}
- InCombat = false;
Reset();
}
void ScriptedAI::JustRespawned()
{
- InCombat = false;
Reset();
}
@@ -792,14 +774,6 @@ void Scripted_NoMovementAI::AttackStart(Unit* who)
if (m_creature->Attack(who, true))
{
- m_creature->AddThreat(who, 0.0f);
-
- if (!InCombat)
- {
- InCombat = true;
- Aggro(who);
- }
-
DoStartNoMovement(who);
}
}
diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h
index 72598a40617..1be35b864c5 100644
--- a/src/bindings/scripts/include/sc_creature.h
+++ b/src/bindings/scripts/include/sc_creature.h
@@ -44,7 +44,7 @@ struct PointMovement
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
{
- ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), InCombat(false), IsFleeing(false) {}
+ ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false) {}
~ScriptedAI() {}
//*************
@@ -98,9 +98,6 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
//Pointer to creature we are manipulating
Creature* m_creature;
- //Bool for if we are in combat or not
- bool InCombat;
-
//For fleeing
bool IsFleeing;
@@ -112,7 +109,7 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
void Reset() {}
//Called at creature aggro either by MoveInLOS or Attack Start
- virtual void Aggro(Unit*) = 0;
+ void EnterCombat(Unit*);
//*************
//AI Helper Functions
@@ -208,7 +205,7 @@ struct TRINITY_DLL_DECL NullCreatureAI : public ScriptedAI
~NullCreatureAI() {}
void Reset() {}
- void Aggro(Unit*) {}
+ void EnterCombat(Unit*) {}
void MoveInLineOfSight(Unit *) {}
void AttackStart(Unit *) {}
void EnterEvadeMode() {}