forked from cooler-SAI/pandaria_5.4.8
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from Legends-of-Azeroth/zTerragor-patch-1
Port from JadeCore547 Source.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
/// | ||
/// MILLENIUM-STUDIO | ||
/// Copyright 2015 Millenium-studio SARL | ||
/// All Rights Reserved. | ||
/// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
#include "ScriptMgr.h" | ||
#include "SpellScript.h" | ||
#include "SpellAuraEffects.h" | ||
#include "GridNotifiers.h" | ||
#include "ScriptedCreature.h" | ||
|
||
/// Mini Mana Bomb - 65903 | ||
class npc_toy_mini_maba_bomb : public CreatureScript | ||
{ | ||
public: | ||
npc_toy_mini_maba_bomb() : CreatureScript("npc_toy_mini_maba_bomb") { } | ||
|
||
enum eSpell | ||
{ | ||
ArcaneExplosionVisualLarge = 98122 | ||
}; | ||
|
||
struct npc_toy_mini_maba_bombAI : public ScriptedAI | ||
{ | ||
npc_toy_mini_maba_bombAI(Creature* p_Creature) : ScriptedAI(p_Creature) { } | ||
|
||
void Reset() override | ||
{ | ||
AddTimedDelayedOperation(4 * TimeConstants::IN_MILLISECONDS + 900, [this]() -> void | ||
{ | ||
me->CastSpell(me, eSpell::ArcaneExplosionVisualLarge, true); | ||
me->DespawnOrUnsummon(); | ||
}); | ||
} | ||
|
||
void UpdateAI(uint32 const p_Diff) override | ||
{ | ||
UpdateOperations(p_Diff); | ||
} | ||
}; | ||
|
||
CreatureAI* GetAI(Creature* p_Creature) const override | ||
{ | ||
return new npc_toy_mini_maba_bombAI(p_Creature); | ||
} | ||
}; | ||
|
||
void AddSC_npc_toy() | ||
{ | ||
new npc_toy_mini_maba_bomb(); | ||
} |