Move hardcoded aiscripts to database for map 565

@aaron02  there are some scripts left, check it out maybe we can move them too.
Related to #1113
This commit is contained in:
Zyres
2023-07-09 10:44:50 +02:00
parent 01c34cf071
commit a671a0eb9d
4 changed files with 10 additions and 47 deletions

View File

@@ -0,0 +1,9 @@
-- Gruuls Lair (565)
REPLACE INTO `creature_ai_scripts` VALUES ('8606', '12340', '19389', '4', '0', '5', '1', '0', '20', '39174', '0', '0', '2', '15000', '15000', '0', '100', '0', '0', 'Lair Brute - Cleave');
REPLACE INTO `creature_ai_scripts` VALUES ('8606', '12340', '19389', '4', '0', '5', '1', '0', '8', '39171', '0', '0', '2', '20000', '20000', '0', '100', '0', '0', 'Lair Brute - Mortal Strike');
REPLACE INTO `creature_ai_scripts` VALUES ('8606', '12340', '21350', '4', '0', '5', '1', '0', '8', '22884', '0', '0', '0', '20000', '20000', '0', '100', '0', '0', 'Gronn-Priest - Psychic Scream');
REPLACE INTO `creature_ai_scripts` VALUES ('8606', '12340', '21350', '4', '0', '5', '1', '0', '8', '36679', '0', '0', '5', '25000', '25000', '0', '100', '0', '0', 'Gronn-Priest - Renew');
REPLACE INTO `creature_ai_scripts` VALUES ('8606', '12340', '21350', '4', '0', '5', '1', '0', '8', '36678', '0', '0', '5', '30000', '30000', '0', '100', '0', '0', 'Gronn-Priest - Heal');
REPLACE INTO `creature_ai_scripts` VALUES ('8606', '12340', '18847', '4', '0', '5', '1', '0', '10', '33086', '0', '0', '2', '10000', '10000', '0', '100', '0', '0', 'Gronn-Priest - Heal');
INSERT INTO `world_db_version` VALUES ('130', '20230709-01_hardcoded_ai_scripts');

View File

@@ -195,8 +195,6 @@ void GruulsLairInstanceScript::setLocalData(uint32_t type, uint32_t data)
/// Creature: Lair Brute
LairBruteAI::LairBruteAI(Creature* pCreature) : CreatureAIScript(pCreature)
{
addAISpell(SPELL_CLEAVE, 20.0f, TARGET_ATTACKING, 0, 15);
addAISpell(SPELL_MORTALSTRIKE, 8.0f, TARGET_ATTACKING, 0, 20);
addAISpell(SPELL_CHARGE, 7.0f, TARGET_ATTACKING, 0, 35);
}
@@ -217,30 +215,6 @@ void LairBruteAI::OnCastSpell(uint32_t spellId)
}
}
//////////////////////////////////////////////////////////////////////////////////////////
/// Creature: Gronn Priest
GronnPriestAI::GronnPriestAI(Creature* pCreature) : CreatureAIScript(pCreature)
{
addAISpell(SPELL_PSYCHICSCREAM, 8.0f, TARGET_SELF, 0, 20);
auto renew = addAISpell(SPELL_RENEW, 8.0f, TARGET_RANDOM_FRIEND, 0, 25);
renew->setMinMaxDistance(0.0f, 100.0f);
auto heal = addAISpell(SPELL_HEAL_GP, 8.0f, TARGET_RANDOM_FRIEND, 2, 30);
heal->setMinMaxDistance(0.0f, 100.0f);
}
CreatureAIScript* GronnPriestAI::Create(Creature* pCreature) { return new GronnPriestAI(pCreature); }
//////////////////////////////////////////////////////////////////////////////////////////
/// Creature: Wild Fell Stalker
WildFelStalkerAI::WildFelStalkerAI(Creature* pCreature) : CreatureAIScript(pCreature)
{
addAISpell(SPELL_WILD_BITE, 10.0f, TARGET_ATTACKING, 0, 10);
}
CreatureAIScript* WildFelStalkerAI::Create(Creature* pCreature) { return new WildFelStalkerAI(pCreature); }
void SetupGruulsLair(ScriptMgr* mgr)
{
// Instance
@@ -253,8 +227,6 @@ void SetupGruulsLair(ScriptMgr* mgr)
// Creatures
mgr->register_creature_script(NPC_LAIR_BRUTE, &LairBruteAI::Create);
mgr->register_creature_script(NPC_GRONN_PRIEST, &GronnPriestAI::Create);
mgr->register_creature_script(NPC_WILD_FEL_STALKER, &WildFelStalkerAI::Create);
// Boss
mgr->register_creature_script(NPC_KIGGLER_THE_CRAZED, &KigglerTheCrazedAI::Create);

View File

@@ -137,21 +137,3 @@ public:
void OnCastSpell(uint32_t spellId) override;
};
//////////////////////////////////////////////////////////////////////////////////////////
/// Creature: Gronn Priest
class GronnPriestAI : public CreatureAIScript
{
public:
static CreatureAIScript* Create(Creature* pCreature);
explicit GronnPriestAI(Creature* pCreature);
};
//////////////////////////////////////////////////////////////////////////////////////////
/// Creature: Wild Fell Stalker
class WildFelStalkerAI : public CreatureAIScript
{
public:
static CreatureAIScript* Create(Creature* c);
explicit WildFelStalkerAI(Creature* pCreature);
};

View File

@@ -42,7 +42,7 @@
// DB version
static const char* REQUIRED_CHAR_DB_VERSION = "20220415-00_account_instance_times";
static const char* REQUIRED_WORLD_DB_VERSION = "20230709-00_hardcoded_ai_scripts";
static const char* REQUIRED_WORLD_DB_VERSION = "20230709-01_hardcoded_ai_scripts";
volatile bool Master::m_stopEvent = false;