fix(DB/SAI): Doomguard Commander - Crystal Prison (#17782)

* fix(DB/SAI): Doomguard Commander - Crystal Prison

* flags
This commit is contained in:
avarishd 2023-11-19 13:48:35 +02:00 committed by GitHub
parent 15f645d751
commit 9c225fca58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 35 deletions

View file

@ -0,0 +1,11 @@
-- Doomguard Commander
DELETE FROM `spell_script_names` WHERE `spell_id`=23019;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 12396);
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_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(12396, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 18000, 24000, 0, 0, 11, 16005, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomguard Commander - In Combat - Cast \'Rain of Fire\''),
(12396, 0, 1, 0, 0, 0, 100, 0, 12000, 15000, 20000, 25000, 0, 0, 11, 16727, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomguard Commander - In Combat - Cast \'War Stomp\''),
(12396, 0, 2, 0, 0, 0, 100, 0, 2000, 4000, 25000, 32000, 0, 0, 11, 20812, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomguard Commander - In Combat - Cast \'Cripple\''),
(12396, 0, 3, 0, 0, 0, 100, 0, 7000, 14000, 17000, 22000, 0, 0, 11, 15090, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomguard Commander - In Combat - Cast \'Dispel Magic\''),
(12396, 0, 4, 5, 8, 0, 100, 0, 23019, 0, 0, 0, 0, 0, 50, 179644, 180, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomguard Commander - On Spellhit \'Crystal Prison Dummy DND\' - Summon Gameobject \'Imprisoned Doomguard\''),
(12396, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomguard Commander - On Spellhit \'Crystal Prison Dummy DND\' - Despawn Instant');

View file

@ -2853,40 +2853,6 @@ class spell_item_purify_helboar_meat : public SpellScript
}
};
enum CrystalPrison
{
OBJECT_IMPRISONED_DOOMGUARD = 179644,
};
class spell_item_crystal_prison_dummy_dnd : public SpellScript
{
PrepareSpellScript(spell_item_crystal_prison_dummy_dnd);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sObjectMgr->GetGameObjectTemplate(OBJECT_IMPRISONED_DOOMGUARD))
return false;
return true;
}
void HandleDummy(SpellEffIndex /* effIndex */)
{
if (Creature* target = GetHitCreature())
{
if (target->isDead() && !target->IsPet())
{
GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0, 0, 0, 0, uint32(target->GetRespawnTime() - GameTime::GetGameTime().count()));
target->DespawnOrUnsummon();
}
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_item_crystal_prison_dummy_dnd::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
enum ReindeerTransformation
{
SPELL_FLYING_REINDEER_310 = 44827,
@ -4063,7 +4029,6 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_refocus);
RegisterSpellScript(spell_item_shimmering_vessel);
RegisterSpellScript(spell_item_purify_helboar_meat);
RegisterSpellScript(spell_item_crystal_prison_dummy_dnd);
RegisterSpellScript(spell_item_reindeer_transformation);
RegisterSpellScript(spell_item_nigh_invulnerability);
RegisterSpellScript(spell_item_poultryizer);