mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Spells: Implement hunter talent Implosive Trap (#30856)
This commit is contained in:
7
sql/updates/world/master/2025_05_04_00_world.sql
Normal file
7
sql/updates/world/master/2025_05_04_00_world.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `areatrigger_create_properties` WHERE `Id`=34378 AND `IsCustom`=0;
|
||||
INSERT INTO `areatrigger_create_properties` (`Id`,`IsCustom`,`AreaTriggerId`,`IsAreatriggerCustom`,`Flags`,`MoveCurveId`,`ScaleCurveId`,`MorphCurveId`,`FacingCurveId`,`AnimId`,`AnimKitId`,`DecalPropertiesId`,`SpellForVisuals`,`TimeToTargetScale`,`Speed`,`Shape`,`ShapeData0`,`ShapeData1`,`ShapeData2`,`ShapeData3`,`ShapeData4`,`ShapeData5`,`ShapeData6`,`ShapeData7`,`ScriptName`,`VerifiedBuild`) VALUES
|
||||
(34378,0,36703,0,0,0,0,0,0,-1,0,0,NULL,60000,0,4,5,5,5,5,1,1,0,0,'areatrigger_hun_implosive_trap',60257); -- Spell: 462032 (Implosive Trap)
|
||||
|
||||
DELETE FROM `areatrigger_template` WHERE `Id`=36703 AND `IsCustom`=0;
|
||||
INSERT INTO `areatrigger_template` (`Id`,`IsCustom`,`Flags`,`VerifiedBuild`) VALUES
|
||||
(36703,0,0,60257);
|
||||
@@ -51,6 +51,8 @@ enum HunterSpells
|
||||
SPELL_HUNTER_GREVIOUS_INJURY = 1217789,
|
||||
SPELL_HUNTER_HIGH_EXPLOSIVE_TRAP = 236775,
|
||||
SPELL_HUNTER_HIGH_EXPLOSIVE_TRAP_DAMAGE = 236777,
|
||||
SPELL_HUNTER_IMPLOSIVE_TRAP = 462032,
|
||||
SPELL_HUNTER_IMPLOSIVE_TRAP_DAMAGE = 462033,
|
||||
SPELL_HUNTER_INTIMIDATION = 19577,
|
||||
SPELL_HUNTER_INTIMIDATION_MARKSMANSHIP = 474421,
|
||||
SPELL_HUNTER_LATENT_POISON_STACK = 378015,
|
||||
@@ -338,6 +340,32 @@ class spell_hun_hunting_party : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 462032 - Implosive Trap
|
||||
// 34378 - AreatriggerId
|
||||
struct areatrigger_hun_implosive_trap : AreaTriggerAI
|
||||
{
|
||||
using AreaTriggerAI::AreaTriggerAI;
|
||||
|
||||
void OnInitialize() override
|
||||
{
|
||||
if (Unit* caster = at->GetCaster())
|
||||
for (AreaTrigger* other : caster->GetAreaTriggers(SPELL_HUNTER_IMPLOSIVE_TRAP))
|
||||
other->SetDuration(0);
|
||||
}
|
||||
|
||||
void OnUnitEnter(Unit* unit) override
|
||||
{
|
||||
if (Unit* caster = at->GetCaster())
|
||||
{
|
||||
if (caster->IsValidAttackTarget(unit))
|
||||
{
|
||||
caster->CastSpell(at->GetPosition(), SPELL_HUNTER_IMPLOSIVE_TRAP_DAMAGE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
at->Remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 53478 - Last Stand Pet
|
||||
class spell_hun_last_stand_pet : public SpellScript
|
||||
{
|
||||
@@ -988,6 +1016,7 @@ void AddSC_hunter_spell_scripts()
|
||||
RegisterSpellScript(spell_hun_explosive_shot);
|
||||
RegisterAreaTriggerAI(areatrigger_hun_high_explosive_trap);
|
||||
RegisterSpellScript(spell_hun_hunting_party);
|
||||
RegisterAreaTriggerAI(areatrigger_hun_implosive_trap);
|
||||
RegisterSpellScript(spell_hun_last_stand_pet);
|
||||
RegisterSpellScript(spell_hun_latent_poison_damage);
|
||||
RegisterSpellScript(spell_hun_latent_poison_trigger);
|
||||
|
||||
Reference in New Issue
Block a user