fix(Scripts/Outland): add missing C++ code and remove SAI scripts from Tavarok and Darkweaver Syth (#16178)

* initial

* whitespace1

* Update tavarok_darkweaver_sai_removal.sql

fix sql
This commit is contained in:
Dan
2023-05-12 13:23:56 +02:00
committed by GitHub
parent 4afe8fef2c
commit 79954c34d4
5 changed files with 203 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "mana_tombs.h"
enum Spells
{
SPELL_EARTHQUAKE = 33919,
SPELL_CRYSTAL_PRISON = 32361,
SPELL_ARCING_SMASH_N = 8374,
SPELL_ARCING_SMASH_H = 38761
};
struct boss_tavarok : public BossAI
{
boss_tavarok(Creature* creature) : BossAI(creature, DATA_TAVAROK)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
void Reset() override
{
_Reset();
}
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
scheduler.Schedule(10s, 14200ms, [this](TaskContext context)
{
DoCastSelf(SPELL_EARTHQUAKE);
context.Repeat(20s, 31s);
}).Schedule(12s, 22s, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_CRYSTAL_PRISON);
context.Repeat(15s, 22s);
}).Schedule(5900ms, [this](TaskContext context)
{
DoCastVictim(DUNGEON_MODE(SPELL_ARCING_SMASH_N, SPELL_ARCING_SMASH_H));
context.Repeat(8s, 12s);
});
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
}
void KilledUnit(Unit* /*victim*/) override
{
}
};
void AddSC_boss_tavarok()
{
RegisterManaTombsCreatureAI(boss_tavarok);
}

View File

@@ -40,4 +40,6 @@ inline AI* GetManaTombsAI(T* obj)
return GetInstanceAI<AI>(obj, MTScriptName);
}
#define RegisterManaTombsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetManaTombsAI)
#endif // MANA_TOMBS_H_

View File

@@ -0,0 +1,115 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "sethekk_halls.h"
enum Spells
{
SPELL_FLAME_SHOCK_N = 15039,
SPELL_FLAME_SHOCK_H = 15616,
SPELL_ARCANE_SHOCK_N = 33534,
SPELL_ARCANE_SHOCK_H = 38135,
SPELL_FROST_SHOCK_N = 12548,
SPELL_FROST_SHOCK_H = 21401,
SPELL_SHADOW_SHOCK_N = 33620,
SPELL_SHADOW_SHOCK_H = 38137,
SPELL_CHAIN_LIGHTNING_N = 15659,
SPELL_CHAIN_LIGHTNING_H = 15305,
SPELL_SUMMON_ARC_ELE = 33538,
SPELL_SUMMON_FIRE_ELE = 33537,
SPELL_SUMMON_FROST_ELE = 33539,
SPELL_SUMMON_SHADOW_ELE = 33540
};
enum Text
{
SAY_SUMMON = 0,
SAY_AGGRO = 1,
SAY_SLAY = 2,
SAY_DEATH = 3
};
struct boss_darkweaver_syth : public BossAI
{
boss_darkweaver_syth(Creature* creature) : BossAI(creature, DATA_DARKWEAVER_SYTH)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
void Reset() override
{
_Reset();
ScheduleHealthCheckEvent({90, 50, 10}, [&] {
Talk(SAY_SUMMON);
DoCastSelf(SPELL_SUMMON_ARC_ELE);
DoCastSelf(SPELL_SUMMON_FIRE_ELE);
DoCastSelf(SPELL_SUMMON_FROST_ELE);
DoCastSelf(SPELL_SUMMON_SHADOW_ELE);
});
}
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
Talk(SAY_AGGRO);
scheduler.Schedule(2s, [this](TaskContext context)
{
DoCastRandomTarget(DUNGEON_MODE(SPELL_FLAME_SHOCK_N, SPELL_FLAME_SHOCK_H));
context.Repeat(10s, 15s);
}).Schedule(4s, [this](TaskContext context)
{
DoCastRandomTarget(DUNGEON_MODE(SPELL_ARCANE_SHOCK_N, SPELL_ARCANE_SHOCK_H));
context.Repeat(10s, 15s);
}).Schedule(6s, [this](TaskContext context)
{
DoCastRandomTarget(DUNGEON_MODE(SPELL_FROST_SHOCK_N, SPELL_FROST_SHOCK_H));
context.Repeat(10s, 15s);
}).Schedule(8s, [this](TaskContext context)
{
DoCastRandomTarget(DUNGEON_MODE(SPELL_SHADOW_SHOCK_N, SPELL_SHADOW_SHOCK_H));
context.Repeat(10s, 15s);
}).Schedule(15s, [this](TaskContext context)
{
DoCastRandomTarget(DUNGEON_MODE(SPELL_CHAIN_LIGHTNING_N, SPELL_CHAIN_LIGHTNING_H));
context.Repeat(10s, 15s);
});
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/) override
{
Talk(SAY_SLAY);
}
};
void AddSC_boss_darkweaver_syth()
{
RegisterSethekkHallsCreatureAI(boss_darkweaver_syth);
}

View File

@@ -21,9 +21,11 @@ void AddSC_instance_auchenai_crypts();
void AddSC_boss_shirrak_the_dead_watcher();
void AddSC_boss_nexusprince_shaffar(); //Auchindoun Mana Tombs
void AddSC_boss_pandemonius();
void AddSC_boss_tavarok();
void AddSC_instance_mana_tombs();
void AddSC_boss_talon_king_ikiss(); //Auchindoun Sekketh Halls
void AddSC_boss_anzu();
void AddSC_boss_darkweaver_syth();
void AddSC_instance_sethekk_halls();
void AddSC_instance_shadow_labyrinth(); //Auchindoun Shadow Labyrinth
void AddSC_boss_ambassador_hellmaw();
@@ -122,9 +124,11 @@ void AddOutlandScripts()
AddSC_boss_shirrak_the_dead_watcher();
AddSC_boss_nexusprince_shaffar(); //Auchindoun Mana Tombs
AddSC_boss_pandemonius();
AddSC_boss_tavarok();
AddSC_instance_mana_tombs();
AddSC_boss_talon_king_ikiss(); //Auchindoun Sekketh Halls
AddSC_boss_anzu();
AddSC_boss_darkweaver_syth();
AddSC_instance_sethekk_halls();
AddSC_instance_shadow_labyrinth(); //Auchindoun Shadow Labyrinth
AddSC_boss_ambassador_hellmaw();