mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/HallowsEnd: Implement quest: "Foul Fertilizer" (#29407)
This commit is contained in:
21
sql/updates/world/master/2023_11_08_00_world.sql
Normal file
21
sql/updates/world/master/2023_11_08_00_world.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Spell data
|
||||
DELETE FROM `serverside_spell` WHERE `Id`=191547;
|
||||
INSERT INTO `serverside_spell` (`Id`, `DifficultyID`, `CategoryId`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `AttributesEx8`, `AttributesEx9`, `AttributesEx10`, `AttributesEx11`, `AttributesEx12`, `AttributesEx13`, `AttributesEx14`, `Stances`, `StancesNot`, `Targets`, `TargetCreatureType`, `RequiresSpellFocus`, `FacingCasterFlags`, `CasterAuraState`, `TargetAuraState`, `ExcludeCasterAuraState`, `ExcludeTargetAuraState`, `CasterAuraSpell`, `TargetAuraSpell`, `ExcludeCasterAuraSpell`, `ExcludeTargetAuraSpell`, `CasterAuraType`, `TargetAuraType`, `ExcludeCasterAuraType`, `ExcludeTargetAuraType`, `CastingTimeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryCategory`, `StartRecoveryTime`, `InterruptFlags`, `AuraInterruptFlags1`, `AuraInterruptFlags2`, `ChannelInterruptFlags1`, `ChannelInterruptFlags2`, `ProcFlags`, `ProcFlags2`, `ProcChance`, `ProcCharges`, `ProcCooldown`, `ProcBasePPM`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `Speed`, `LaunchDelay`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `ContentTuningId`, `SpellName`, `ConeAngle`, `ConeWidth`, `MaxTargetLevel`, `MaxAffectedTargets`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `SpellFamilyFlags4`, `DmgClass`, `PreventionType`, `AreaGroupId`, `SchoolMask`, `ChargeCategoryId`) VALUES
|
||||
(191547, 0, 0, 0, 0, 0x000001D0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00100000, 0, 100, 0, 5000, 0, 0, 0, 0, 21, 4, 0, 0, 0, 0, 0, 0, 0, 'Powder Blast', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0);
|
||||
|
||||
DELETE FROM `serverside_spell_effect` WHERE `SpellID`=191547;
|
||||
INSERT INTO `serverside_spell_effect` (`SpellID`, `EffectIndex`, `DifficultyID`, `Effect`, `EffectAura`, `EffectAmplitude`, `EffectAttributes`, `EffectAuraPeriod`, `EffectBonusCoefficient`, `EffectChainAmplitude`, `EffectChainTargets`, `EffectItemType`, `EffectMechanic`, `EffectPointsPerResource`, `EffectPosFacing`, `EffectRealPointsPerLevel`, `EffectTriggerSpell`, `BonusCoefficientFromAP`, `PvpMultiplier`, `Coefficient`, `Variance`, `ResourceCoefficient`, `GroupSizeBasePointsCoefficient`, `EffectBasePoints`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectSpellClassMask1`, `EffectSpellClassMask2`, `EffectSpellClassMask3`, `EffectSpellClassMask4`, `ImplicitTarget1`, `ImplicitTarget2`) VALUES
|
||||
(191547, 0, 0, 6, 42, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_hallows_end_powder_blast';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(191547, 'spell_hallows_end_powder_blast');
|
||||
|
||||
-- SAI
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=96765;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=96765 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(96765,0,0,1,11,0,100,0,0,0,0,0,0,'',42,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Dread Fertilizer - On spawn - Set invincibility'),
|
||||
(96765,0,1,0,61,0,100,0,0,0,0,0,0,'',8,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Dread Fertilizer - Event linked - Set react state passive'),
|
||||
(96765,0,2,0,8,0,100,0,191546,0,0,0,0,'',41,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Dread Fertilizer - On spell hit ("Dread Fertilizer") - Despawn');
|
||||
@@ -41,6 +41,12 @@ std::array<uint32, 4> const CandysSpells =
|
||||
SPELL_HALLOWS_END_CANDY_GHOST
|
||||
};
|
||||
|
||||
enum HallowsEndMiscSpells
|
||||
{
|
||||
SPELL_HALLOWS_END_DUMMY_NUKE = 21912,
|
||||
SPELL_HALLOWS_END_DREAD_FERTILIZER = 191546
|
||||
};
|
||||
|
||||
// 24930 - Hallow's End Candy
|
||||
class spell_hallow_end_candy : public SpellScript
|
||||
{
|
||||
@@ -290,6 +296,26 @@ class spell_hallow_end_wand : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 191547 - Powder Blast
|
||||
class spell_hallows_end_powder_blast : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_HALLOWS_END_DUMMY_NUKE, SPELL_HALLOWS_END_DREAD_FERTILIZER });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_HALLOWS_END_DUMMY_NUKE);
|
||||
eventInfo.GetProcTarget()->CastSpell(GetTarget(), SPELL_HALLOWS_END_DREAD_FERTILIZER);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_hallows_end_powder_blast::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_event_hallows_end()
|
||||
{
|
||||
RegisterSpellScript(spell_hallow_end_candy);
|
||||
@@ -298,4 +324,5 @@ void AddSC_event_hallows_end()
|
||||
RegisterSpellScript(spell_hallow_end_trick_or_treat);
|
||||
RegisterSpellScript(spell_hallow_end_tricky_treat);
|
||||
RegisterSpellScript(spell_hallow_end_wand);
|
||||
RegisterSpellScript(spell_hallows_end_powder_blast);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user