mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
Scripts/VP:
* added missing encounter frames to Altairus and Asaad * make Altairus' Cyclones also hovering for a correct hitbox and height * fixed Slipstream target selection * fixes Skyfall disappearing when Skyfall Stars are dead * fixed visuals for Asaad's Supremacy of the Storm * fixed Static Cling not applying on jumping / falling targets * fixed summoning Skyfall Stars * removed a duplicate sound that appeared during announcing Supremacy of the Storm
This commit is contained in:
17
sql/updates/world/4.3.4/custom_2018_03_23_04_world.sql
Normal file
17
sql/updates/world/4.3.4/custom_2018_03_23_04_world.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
UPDATE `creature_template` SET `InhabitType`= 1 WHERE `entry` IN (43873, 43874);
|
||||
UPDATE `creature_template` SET `InhabitType`= 4, `flags_extra`= 131 WHERE `entry` IN
|
||||
(45572, 45504, 47085, 45981);
|
||||
|
||||
UPDATE `creature_text` SET `Sound`= 0 WHERE `CreatureID`= 43875 AND `GroupID`= 2;
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN
|
||||
('spell_supremacy_of_the_storm_visual',
|
||||
'spell_static_cling');
|
||||
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(86715, 'spell_supremacy_of_the_storm_visual'),
|
||||
(87618, 'spell_static_cling');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`= 96260 AND `SourceTypeOrReferenceId`= 13;
|
||||
INSERT INTO conditions (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 96260, 0, 0, 31, 0, 3, 43875, 0, 0, 0, '', 'Summon Skyfall Star - Target Asaad');
|
||||
@@ -4148,6 +4148,27 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
{
|
||||
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ANY);
|
||||
});
|
||||
|
||||
// Slipstream
|
||||
ApplySpellFix({
|
||||
84980,
|
||||
84988,
|
||||
85394,
|
||||
85397,
|
||||
85016
|
||||
}, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(39); // 2 seconds
|
||||
spellInfo->Effects[EFFECT_0].Amplitude = 2000;
|
||||
spellInfo->Effects[EFFECT_0].Amplitude = 2000;
|
||||
});
|
||||
|
||||
// Summon Skyfall Star
|
||||
ApplySpellFix({ 96260 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(2); // Combat Range
|
||||
});
|
||||
|
||||
// ENDOF THE VORTEX PINNACLE SPELLS
|
||||
|
||||
//
|
||||
|
||||
@@ -107,10 +107,6 @@ const Position TwisterSpawnPoints[POINT_TWISTER_MAX] = {
|
||||
{ -1204.863f, 40.49826f, 734.2564f },
|
||||
};
|
||||
|
||||
// TO-DO:
|
||||
// - Fix hovering with disabled gravity. Altairus falls down every time position is updated.
|
||||
// - Add argument to MoveRandom() to manually set i_nextMoveTime in "RandomMovementGenerator.h". This npc needs i_nextMoveTime = 1000.
|
||||
|
||||
class boss_altairus : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -120,13 +116,14 @@ class boss_altairus : public CreatureScript
|
||||
{
|
||||
boss_altairusAI(Creature* creature) : BossAI(creature, DATA_ALTAIRUS)
|
||||
{
|
||||
//me->SetHover(true);
|
||||
//me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
// me->SetHover(true);
|
||||
// me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*target*/) override
|
||||
{
|
||||
_JustEngagedWith();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
|
||||
events.ScheduleEvent(EVENT_CALL_THE_WIND, 6000);
|
||||
events.ScheduleEvent(EVENT_CHILLING_BREATH, 15000);
|
||||
events.ScheduleEvent(EVENT_LIGHTNING_BLAST, 1000);
|
||||
@@ -136,7 +133,25 @@ class boss_altairus : public CreatureScript
|
||||
if (IsHeroic())
|
||||
for (int8 i = 0; i < POINT_TWISTER_MAX; i++)
|
||||
if (Creature* twister = me->SummonCreature(NPC_TWISTER, TwisterSpawnPoints[i]))
|
||||
{
|
||||
twister->SetHover(true);
|
||||
twister->GetMotionMaster()->MoveRandom(10.0f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
summons.DespawnAll();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
_EnterEvadeMode();
|
||||
_DespawnAtEvade();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
}
|
||||
|
||||
void CheckPlatform()
|
||||
@@ -146,7 +161,7 @@ class boss_altairus : public CreatureScript
|
||||
if (!playerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->GetDistance2d(platform.m_positionX, platform.m_positionY) > 25.0f)
|
||||
if (player->GetDistance2d(platform.m_positionX, platform.m_positionY) > 30.0f)
|
||||
me->CastSpell(player, SPELL_LIGHTNING_BLAST, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// Asaad
|
||||
SPELL_SUMMON_SKYFALL_STAR = 96260, // summons 52019
|
||||
SPELL_CHAIN_LIGHTNING = 87622,
|
||||
SPELL_SOTS_TARGETING = 86632,
|
||||
@@ -182,19 +183,18 @@ class boss_asaad : public CreatureScript
|
||||
stormTargetGUIDs.clear();
|
||||
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
events.ScheduleEvent(EVENT_SUMMON_SKYFALL_STAR, 11000);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 14500);
|
||||
events.ScheduleEvent(EVENT_SOTS, 18000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_STATIC_CLING, 10800);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*target*/) override
|
||||
{
|
||||
_JustEngagedWith();
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SKYFALL_STAR, 11000);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 14500);
|
||||
events.ScheduleEvent(EVENT_SOTS, 18000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_STATIC_CLING, 10800);
|
||||
|
||||
// Spawn Storm Targets
|
||||
for (uint32 i = 0; i < StormTargetPositions; ++i)
|
||||
@@ -256,10 +256,18 @@ class boss_asaad : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
summons.DespawnAll();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
_EnterEvadeMode();
|
||||
_DespawnAtEvade();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
@@ -279,7 +287,7 @@ class boss_asaad : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_STATIC_CLING, 16000);
|
||||
break;
|
||||
case EVENT_SUMMON_SKYFALL_STAR:
|
||||
DoCast(me, SPELL_SUMMON_SKYFALL_STAR);
|
||||
DoCast(me, SPELL_SUMMON_SKYFALL_STAR, true);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 14500);
|
||||
break;
|
||||
case EVENT_CHAIN_LIGHTNING:
|
||||
@@ -384,14 +392,12 @@ public:
|
||||
|
||||
struct npc_storm_targetAI : public ScriptedAI
|
||||
{
|
||||
npc_storm_targetAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_storm_targetAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action != ACTION_SOTS_TARGET)
|
||||
return;
|
||||
|
||||
_events.ScheduleEvent(EVENT_SOTS_SUMMON, 400);
|
||||
if (action == ACTION_SOTS_TARGET)
|
||||
_events.ScheduleEvent(EVENT_SOTS_SUMMON, 400);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* creature) override
|
||||
@@ -799,6 +805,94 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class AboveGroundCheck
|
||||
{
|
||||
public:
|
||||
AboveGroundCheck() { }
|
||||
|
||||
bool operator()(WorldObject* object)
|
||||
{
|
||||
if (Unit* target = object->ToUnit())
|
||||
return (target->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)
|
||||
|| target->HasUnitMovementFlag(MOVEMENTFLAG_FALLING_FAR)
|
||||
|| target->HasUnitMovementFlag(MOVEMENTFLAG_PITCH_UP));
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_supremacy_of_the_storm_visual : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_supremacy_of_the_storm_visual() : SpellScriptLoader("spell_supremacy_of_the_storm_visual") { }
|
||||
|
||||
class spell_supremacy_of_the_storm_visual_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_supremacy_of_the_storm_visual_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
InstanceScript* instance = GetCaster()->GetInstanceScript();
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
Creature* asaad = instance->GetCreature(DATA_ASAAD);
|
||||
if (!asaad)
|
||||
return;
|
||||
|
||||
Creature* stormTargetA = ObjectAccessor::GetCreature(*asaad, asaad->AI()->GetGUID(POINT_STORM_A));
|
||||
Creature* stormTargetB = ObjectAccessor::GetCreature(*asaad, asaad->AI()->GetGUID(POINT_STORM_B));
|
||||
Creature* stormTargetC = ObjectAccessor::GetCreature(*asaad, asaad->AI()->GetGUID(POINT_STORM_C));
|
||||
|
||||
if (!stormTargetA || !stormTargetB || !stormTargetC)
|
||||
return;
|
||||
|
||||
targets.remove_if(TargetInTriangleCheck(false, stormTargetA->GetPosition(), stormTargetB->GetPosition(), stormTargetC->GetPosition()));
|
||||
|
||||
// Hitting 5 dummy npc's per hit
|
||||
if (!targets.empty() && targets.size() > 5)
|
||||
Trinity::Containers::RandomResize(targets, 5);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_supremacy_of_the_storm_visual_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_supremacy_of_the_storm_visual_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_static_cling : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_static_cling() : SpellScriptLoader("spell_static_cling") { }
|
||||
|
||||
class spell_static_cling_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_static_cling_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(AboveGroundCheck());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_static_cling_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_static_cling_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_static_cling_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_asaad()
|
||||
{
|
||||
new boss_asaad();
|
||||
@@ -810,4 +904,6 @@ void AddSC_boss_asaad()
|
||||
new spell_storm_rune_beam();
|
||||
new spell_grounding_field_visual_beams();
|
||||
new spell_supremacy_of_the_storm();
|
||||
new spell_supremacy_of_the_storm_visual();
|
||||
new spell_static_cling();
|
||||
}
|
||||
|
||||
@@ -211,11 +211,19 @@ public:
|
||||
else if (me->HasAura(SPELL_SLIPSTREAM_FIRST_CONTROL_VEHICLE_AURA))
|
||||
DoCast(who, SPELL_SLIPSTREAM_SECOND);
|
||||
else if (me->HasAura(SPELL_SLIPSTREAM_SECOND_CONTROL_VEHICLE_AURA))
|
||||
DoCast(who, SPELL_SLIPSTREAM_THIRD);
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
{
|
||||
if (instance->GetCreature(DATA_SLIPSTREAM_3) == me)
|
||||
who->CastSpell(who, SPELL_SLIPSTREAM_LAST, true);
|
||||
else
|
||||
DoCast(who, SPELL_SLIPSTREAM_THIRD);
|
||||
}
|
||||
}
|
||||
else if (me->HasAura(SPELL_SLIPSTREAM_THIRD_CONTROL_VEHICLE_AURA))
|
||||
DoCast(who, SPELL_SLIPSTREAM_FORTH);
|
||||
else if (me->HasAura(SPELL_SLIPSTREAM_FORTH_CONTROL_VEHICLE_AURA))
|
||||
DoCast(who, SPELL_SLIPSTREAM_LAST);
|
||||
who->CastSpell(who, SPELL_SLIPSTREAM_LAST, true);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -407,6 +415,12 @@ public:
|
||||
{
|
||||
npc_skyfallAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_deadStarsCounter = 0;
|
||||
me->SetDisableGravity(true);
|
||||
}
|
||||
|
||||
@@ -423,11 +437,21 @@ public:
|
||||
DoCast(me, SPELL_SKYFALL);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action == ACTION_SKYFALL_STAR_DEAD)
|
||||
{
|
||||
_deadStarsCounter++;
|
||||
if (_deadStarsCounter == 8)
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if (!me->FindNearestCreature(NPC_SKYFALL, 100.0f))
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
uint8 _deadStarsCounter;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -463,6 +487,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Creature* skyfall = me->FindNearestCreature(NPC_SKYFALL, 100.0f, true))
|
||||
skyfall->AI()->DoAction(ACTION_SKYFALL_STAR_DEAD);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
@@ -756,7 +782,7 @@ public:
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
Creature* slipstream = GetCaster()->FindNearestCreature(NPC_SLIPSTREAM, 10.0f); // GetCaster()->GetTransport(); won't work :(
|
||||
Creature* slipstream = GetCaster()->GetVehicleCreatureBase();
|
||||
if (!slipstream)
|
||||
return;
|
||||
|
||||
@@ -780,7 +806,7 @@ public:
|
||||
case SPELL_SLIPSTREAM_FORTH_CONTROL_VEHICLE_AURA:
|
||||
target = instance->GetCreature(DATA_SLIPSTREAM_8);
|
||||
break;
|
||||
case SPELL_SLIPSTREAM_LAST_CONTROL_VEHICLE_AURA: // it won't
|
||||
case SPELL_SLIPSTREAM_LAST_CONTROL_VEHICLE_AURA:
|
||||
target = slipstream->FindNearestCreature(NPC_SLIPSTREAM_LANDING_ZONE, 100.0f);
|
||||
break;
|
||||
default:
|
||||
@@ -802,7 +828,6 @@ public:
|
||||
|
||||
|
||||
// 85084 - Howling Gale
|
||||
// TO-DO: Fix OnEffectProc.
|
||||
class spell_howling_gale : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -1002,7 +1027,7 @@ void AddSC_vortex_pinnacle()
|
||||
new spell_lurk_ressurect();
|
||||
new spell_lurk_search_victim();
|
||||
new spell_slipstream();
|
||||
// new spell_howling_gale(); // needs proc fix
|
||||
new spell_howling_gale();
|
||||
new spell_grounding_field();
|
||||
new spell_skyfall();
|
||||
new spell_arcane_barrage();
|
||||
|
||||
@@ -69,6 +69,9 @@ enum Misc
|
||||
SPELL_BEAM_C = 87723,
|
||||
ACTION_GROUNDING_FIELD_TOP = 1,
|
||||
|
||||
// Skyfall
|
||||
ACTION_SKYFALL_STAR_DEAD = 2,
|
||||
|
||||
// Zephyr
|
||||
NPC_ZEPHYR = 45991,
|
||||
EVENT_SUMMON_ZEPHYRS = 1,
|
||||
|
||||
Reference in New Issue
Block a user