fix(Core/Scripts): Bloodscale Enchantress/Rajis Fyashe freezing circle (#13963)

Co-authored-by: Eridium <killyana@users.noreply.github.com>
Co-authored-by: Lucas Nascimento <keader.android@gmail.com>

Co-authored-by: Eridium <killyana@users.noreply.github.com>
Co-authored-by: Lucas Nascimento <keader.android@gmail.com>
This commit is contained in:
Angelo Venturini
2022-12-11 11:35:08 -03:00
committed by GitHub
parent 45be3720a5
commit 72b446fb12
3 changed files with 81 additions and 43 deletions

View File

@@ -0,0 +1,37 @@
--
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` = 20061);
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|1|64|1024 WHERE `entry` = 18044;
DELETE FROM `creature` WHERE `id1`=20061;
DELETE FROM `creature_template_movement` WHERE `CreatureId`=20061;
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES
(20061, 1, 1, 0, 1);
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (20061);
DELETE FROM `smart_scripts` WHERE `entryorguid`=20061 AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=2006100 AND `source_type`=9;
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`, `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
(20061,0,0,0,54,0,100,0,0,0,0,0,0,80,2006100,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Just summoned - Action list"),
(2006100,9,0,0,0,0,100,0,0,0,0,0,0,11,34872,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,3.15,"Frostbite Invisible Stalker - Action list - Set Orientation"),
(2006100,9,2,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,3,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,4,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,2.3624,"Frostbite Invisible Stalker - Action list - Set Orientation"),
(2006100,9,5,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,6,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,7,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1.575,"Frostbite Invisible Stalker - Action list - Set Orientation"),
(2006100,9,8,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,9,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,10,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0.7875,"Frostbite Invisible Stalker - Action list - Set Orientation"),
(2006100,9,11,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,12,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
(2006100,9,13,0,0,0,100,0,1000,1000,0,0,0,11,34779,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Just Action list - cast spell");
DELETE FROM `spell_script_names` WHERE `ScriptName` ='spell_freezing_circle';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(34779,'spell_freezing_circle');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18088) AND (`source_type` = 0) AND (`id` IN (0, 1, 2));
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`, `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
(18088, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2400, 3800, 0, 11, 34447, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodscale Enchantress - In Combat - Cast \'Arcane Missiles\''),
(18088, 0, 1, 2, 0, 0, 100, 0, 6000, 8000, 16000, 22000, 0, 11, 33245, 35, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodscale Enchantress - In Combat - Cast \'Ice Barrier\''),
(18088, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 11, 34787, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodscale Enchantress - In Combat - Cast \'Freezing Circle\'');

View File

@@ -1297,48 +1297,6 @@ public:
}
};
class npc_frostbite_invisible_stalker : public CreatureScript
{
public:
npc_frostbite_invisible_stalker() : CreatureScript("npc_frostbite_invisible_stalker") { }
struct npc_frostbite_invisible_stalkerAI: public NullCreatureAI
{
npc_frostbite_invisible_stalkerAI(Creature* creature) : NullCreatureAI(creature)
{
timer = 3500;
for (uint8 i = 0; i < 3; ++i)
{
me->SetOrientation(i * M_PI / 3);
me->CastSpell(me, 34740, true);
me->CastSpell(me, 34746, true);
}
}
uint16 timer;
void UpdateAI(uint32 diff) override
{
if (timer)
{
if (timer <= diff)
{
int32 dmg = 2200;
me->CastCustomSpell(me, 34779, 0, &dmg, 0, true);
timer = 0;
}
else
timer -= diff;
}
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return GetPitOfSaronAI<npc_frostbite_invisible_stalkerAI>(creature);
}
};
class spell_pos_empowered_blizzard : public SpellScriptLoader
{
public:
@@ -1574,7 +1532,6 @@ void AddSC_pit_of_saron()
new npc_pos_martin_or_gorkun_second();
new npc_pos_freed_slave();
new npc_pos_leader_second();
new npc_frostbite_invisible_stalker();
new spell_pos_empowered_blizzard();
new spell_pos_slave_trigger_closest();

View File

@@ -4594,6 +4594,49 @@ class spell_gen_basic_campfire : public SpellScript
}
};
// 34779 - Freezing Circle
enum FreezingCircleSpells
{
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_NORMAL = 69574,
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_HEROIC = 70276,
SPELL_FREEZING_CIRCLE = 34787,
};
class spell_freezing_circle : public SpellScript
{
PrepareSpellScript(spell_freezing_circle);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
{
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_NORMAL,
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_HEROIC,
SPELL_FREEZING_CIRCLE
});
}
void HandleDamage(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
uint32 spellId = 0;
Map* map = caster->GetMap();
if (map->IsDungeon())
spellId = map->IsHeroic() ? SPELL_FREEZING_CIRCLE_PIT_OF_SARON_HEROIC : SPELL_FREEZING_CIRCLE_PIT_OF_SARON_NORMAL;
else
spellId = SPELL_FREEZING_CIRCLE;
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId))
SetHitDamage(spellInfo->Effects[EFFECT_0].CalcValue());
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_freezing_circle::HandleDamage, EFFECT_1, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
void AddSC_generic_spell_scripts()
{
RegisterSpellScript(spell_silithyst);
@@ -4732,4 +4775,5 @@ void AddSC_generic_spell_scripts()
RegisterSpellScriptWithArgs(spell_gen_apply_aura_after_expiration, "spell_itch_aq20", SPELL_HIVEZARA_CATALYST, EFFECT_0, SPELL_AURA_DUMMY);
RegisterSpellScriptWithArgs(spell_gen_apply_aura_after_expiration, "spell_itch_aq40", SPELL_VEKNISS_CATALYST, EFFECT_0, SPELL_AURA_DUMMY);
RegisterSpellScript(spell_gen_basic_campfire);
RegisterSpellScript(spell_freezing_circle);
}