mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Script/Spells: Fix spell 64414 / Load into catapult
Also fix SQL file naming from this morning.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (12740,12741,12744,12993) AND `type`=12;
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (12747,12748,12749) AND `type`=12;
|
||||
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
|
||||
VALUES
|
||||
(12740,12,0,0,''),
|
||||
(12741,12,0,0,''),
|
||||
(12744,12,0,0,''),
|
||||
(12993,12,1,0,'');
|
||||
(12747,12,1,0,''),
|
||||
(12748,12,1,0,''),
|
||||
(12749,12,1,0,'');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (12747,12748,12749) AND `type`=12;
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (12740,12741,12744,12993) AND `type`=12;
|
||||
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
|
||||
VALUES
|
||||
(12747,12,1,0,''),
|
||||
(12748,12,1,0,''),
|
||||
(12749,12,1,0,'');
|
||||
(12740,12,0,0,''),
|
||||
(12741,12,0,0,''),
|
||||
(12744,12,0,0,''),
|
||||
(12993,12,1,0,'');
|
||||
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=64414;
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(64414,'spell_load_into_catapult');
|
||||
|
||||
-- Update a wrongly entered spell
|
||||
UPDATE `creature_template` SET `spell6`=64414 WHERE `entry`=33167;
|
||||
@@ -49,6 +49,7 @@ enum Spells
|
||||
SPELL_SMOKE_TRAIL = 63575,
|
||||
SPELL_ELECTROSHOCK = 62522,
|
||||
SPELL_NAPALM = 63666,
|
||||
SPELL_INVIS_AND_STEALTH_DETECT = 18950, // Passive
|
||||
//TOWER Additional SPELLS
|
||||
SPELL_THORIM_S_HAMMER = 62911, // Tower of Storms
|
||||
SPELL_MIMIRON_S_INFERNO = 62909, // Tower of Flames
|
||||
@@ -243,6 +244,8 @@ class boss_flame_leviathan : public CreatureScript
|
||||
Shutout = true;
|
||||
Unbroken = true;
|
||||
|
||||
DoCast(SPELL_INVIS_AND_STEALTH_DETECT);
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -327,6 +330,9 @@ class boss_flame_leviathan : public CreatureScript
|
||||
void JustDied(Unit* /*victim*/)
|
||||
{
|
||||
_JustDied();
|
||||
// Set Field Flags 67108928 = 64 | 67108864 = UNIT_FLAG_UNK_6 | UNIT_FLAG_SKINNABLE
|
||||
// Set DynFlags 12
|
||||
// Set NPCFlags 0
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
}
|
||||
|
||||
@@ -1466,6 +1472,51 @@ class achievement_orbit_uary : public AchievementCriteriaScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_load_into_catapult : public SpellScriptLoader
|
||||
{
|
||||
enum Spells
|
||||
{
|
||||
SPELL_PASSENGER_LOADED = 62340,
|
||||
};
|
||||
|
||||
public:
|
||||
spell_load_into_catapult() : SpellScriptLoader("spell_load_into_catapult") { }
|
||||
|
||||
class spell_load_into_catapult_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_load_into_catapult_AuraScript);
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* owner = GetOwner()->ToUnit();
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
owner->CastSpell(owner, SPELL_PASSENGER_LOADED, true);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* owner = GetOwner()->ToUnit();
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
owner->RemoveAurasDueToSpell(SPELL_PASSENGER_LOADED);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_load_into_catapult_AuraScript::OnApply, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_load_into_catapult_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_load_into_catapult_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_flame_leviathan()
|
||||
{
|
||||
new boss_flame_leviathan();
|
||||
@@ -1495,4 +1546,6 @@ void AddSC_boss_flame_leviathan()
|
||||
new achievement_orbital_devastation();
|
||||
new achievement_nuked_from_orbit();
|
||||
new achievement_orbit_uary();
|
||||
|
||||
new spell_load_into_catapult();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user