Core/Scripts: Include cleanup
This commit is contained in:
@@ -17,14 +17,15 @@
|
||||
*/
|
||||
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Spell.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "Spell.h"
|
||||
|
||||
// Spell summary for ScriptedAI::SelectSpell
|
||||
struct TSpellSummary
|
||||
@@ -33,6 +34,16 @@ struct TSpellSummary
|
||||
uint8 Effects; // set of enum SelectEffect
|
||||
} extern* SpellSummary;
|
||||
|
||||
void SummonList::Summon(Creature const* summon)
|
||||
{
|
||||
storage_.push_back(summon->GetGUID());
|
||||
}
|
||||
|
||||
void SummonList::Despawn(Creature const* summon)
|
||||
{
|
||||
storage_.remove(summon->GetGUID());
|
||||
}
|
||||
|
||||
void SummonList::DoZoneInCombat(uint32 entry, float maxRangeToNearestTarget)
|
||||
{
|
||||
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
|
||||
@@ -190,6 +201,16 @@ Creature* ScriptedAI::DoSpawnCreature(uint32 entry, float offsetX, float offsetY
|
||||
return me->SummonCreature(entry, me->GetPositionX() + offsetX, me->GetPositionY() + offsetY, me->GetPositionZ() + offsetZ, angle, TempSummonType(type), despawntime);
|
||||
}
|
||||
|
||||
bool ScriptedAI::HealthBelowPct(uint32 pct) const
|
||||
{
|
||||
return me->HealthBelowPct(pct);
|
||||
}
|
||||
|
||||
bool ScriptedAI::HealthAbovePct(uint32 pct) const
|
||||
{
|
||||
return me->HealthAbovePct(pct);
|
||||
}
|
||||
|
||||
SpellInfo const* ScriptedAI::SelectSpell(Unit* target, uint32 school, uint32 mechanic, SelectTargetType targets, float rangeMin, float rangeMax, SelectEffect effect)
|
||||
{
|
||||
//No target so we can't cast
|
||||
@@ -482,6 +503,11 @@ void BossAI::_JustDied()
|
||||
instance->SetBossState(_bossId, DONE);
|
||||
}
|
||||
|
||||
void BossAI::_JustReachedHome()
|
||||
{
|
||||
me->setActive(false);
|
||||
}
|
||||
|
||||
void BossAI::_EnterCombat()
|
||||
{
|
||||
if (instance)
|
||||
@@ -545,6 +571,11 @@ void BossAI::UpdateAI(uint32 diff)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool BossAI::CanAIAttack(Unit const* target) const
|
||||
{
|
||||
return CheckBoundary(target);
|
||||
}
|
||||
|
||||
void BossAI::_DespawnAtEvade(uint32 delayToRespawn, Creature* who)
|
||||
{
|
||||
if (delayToRespawn < 2)
|
||||
|
||||
Reference in New Issue
Block a user