mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/AI: Removed crappy and unused AOEAI
This commit is contained in:
@@ -257,36 +257,6 @@ void TurretAI::UpdateAI(const uint32 /*diff*/)
|
||||
DoSpellAttackIfReady(me->m_spells[0]);
|
||||
}
|
||||
|
||||
//////////////
|
||||
//AOEAI
|
||||
//////////////
|
||||
|
||||
AOEAI::AOEAI(Creature *c) : CreatureAI(c)
|
||||
{
|
||||
if (!me->m_spells[0])
|
||||
sLog->outError("AOEAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
|
||||
|
||||
me->SetVisible(true);//visible to see all spell anims
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);//can't be targeted
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_1);//can't be damaged
|
||||
me->SetDisplayId(11686);//invisible model, around a size of a player
|
||||
}
|
||||
|
||||
bool AOEAI::CanAIAttack(const Unit * /*who*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void AOEAI::AttackStart(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void AOEAI::UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
if (!me->HasAura(me->m_spells[0]))
|
||||
me->CastSpell(me, me->m_spells[0], false);
|
||||
}
|
||||
|
||||
//////////////
|
||||
//VehicleAI
|
||||
//////////////
|
||||
|
||||
@@ -89,16 +89,6 @@ struct TurretAI : public CreatureAI
|
||||
float m_minRange;
|
||||
};
|
||||
|
||||
struct AOEAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit AOEAI(Creature *c);
|
||||
bool CanAIAttack(const Unit *who) const;
|
||||
void AttackStart(Unit *who);
|
||||
void UpdateAI(const uint32 diff);
|
||||
|
||||
static int Permissible(const Creature *);
|
||||
};
|
||||
#define VEHICLE_CONDITION_CHECK_TIME 1000
|
||||
#define VEHICLE_DISMISS_TIME 5000
|
||||
struct VehicleAI : public CreatureAI
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace AIRegistry
|
||||
(new CreatureAIFactory<ArcherAI>("ArcherAI"))->RegisterSelf();
|
||||
(new CreatureAIFactory<TurretAI>("TurretAI"))->RegisterSelf();
|
||||
(new CreatureAIFactory<CreatureEventAI>("EventAI"))->RegisterSelf();
|
||||
(new CreatureAIFactory<AOEAI>("AOEAI"))->RegisterSelf();
|
||||
(new CreatureAIFactory<VehicleAI>("VehicleAI"))->RegisterSelf();
|
||||
(new CreatureAIFactory<SmartAI>("SmartAI"))->RegisterSelf();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user