fix(Script/Creature): move Shadow Hunter Vosh'gajin script to SAI (#7421)

This commit is contained in:
EPTIC
2021-08-25 11:58:13 +03:00
committed by GitHub
parent 42750494e5
commit 015f8802a8
4 changed files with 14 additions and 97 deletions

View File

@@ -0,0 +1,8 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1629285313174833600');
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 9236;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 9236);
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
(9236, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 45000, 45000, 0, 11, 16098, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow Hunter Vosh\'gajin - In Combat - Cast \'Curse of Blood\''),
(9236, 0, 1, 0, 0, 0, 100, 0, 8000, 8000, 15000, 15000, 0, 11, 16097, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow Hunter Vosh\'gajin - In Combat - Cast \'Hex\'');

View File

@@ -7291,6 +7291,12 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT;
});
// 16097 Shadow Hunter Vosh'gajin - Hex
ApplySpellFix({ 16097 }, [](SpellEntry* spellInfo)
{
spellInfo->CastingTimeIndex = 16;
});
// Sacred Cleansing
ApplySpellFix({ 53659 }, [](SpellEntry* spellInfo)
{

View File

@@ -1,95 +0,0 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#include "blackrock_spire.h"
#include "ScriptedCreature.h"
#include "ScriptMgr.h"
enum Spells
{
SPELL_CURSEOFBLOOD = 24673,
SPELL_HEX = 16708,
SPELL_CLEAVE = 20691,
};
enum Events
{
EVENT_CURSE_OF_BLOOD = 1,
EVENT_HEX = 2,
EVENT_CLEAVE = 3,
};
class boss_shadow_hunter_voshgajin : public CreatureScript
{
public:
boss_shadow_hunter_voshgajin() : CreatureScript("boss_shadow_hunter_voshgajin") { }
CreatureAI* GetAI(Creature* creature) const override
{
return GetBlackrockSpireAI<boss_shadowvoshAI>(creature);
}
struct boss_shadowvoshAI : public BossAI
{
boss_shadowvoshAI(Creature* creature) : BossAI(creature, DATA_SHADOW_HUNTER_VOSHGAJIN) { }
void Reset() override
{
_Reset();
//DoCast(me, SPELL_ICEARMOR, true);
}
void EnterCombat(Unit* /*who*/) override
{
_EnterCombat();
events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 2 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_HEX, 8 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS);
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_CURSE_OF_BLOOD:
DoCastVictim(SPELL_CURSEOFBLOOD);
events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45 * IN_MILLISECONDS);
break;
case EVENT_HEX:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(target, SPELL_HEX);
events.ScheduleEvent(EVENT_HEX, 15 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS);
break;
}
}
DoMeleeAttackIfReady();
}
};
};
void AddSC_boss_shadowvosh()
{
new boss_shadow_hunter_voshgajin();
}

View File

@@ -25,7 +25,6 @@ void AddSC_boss_drakkisath(); //Blackrock Spire
void AddSC_boss_halycon();
void AddSC_boss_highlordomokk();
void AddSC_boss_overlordwyrmthalak();
void AddSC_boss_shadowvosh();
void AddSC_boss_thebeast();
void AddSC_boss_warmastervoone();
void AddSC_boss_pyroguard_emberseer();
@@ -160,7 +159,6 @@ void AddEasternKingdomsScripts()
AddSC_boss_halycon();
AddSC_boss_highlordomokk();
AddSC_boss_overlordwyrmthalak();
AddSC_boss_shadowvosh();
AddSC_boss_thebeast();
AddSC_boss_warmastervoone();
AddSC_boss_pyroguard_emberseer();