Scripted/Misc: Remove some whitespace

This commit is contained in:
Vincent-Michael
2013-08-18 02:06:49 +02:00
parent 2b19ba1879
commit 7dbf68cbfc
2 changed files with 90 additions and 94 deletions

View File

@@ -18,7 +18,7 @@
/*
Name: Boss_Anzu
%Complete: 80%
Comment:
Comment:
Category: Auchindoun, Sethekk Halls
*/
@@ -57,113 +57,109 @@ Position const PosSummonBrood[7] =
{ -69.25543f, 303.0768f, 97.84479f, 5.532694f },
{ -87.59662f, 263.5181f, 92.70478f, 1.658063f },
{ -73.54323f, 276.6267f, 94.25807f, 2.802979f },
{ -81.70527f, 280.8776f, 44.58830f, 0.526849f },
{ -81.70527f, 280.8776f, 44.58830f, 0.526849f }
};
class boss_anzu : public CreatureScript
{
public:
boss_anzu() : CreatureScript("boss_anzu") { }
public:
boss_anzu() : CreatureScript("boss_anzu") { }
struct boss_anzuAI : public BossAI
{
boss_anzuAI(Creature* creature) : BossAI(creature, DATA_ANZU) { }
void Reset() OVERRIDE
struct boss_anzuAI : public BossAI
{
summon66 = false;
summon33 = false;
}
boss_anzuAI(Creature* creature) : BossAI(creature, DATA_ANZU) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 14000);
events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 5000);
}
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_ANZU, DONE);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE {}
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
void Reset() OVERRIDE
{
switch (eventId)
{
case EVENT_PARALYZING_SCREECH:
DoCastVictim(SPELL_PARALYZING_SCREECH);
events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 26000);
break;
_under33Percent = false;
_under66Percent = false;
}
case EVENT_CYCLONE_OF_FEATHERS:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_CYCLONE_OF_FEATHERS);
events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 21000);
break;
case EVENT_SUMMON:
// TODO: Add pathing for Brood of Anzu
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[0], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[1], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[2], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[5], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[6], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
DoCast(me, SPELL_BANISH_SELF);
events.ScheduleEvent(EVENT_SPELL_BOMB, 12000);
break;
case EVENT_SPELL_BOMB:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
if (target->getPowerType() == POWER_MANA)
{
DoCast(target, SPELL_SPELL_BOMB);
Talk(SAY_SPELL_BOMB, target->GetGUID());
}
}
break;
default:
break;
void EnterCombat(Unit* /*who*/) OVERRIDE
{
events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 14000);
events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 5000);
}
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_ANZU, DONE);
}
void DamageTaken(Unit* /*killer*/, uint32 &damage) OVERRIDE
{
if (me->HealthBelowPctDamaged(33, damage) && !_under33Percent)
{
_under33Percent = true;
Talk(SAY_SUMMON_BROOD);
events.ScheduleEvent(EVENT_SUMMON, 3000);
}
if (me->HealthBelowPctDamaged(66, damage) && !_under66Percent)
{
_under66Percent = true;
Talk(SAY_SUMMON_BROOD);
events.ScheduleEvent(EVENT_SUMMON, 3000);
}
}
if (HealthBelowPct(66) && !summon66)
void UpdateAI(uint32 diff) OVERRIDE
{
summon66 = true;
Talk(SAY_SUMMON_BROOD);
events.ScheduleEvent(EVENT_SUMMON, 3000);
if (!UpdateVictim())
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_PARALYZING_SCREECH:
DoCastVictim(SPELL_PARALYZING_SCREECH);
events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 26000);
break;
case EVENT_CYCLONE_OF_FEATHERS:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_CYCLONE_OF_FEATHERS);
events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 21000);
break;
case EVENT_SUMMON:
// TODO: Add pathing for Brood of Anzu
for (uint8 i = 0; i < 7; i++)
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[i], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
DoCast(me, SPELL_BANISH_SELF);
events.ScheduleEvent(EVENT_SPELL_BOMB, 12000);
break;
case EVENT_SPELL_BOMB:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
if (target->getPowerType() == POWER_MANA)
{
DoCast(target, SPELL_SPELL_BOMB);
Talk(SAY_SPELL_BOMB, target->GetGUID());
}
}
break;
default:
break;
}
}
DoMeleeAttackIfReady();
}
if (HealthBelowPct(33) && !summon33)
{
summon33 = true;
Talk(SAY_SUMMON_BROOD);
events.ScheduleEvent(EVENT_SUMMON, 3000);
}
private:
bool _under33Percent;
bool _under66Percent;
DoMeleeAttackIfReady();
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_anzuAI(creature);
}
private:
bool summon66;
bool summon33;
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_anzuAI(creature);
}
};
void AddSC_boss_anzu()

View File

@@ -119,8 +119,8 @@ class spell_hun_ascpect_of_the_viper : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_ASPECT_OF_THE_VIPER_ENERGIZE) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_GLYPH_OF_ASPECT_OF_THE_VIPER) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_VIPER_ATTACK_SPEED) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_GLYPH_OF_ASPECT_OF_THE_VIPER) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_VIPER_ATTACK_SPEED) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_VICIOUS_VIPER))
return false;
return true;
@@ -871,7 +871,7 @@ class spell_hun_viper_attack_speed : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_ASPECT_OF_THE_VIPER) ||
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_ASPECT_OF_THE_VIPER) ||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_VICIOUS_VIPER))
return false;
return true;