fix(Scripts/MagtheridonLair): Script Manticron Cube conditions (#16867)
* fix(Scripts/MagtheridonLair): Script Manticron Cube conditions Co-Authored-By: Lucas Nascimento <keader.android@gmail.com> * Create rev_1690769530684832000.sql Co-Authored-By: Lucas Nascimento <keader.android@gmail.com> * missing include * warning --------- Co-authored-by: Lucas Nascimento <keader.android@gmail.com>
This commit is contained in:
parent
aaabca1cd0
commit
93113edc7d
3 changed files with 25 additions and 1 deletions
|
|
@ -0,0 +1,2 @@
|
|||
--
|
||||
UPDATE `gameobject_template` SET `ScriptName` = 'go_manticron_cube' WHERE `entry` = 181713;
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellInfo.h"
|
||||
|
|
@ -47,6 +48,7 @@ enum Spells
|
|||
SPELL_BLAZE = 30541,
|
||||
SPELL_BLAZE_SUMMON = 30542,
|
||||
SPELL_BERSERK = 27680,
|
||||
SPELL_SHADOW_GRASP = 30410,
|
||||
SPELL_SHADOW_GRASP_VISUAL = 30166,
|
||||
SPELL_MIND_EXHAUSTION = 44032,
|
||||
SPELL_QUAKE = 30657,
|
||||
|
|
@ -327,10 +329,29 @@ class spell_magtheridon_quake : public SpellScript
|
|||
}
|
||||
};
|
||||
|
||||
class go_manticron_cube : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_manticron_cube() : GameObjectScript("go_manticron_cube") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/) override
|
||||
{
|
||||
if (player->HasAura(SPELL_MIND_EXHAUSTION) || player->HasAura(SPELL_SHADOW_GRASP))
|
||||
return true;
|
||||
|
||||
if (Creature* trigger = player->FindNearestCreature(NPC_HELLFIRE_RAID_TRIGGER, 10.0f))
|
||||
trigger->CastSpell(nullptr, SPELL_SHADOW_GRASP_VISUAL);
|
||||
|
||||
player->CastSpell((Unit*)nullptr, SPELL_SHADOW_GRASP, true);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_magtheridon()
|
||||
{
|
||||
RegisterMagtheridonsLairCreatureAI(boss_magtheridon);
|
||||
RegisterSpellScript(spell_magtheridon_blaze);
|
||||
RegisterSpellScript(spell_magtheridon_shadow_grasp);
|
||||
RegisterSpellScript(spell_magtheridon_quake);
|
||||
new go_manticron_cube();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ enum NpcIds
|
|||
{
|
||||
NPC_MAGTHERIDON = 17257,
|
||||
NPC_HELLFIRE_CHANNELER = 17256,
|
||||
NPC_HELLFIRE_WARDER = 18829
|
||||
NPC_HELLFIRE_WARDER = 18829,
|
||||
NPC_HELLFIRE_RAID_TRIGGER = 17376,
|
||||
};
|
||||
|
||||
enum GoIds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue