70 for (
uint8 i = 0; i < size; ++i)
100 for (std::list<uint64>::const_iterator itr =
Crystals.begin(); itr !=
Crystals.end(); ++itr)
105 if (!creature->IsAlive())
138 Unit* pCrystal = NULL;
139 Unit* CrystalChosen = NULL;
141 for (std::list<uint64>::const_iterator itr =
Crystals.begin(); itr !=
Crystals.end(); ++itr)
146 if (pCrystal && pCrystal->
IsAlive())
149 if (!CrystalChosen ||
me->GetDistanceOrder(pCrystal, CrystalChosen,
false))
152 CrystalChosen = pCrystal;
167 me->GetMotionMaster()->MovePoint(1, x, y, z);
178 for (std::list<uint64>::const_iterator itr =
Crystals.begin(); itr !=
Crystals.end(); ++itr)
182 if (pCrystal && pCrystal->
IsAlive())
183 pCrystal->
Kill(pCrystal);
204 if (CrystalChosen && CrystalChosen->
IsAlive())
215 SF_LOG_ERROR(
"scripts",
"Selin Fireheart unable to drain crystal as the crystal is either dead or despawned");
240 if (maxPowerMana && ((
me->GetPower(
POWER_MANA)*100 / maxPowerMana) < 10))
261 if (!
me->IsNonMeleeSpellCasted(
false))
270 if (maxPowerMana && ((
me->GetPower(
POWER_MANA)*100 / maxPowerMana) < 10))
293 if (CrystalChosen && CrystalChosen->
IsAlive())
295 CrystalChosen->
Kill(CrystalChosen);
299 me->GetMotionMaster()->Clear();
300 me->GetMotionMaster()->MoveChase(
me->GetVictim());
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_NOT_SELECTABLE
void AddSC_boss_selin_fireheart()
@ SPELL_FEL_CRYSTAL_DUMMY
@ SPELL_FEL_CRYSTAL_VISUAL
@ SPELL_FEL_CRYSTAL_COSMETIC
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
CreatureScript(const char *name)
void MoveChase(Unit *target, float dist=0.0f, float angle=0.0f)
void RemoveFlag(uint16 index, uint32 oldFlag)
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
virtual void AttackStart(Unit *)
void Kill(Unit *victim, bool durabilityLoss=true)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
MotionMaster * GetMotionMaster()
static Creature * GetCreature(WorldObject &object, uint64 guid)
static Unit * GetUnit(WorldObject &object, uint64 guid)
InstanceScript * GetInstanceScript()
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float angle=0) const
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
#define ERROR_INST_DATA(a)
ScriptedAI(Creature *creature)
void KilledUnit(Unit *) OVERRIDE
void JustDied(Unit *) OVERRIDE
std::list< uint64 > Crystals
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
InstanceScript * instance
void EnterCombat(Unit *) OVERRIDE
void MovementInform(uint32 type, uint32 id) OVERRIDE
void ShatterRemainingCrystals()
void SelectNearestCrystal()
boss_selin_fireheartAI(Creature *creature)
void JustDied(Unit *) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
void MoveInLineOfSight(Unit *) OVERRIDE
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void AttackStart(Unit *) OVERRIDE
npc_fel_crystalAI(Creature *creature)