fix(Script/Creature): Script warlock imp (#5960)
* fix(Core/Creature): Script warlock imp * creature * Update pet_warlock.cpp
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1621466398169598700');
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'npc_pet_warlock_imp' WHERE `entry` = 416;
|
||||||
@@ -16,6 +16,7 @@ set(scripts_STAT_SRCS
|
|||||||
${AC_SCRIPTS_DIR}/Pet/pet_mage.cpp
|
${AC_SCRIPTS_DIR}/Pet/pet_mage.cpp
|
||||||
${AC_SCRIPTS_DIR}/Pet/pet_priest.cpp
|
${AC_SCRIPTS_DIR}/Pet/pet_priest.cpp
|
||||||
${AC_SCRIPTS_DIR}/Pet/pet_shaman.cpp
|
${AC_SCRIPTS_DIR}/Pet/pet_shaman.cpp
|
||||||
|
${AC_SCRIPTS_DIR}/Pet/pet_warlock.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ADD_SCRIPT_LOADER("Pet" "ScriptLoader.h")
|
AC_ADD_SCRIPT_LOADER("Pet" "ScriptLoader.h")
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ordered alphabetically using scriptname.
|
||||||
|
* Scriptnames of files in this file should be prefixed with "npc_pet_warlock_".
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ScriptedCreature.h"
|
||||||
|
#include "ScriptMgr.h"
|
||||||
|
|
||||||
|
enum WarlockSpells
|
||||||
|
{
|
||||||
|
SPELL_WARLOCK_PHASE_SHIFT = 4511, // Imp spell
|
||||||
|
};
|
||||||
|
|
||||||
|
class npc_pet_warlock_imp : public CreatureScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_pet_warlock_imp() : CreatureScript("npc_pet_warlock_imp") { }
|
||||||
|
|
||||||
|
struct npc_pet_warlock_impAI : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_pet_warlock_impAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
|
||||||
|
void EnterCombat(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
me->RemoveAurasDueToSpell(SPELL_WARLOCK_PHASE_SHIFT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
|
{
|
||||||
|
return new npc_pet_warlock_impAI(creature);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void AddSC_warlock_pet_scripts()
|
||||||
|
{
|
||||||
|
new npc_pet_warlock_imp();
|
||||||
|
}
|
||||||
@@ -565,6 +565,7 @@ void AddSC_hunter_pet_scripts();
|
|||||||
void AddSC_mage_pet_scripts();
|
void AddSC_mage_pet_scripts();
|
||||||
void AddSC_priest_pet_scripts();
|
void AddSC_priest_pet_scripts();
|
||||||
void AddSC_shaman_pet_scripts();
|
void AddSC_shaman_pet_scripts();
|
||||||
|
void AddSC_warlock_pet_scripts();
|
||||||
|
|
||||||
// battlegrounds
|
// battlegrounds
|
||||||
|
|
||||||
@@ -1171,6 +1172,7 @@ void AddPetScripts()
|
|||||||
AddSC_mage_pet_scripts();
|
AddSC_mage_pet_scripts();
|
||||||
AddSC_priest_pet_scripts();
|
AddSC_priest_pet_scripts();
|
||||||
AddSC_shaman_pet_scripts();
|
AddSC_shaman_pet_scripts();
|
||||||
|
AddSC_warlock_pet_scripts();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user