Scripts/Ruby Sanctum:
- Fixed Enervating Brand debuff on nearby players. - Fixed cloning in 25 heroic mode - Corrected typo in timers - Intro should no longer be triggered if the boss or xerestrasza resets. - Xerestrasza will now do her outro properly.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_baltharus_enervating_brand_trigger';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(74505, 'spell_baltharus_enervating_brand_trigger');
|
||||
@@ -75,15 +75,15 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
{
|
||||
boss_baltharus_the_warbornAI(Creature* creature) : BossAI(creature, DATA_BALTHARUS_THE_WARBORN)
|
||||
{
|
||||
_introDone = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
_introDone = false;
|
||||
events.SetPhase(PHASE_INTRO);
|
||||
events.ScheduleEvent(EVENT_OOC_CHANNEL, 0, 0, PHASE_INTRO);
|
||||
_cloneCount = RAID_MODE<uint8>(1, 2, 2, 3);
|
||||
_cloneCount = RAID_MODE<uint8>(1, 2, 2, 2);
|
||||
}
|
||||
|
||||
void DoAction(int32 const action)
|
||||
@@ -116,9 +116,9 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
_EnterCombat();
|
||||
events.SetPhase(PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 110000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_ENERVATING_BRAND, 130000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_BLADE_TEMPEST, 150000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 11000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_ENERVATING_BRAND, 13000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_BLADE_TEMPEST, 15000, 0, PHASE_COMBAT);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
@@ -145,25 +145,16 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage)
|
||||
{
|
||||
if (GetDifficulty() != RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
if (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(66, damage) && _cloneCount == 2)
|
||||
DoAction(ACTION_CLONE);
|
||||
else if (me->HealthBelowPctDamaged(33, damage) && _cloneCount == 1)
|
||||
DoAction(ACTION_CLONE);
|
||||
}
|
||||
else if (GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(75, damage) && _cloneCount == 3)
|
||||
DoAction(ACTION_CLONE);
|
||||
else if (me->HealthBelowPctDamaged(50, damage) && _cloneCount == 2)
|
||||
DoAction(ACTION_CLONE);
|
||||
else if (me->HealthBelowPctDamaged(25, damage) && _cloneCount == 1)
|
||||
if (me->HealthBelowPctDamaged(50, damage) && _cloneCount == 1)
|
||||
DoAction(ACTION_CLONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(50, damage) && _cloneCount == 1)
|
||||
if (me->HealthBelowPctDamaged(66, damage) && _cloneCount == 2)
|
||||
DoAction(ACTION_CLONE);
|
||||
else if (me->HealthBelowPctDamaged(33, damage) && _cloneCount == 1)
|
||||
DoAction(ACTION_CLONE);
|
||||
}
|
||||
}
|
||||
@@ -238,7 +229,7 @@ class spell_baltharus_enervating_brand : public SpellScriptLoader
|
||||
if (Unit* target = GetTarget())
|
||||
{
|
||||
uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()];
|
||||
GetCaster()->CastSpell(target, triggerSpellId, true);
|
||||
target->CastSpell(target, triggerSpellId, true);
|
||||
|
||||
if (target->GetDistance(GetCaster()) <= 12.0f)
|
||||
target->CastSpell(GetCaster(), SPELL_SIPHONED_MIGHT, true);
|
||||
@@ -257,8 +248,57 @@ class spell_baltharus_enervating_brand : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class EnervatingBrandSelector
|
||||
{
|
||||
public:
|
||||
explicit EnervatingBrandSelector(Unit* caster) : _caster(caster) {}
|
||||
|
||||
bool operator()(Unit* unit)
|
||||
{
|
||||
if (_caster->GetDistance(unit) > 12.0f)
|
||||
return true;
|
||||
|
||||
if (unit->GetTypeId() != TYPEID_PLAYER)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _caster;
|
||||
};
|
||||
|
||||
class spell_baltharus_enervating_brand_trigger : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_baltharus_enervating_brand_trigger() : SpellScriptLoader("spell_baltharus_enervating_brand_trigger") { }
|
||||
|
||||
class spell_baltharus_enervating_brand_trigger_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_baltharus_enervating_brand_trigger_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<Unit*>& unitList)
|
||||
{
|
||||
unitList.remove_if(EnervatingBrandSelector(GetCaster()));
|
||||
unitList.push_back(GetCaster());
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_baltharus_enervating_brand_trigger_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ALLY_SRC);
|
||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_baltharus_enervating_brand_trigger_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_AREA_ALLY_SRC);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_baltharus_enervating_brand_trigger_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_baltharus_the_warborn()
|
||||
{
|
||||
new boss_baltharus_the_warborn();
|
||||
new spell_baltharus_enervating_brand();
|
||||
new spell_baltharus_enervating_brand_trigger();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ enum Texts
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_XERESTRASZA_EVENT = 0,
|
||||
EVENT_XERESTRASZA_EVENT_1 = 1,
|
||||
EVENT_XERESTRASZA_EVENT_2 = 2,
|
||||
EVENT_XERESTRASZA_EVENT_3 = 3,
|
||||
@@ -54,12 +53,13 @@ class npc_xerestrasza : public CreatureScript
|
||||
{
|
||||
npc_xerestraszaAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_isIntro = true;
|
||||
_introDone = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
_isIntro = false;
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
|
||||
}
|
||||
|
||||
@@ -68,22 +68,30 @@ class npc_xerestrasza : public CreatureScript
|
||||
if (action == ACTION_BALTHARUS_DEATH)
|
||||
{
|
||||
me->setActive(true);
|
||||
_isIntro = true;
|
||||
_isIntro = false;
|
||||
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT, 4000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_1, 20000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_2, 29000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_3, 36000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_4, 46000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_5, 55000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_6, 65000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_7, 73000);
|
||||
Talk(SAY_XERESTRASZA_EVENT);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->GetMotionMaster()->MovePoint(0, xerestraszaMovePos);
|
||||
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_1, 16000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_2, 25000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_3, 32000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_4, 42000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_5, 51000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_6, 61000);
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_7, 69000);
|
||||
}
|
||||
else if (action == ACTION_INTRO_TRIGGER && !_introDone)
|
||||
{
|
||||
_introDone = true;
|
||||
Talk(SAY_XERESTRASZA_INTRO);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!_isIntro)
|
||||
if (_isIntro)
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
@@ -92,11 +100,6 @@ class npc_xerestrasza : public CreatureScript
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_XERESTRASZA_EVENT:
|
||||
Talk(SAY_XERESTRASZA_EVENT);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->GetMotionMaster()->MovePoint(0, xerestraszaMovePos);
|
||||
break;
|
||||
case EVENT_XERESTRASZA_EVENT_1:
|
||||
Talk(SAY_XERESTRASZA_EVENT_1);
|
||||
break;
|
||||
@@ -129,6 +132,7 @@ class npc_xerestrasza : public CreatureScript
|
||||
private:
|
||||
EventMap _events;
|
||||
bool _isIntro;
|
||||
bool _introDone;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -148,11 +152,9 @@ class at_baltharus_plateau : public AreaTriggerScript
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
if (Creature* xerestrasza = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_XERESTRASZA)))
|
||||
if (instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) != DONE)
|
||||
xerestrasza->AI()->Talk(SAY_XERESTRASZA_INTRO);
|
||||
xerestrasza->AI()->DoAction(ACTION_INTRO_TRIGGER);
|
||||
|
||||
if (Creature* baltharus = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_BALTHARUS_THE_WARBORN)))
|
||||
if (instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) != DONE)
|
||||
baltharus->AI()->DoAction(ACTION_INTRO_TRIGGER);
|
||||
}
|
||||
|
||||
@@ -162,6 +164,6 @@ class at_baltharus_plateau : public AreaTriggerScript
|
||||
|
||||
void AddSC_ruby_sanctum()
|
||||
{
|
||||
new at_baltharus_plateau();
|
||||
new npc_xerestrasza();
|
||||
new at_baltharus_plateau();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user