Scripts/Ulduar: Fixed Sentinel Blast affecting whole instance and small typo in a script

This commit is contained in:
Vincent-Michael
2011-06-23 21:24:20 +02:00
committed by Lopin
parent 327c5d65bd
commit 36d6ca4711
2 changed files with 40 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (64679,64392);
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`)
VALUES
(64679,'spell_auriaya_sentinel_blast'),
(64392,'spell_auriaya_sentinel_blast');

View File

@@ -113,7 +113,7 @@ class boss_auriaya : public CreatureScript
{
_Reset();
DefenderGUID = 0;
defenderLifes = 8;
defenderLives = 8;
crazyCatLady = true;
nineLives = false;
}
@@ -165,8 +165,8 @@ class boss_auriaya : public CreatureScript
SetData(DATA_CRAZY_CAT_LADY, 0);
break;
case ACTION_RESPAWN_DEFENDER:
--defenderLifes;
if (!defenderLifes)
--defenderLives;
if (!defenderLives)
{
SetData(DATA_NINE_LIVES, 1);
break;
@@ -247,8 +247,8 @@ class boss_auriaya : public CreatureScript
if (Creature* Defender = ObjectAccessor::GetCreature(*me, DefenderGUID))
{
Defender->Respawn();
if (defenderLifes)
Defender->SetAuraStack(SPELL_FERAL_ESSENCE, Defender, defenderLifes);
if (defenderLives)
Defender->SetAuraStack(SPELL_FERAL_ESSENCE, Defender, defenderLives);
Defender->SetInCombatWithZone();
if (!Defender->isInCombat())
Defender->AI()->AttackStart(me->getVictim());
@@ -273,7 +273,7 @@ class boss_auriaya : public CreatureScript
private:
uint64 DefenderGUID;
uint8 defenderLifes;
uint8 defenderLives;
bool crazyCatLady;
bool nineLives;
};
@@ -507,6 +507,34 @@ class spell_auriaya_strenght_of_the_pack : public SpellScriptLoader
}
};
class spell_auriaya_sentinel_blast : public SpellScriptLoader
{
public:
spell_auriaya_sentinel_blast() : SpellScriptLoader("spell_auriaya_sentinel_blast") { }
class spell_auriaya_sentinel_blast_SpellScript : public SpellScript
{
PrepareSpellScript(spell_auriaya_sentinel_blast_SpellScript);
void FilterTargets(std::list<Unit*>& unitList)
{
unitList.remove_if(PlayerOrPetCheck());
}
void Register()
{
OnUnitTargetSelect += SpellUnitTargetFn(spell_auriaya_sentinel_blast_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ENEMY_SRC);
OnUnitTargetSelect += SpellUnitTargetFn(spell_auriaya_sentinel_blast_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_AREA_ENEMY_SRC);
}
};
SpellScript* GetSpellScript() const
{
return new spell_auriaya_sentinel_blast_SpellScript();
}
};
class achievement_nine_lives : public AchievementCriteriaScript
{
public:
@@ -548,6 +576,7 @@ void AddSC_boss_auriaya()
new npc_feral_defender();
new npc_sanctum_sentry();
new spell_auriaya_strenght_of_the_pack();
new spell_auriaya_sentinel_blast();
new achievement_nine_lives();
new achievement_crazy_cat_lady();
}