mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Fix build.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user