fix(Scripts/TheSlavePens): port SAI from bosses to C++ (#16169)
* fix * add sql 1 * add sql 2 * remove extra lines * remove dumb stuff keywords in "comment" were messing up the statement * same story todo: get better at SQL * better formatting + two sql statements together * remove old sql query * last fix * fixes to header enum * fix sql to have a more universal format * E e * final sql fix
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'boss_mennu_the_betrayer', `AIName` = '' WHERE `entry` = 17941;
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'boss_quagmirran', `AIName` = '' WHERE `entry` = 17942;
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'boss_rokmar_the_crackler', `AIName` = '' WHERE `entry` = 17991;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (17941, 17942, 17991) AND `source_type` = 0;
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* 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 "the_slave_pens.h"
|
||||||
|
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
|
SPELL_LIGHTNING_BOLT = 35010,
|
||||||
|
SPELL_HEALING_WARD = 34980,
|
||||||
|
SPELL_EARTHGRAB_TOTEM = 31981,
|
||||||
|
SPELL_STONESKIN_TOTEM = 31985,
|
||||||
|
SPELL_NOVA_TOTEM = 31991
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Text
|
||||||
|
{
|
||||||
|
SAY_AGGRO = 1,
|
||||||
|
SAY_KILL = 2,
|
||||||
|
SAY_JUST_DIED = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
struct boss_mennu_the_betrayer : public BossAI
|
||||||
|
{
|
||||||
|
boss_mennu_the_betrayer(Creature* creature) : BossAI(creature, DATA_MENNU_THE_BETRAYER)
|
||||||
|
{
|
||||||
|
scheduler.SetValidator([this]
|
||||||
|
{
|
||||||
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
_Reset();
|
||||||
|
|
||||||
|
ScheduleHealthCheckEvent(60, [&] {
|
||||||
|
DoCastSelf(SPELL_HEALING_WARD);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustSummoned(Creature* summon) override
|
||||||
|
{
|
||||||
|
summon->GetMotionMaster()->Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
_JustEngagedWith();
|
||||||
|
Talk(SAY_AGGRO);
|
||||||
|
|
||||||
|
scheduler.Schedule(5s, 8s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_LIGHTNING_BOLT);
|
||||||
|
context.Repeat(7s, 10s);
|
||||||
|
}).Schedule(20s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_NOVA_TOTEM);
|
||||||
|
context.Repeat(26s);
|
||||||
|
}).Schedule(19200ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_EARTHGRAB_TOTEM);
|
||||||
|
context.Repeat(26s);
|
||||||
|
}).Schedule(18s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_STONESKIN_TOTEM);
|
||||||
|
context.Repeat(26s);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustDied(Unit* /*killer*/) override
|
||||||
|
{
|
||||||
|
_JustDied();
|
||||||
|
Talk(SAY_JUST_DIED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
|
{
|
||||||
|
Talk(SAY_KILL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void AddSC_boss_mennu_the_betrayer()
|
||||||
|
{
|
||||||
|
RegisterTheSlavePensCreatureAI(boss_mennu_the_betrayer);
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* 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 "the_slave_pens.h"
|
||||||
|
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
|
SPELL_ACID_SPRAY = 38153,
|
||||||
|
SPELL_CLEAVE = 40504,
|
||||||
|
SPELL_POISON_BOLT_VOLLEY_N = 34780,
|
||||||
|
SPELL_POISON_BOLT_VOLLEY_H = 39340,
|
||||||
|
SPELL_UPPERCUT = 32055
|
||||||
|
};
|
||||||
|
|
||||||
|
struct boss_quagmirran : public BossAI
|
||||||
|
{
|
||||||
|
boss_quagmirran(Creature* creature) : BossAI(creature, DATA_QUAGMIRRAN)
|
||||||
|
{
|
||||||
|
scheduler.SetValidator([this]
|
||||||
|
{
|
||||||
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
_Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
_JustEngagedWith();
|
||||||
|
|
||||||
|
scheduler.Schedule(9100ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_CLEAVE);
|
||||||
|
context.Repeat(18800ms, 24800ms);
|
||||||
|
}).Schedule(20300ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_UPPERCUT);
|
||||||
|
context.Repeat(21800ms);
|
||||||
|
}).Schedule(25200ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_ACID_SPRAY);
|
||||||
|
context.Repeat(25s);
|
||||||
|
}).Schedule(31800ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastSelf(DUNGEON_MODE(SPELL_POISON_BOLT_VOLLEY_N, SPELL_POISON_BOLT_VOLLEY_H));
|
||||||
|
context.Repeat(24400ms);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void AddSC_boss_quagmirran()
|
||||||
|
{
|
||||||
|
RegisterTheSlavePensCreatureAI(boss_quagmirran);
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* 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 "the_slave_pens.h"
|
||||||
|
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
|
SPELL_ENSNARING_MOSS = 31948,
|
||||||
|
SPELL_FRENZY = 34970,
|
||||||
|
SPELL_GRIEVOUS_WOUND_N = 31956,
|
||||||
|
SPELL_GRIEVOUS_WOUND_H = 38801,
|
||||||
|
SPELL_WATER_SPIT = 35008
|
||||||
|
};
|
||||||
|
|
||||||
|
struct boss_rokmar_the_crackler : public BossAI
|
||||||
|
{
|
||||||
|
boss_rokmar_the_crackler(Creature* creature) : BossAI(creature, DATA_ROKMAR_THE_CRACKLER)
|
||||||
|
{
|
||||||
|
scheduler.SetValidator([this]
|
||||||
|
{
|
||||||
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
_Reset();
|
||||||
|
|
||||||
|
ScheduleHealthCheckEvent(20, [&] {
|
||||||
|
DoCastSelf(SPELL_FRENZY);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
_JustEngagedWith();
|
||||||
|
|
||||||
|
scheduler.Schedule(8s, [this] (TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastVictim(DUNGEON_MODE(SPELL_GRIEVOUS_WOUND_N, SPELL_GRIEVOUS_WOUND_H));
|
||||||
|
context.Repeat(20700ms);
|
||||||
|
}).Schedule(15300ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastRandomTarget(SPELL_ENSNARING_MOSS);
|
||||||
|
context.Repeat(26s);
|
||||||
|
}).Schedule(10700ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_WATER_SPIT);
|
||||||
|
context.Repeat(19s);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void AddSC_boss_rokmar_the_crackler()
|
||||||
|
{
|
||||||
|
RegisterTheSlavePensCreatureAI(boss_rokmar_the_crackler);
|
||||||
|
}
|
||||||
@@ -27,10 +27,11 @@ uint32 const EncounterCount = 3;
|
|||||||
|
|
||||||
enum SPDataTypes
|
enum SPDataTypes
|
||||||
{
|
{
|
||||||
DATA_MENNU_THE_BETRAYER = 1,
|
DATA_MENNU_THE_BETRAYER = 0,
|
||||||
DATA_ROKMAR_THE_CRACKLER = 2,
|
DATA_ROKMAR_THE_CRACKLER = 1,
|
||||||
DATA_QUAGMIRRAN = 3,
|
DATA_QUAGMIRRAN = 2,
|
||||||
DATA_AHUNE = 4,
|
DATA_AHUNE = 3,
|
||||||
|
MAX_ENCOUNTER = 4,
|
||||||
DATA_AHUNE_BUNNY = 5,
|
DATA_AHUNE_BUNNY = 5,
|
||||||
DATA_FROZEN_CORE = 6,
|
DATA_FROZEN_CORE = 6,
|
||||||
DATA_FLAMECALLER_000 = 7,
|
DATA_FLAMECALLER_000 = 7,
|
||||||
@@ -65,6 +66,8 @@ enum SPCreaturesIds
|
|||||||
NPC_SHAMAN_BEAM_BUNNY_002 = 25966,
|
NPC_SHAMAN_BEAM_BUNNY_002 = 25966,
|
||||||
NPC_WHISP_DEST_BUNNY = 26120,
|
NPC_WHISP_DEST_BUNNY = 26120,
|
||||||
NPC_WHISP_SOURCE_BUNNY = 26121,
|
NPC_WHISP_SOURCE_BUNNY = 26121,
|
||||||
|
NPC_MENNU_THE_BETRAYER = 17941,
|
||||||
|
NPC_ROKMAR_THE_CRACKLER = 17991,
|
||||||
NPC_QUAGMIRRAN = 17942
|
NPC_QUAGMIRRAN = 17942
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,4 +83,6 @@ inline AI* GetTheSlavePensAI(T* obj)
|
|||||||
return GetInstanceAI<AI>(obj, SPScriptName);
|
return GetInstanceAI<AI>(obj, SPScriptName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define RegisterTheSlavePensCreatureAI(ai_name) RegisterCreatureAIWithFactory (ai_name, GetTheSlavePensAI)
|
||||||
|
|
||||||
#endif // SLAVE_PENS_H
|
#endif // SLAVE_PENS_H
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ void AddSC_boss_the_black_stalker();
|
|||||||
void AddSC_instance_the_underbog();
|
void AddSC_instance_the_underbog();
|
||||||
void AddSC_the_slave_pens(); // The Slave Pens
|
void AddSC_the_slave_pens(); // The Slave Pens
|
||||||
void AddSC_boss_ahune();
|
void AddSC_boss_ahune();
|
||||||
|
void AddSC_boss_mennu_the_betrayer();
|
||||||
|
void AddSC_boss_rokmar_the_crackler();
|
||||||
|
void AddSC_boss_quagmirran();
|
||||||
void AddSC_instance_the_slave_pens();
|
void AddSC_instance_the_slave_pens();
|
||||||
void AddSC_boss_gruul(); //Gruul's Lair
|
void AddSC_boss_gruul(); //Gruul's Lair
|
||||||
void AddSC_boss_high_king_maulgar();
|
void AddSC_boss_high_king_maulgar();
|
||||||
@@ -154,8 +157,11 @@ void AddOutlandScripts()
|
|||||||
AddSC_boss_ghazan();
|
AddSC_boss_ghazan();
|
||||||
AddSC_boss_the_black_stalker();
|
AddSC_boss_the_black_stalker();
|
||||||
AddSC_instance_the_underbog();
|
AddSC_instance_the_underbog();
|
||||||
AddSC_the_slave_pens(); // The Slave Pens
|
AddSC_the_slave_pens(); //CR The Slave Pens
|
||||||
AddSC_boss_ahune();
|
AddSC_boss_ahune();
|
||||||
|
AddSC_boss_mennu_the_betrayer();
|
||||||
|
AddSC_boss_rokmar_the_crackler();
|
||||||
|
AddSC_boss_quagmirran();
|
||||||
AddSC_instance_the_slave_pens();
|
AddSC_instance_the_slave_pens();
|
||||||
AddSC_boss_gruul(); //Gruul's Lair
|
AddSC_boss_gruul(); //Gruul's Lair
|
||||||
AddSC_boss_high_king_maulgar();
|
AddSC_boss_high_king_maulgar();
|
||||||
|
|||||||
Reference in New Issue
Block a user