fix(Scripts/NPC): Arcanite Dragonling (#13233)
* fix(Scripts/NPC): Arcanite Dragonling * update
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_arcanite_dragonling' WHERE `entry`=12473;
|
||||||
@@ -2542,6 +2542,64 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ArcaniteDragonling
|
||||||
|
{
|
||||||
|
SPELL_FLAME_BUFFET = 9658,
|
||||||
|
SPELL_FLAME_BREATH = 8873,
|
||||||
|
|
||||||
|
EVENT_FLAME_BUFFET = 1,
|
||||||
|
EVENT_FLAME_BREATH = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
struct npc_arcanite_dragonling : public ScriptedAI
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_arcanite_dragonling(Creature* creature) : ScriptedAI(creature)
|
||||||
|
{
|
||||||
|
creature->SetCanModifyStats(true);
|
||||||
|
creature->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
me->SetPvP(true);
|
||||||
|
events.Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnterCombat(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
events.ScheduleEvent(EVENT_FLAME_BUFFET, 4s);
|
||||||
|
events.ScheduleEvent(EVENT_FLAME_BREATH, 12s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IsSummonedBy(Unit* summoner) override
|
||||||
|
{
|
||||||
|
me->GetMotionMaster()->MoveFollow(summoner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
if (!UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
|
events.Update(diff);
|
||||||
|
|
||||||
|
switch (events.ExecuteEvent())
|
||||||
|
{
|
||||||
|
case EVENT_FLAME_BUFFET:
|
||||||
|
DoCastVictim(SPELL_FLAME_BUFFET);
|
||||||
|
events.Repeat(12s);
|
||||||
|
break;
|
||||||
|
case EVENT_FLAME_BREATH:
|
||||||
|
DoCastVictim(SPELL_FLAME_BREATH);
|
||||||
|
events.Repeat(24s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
DoMeleeAttackIfReady();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_npcs_special()
|
void AddSC_npcs_special()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -2568,4 +2626,5 @@ void AddSC_npcs_special()
|
|||||||
new npc_firework();
|
new npc_firework();
|
||||||
new npc_spring_rabbit();
|
new npc_spring_rabbit();
|
||||||
new npc_stable_master();
|
new npc_stable_master();
|
||||||
|
RegisterCreatureAI(npc_arcanite_dragonling);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user