diff options
| author | ZenoX92 <ZenoX92@users.noreply.github.com> | 2017-10-10 17:11:34 +0200 |
|---|---|---|
| committer | Killyana <morphone1@gmail.com> | 2017-10-10 17:11:34 +0200 |
| commit | ef09ea484b492d8b1a38e7c6749e6e1c4a8cc0c4 (patch) | |
| tree | 298ff9e8dbb52202869764a6cac6a4f2ae713077 /src | |
| parent | 6fea15fefa539029a08f8a2861d90dd812534de2 (diff) | |
Creature/Script: Convert Spitelash Naga cpp to SAI
Closes #20558
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_azshara.cpp | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp index 0813b05705f..bea3ac7dd73 100644 --- a/src/server/scripts/Kalimdor/zone_azshara.cpp +++ b/src/server/scripts/Kalimdor/zone_azshara.cpp @@ -24,104 +24,6 @@ #include "ScriptedGossip.h" #include "SpellInfo.h" -/*###### -## npc_spitelashes -######*/ - -enum Spitelashes -{ - SPELL_POLYMORPH_RANK1 = 118, - SPELL_POLYMORPH_RANK2 = 12824, - SPELL_POLYMORPH_RANK3 = 12825, - SPELL_POLYMORPH_RANK4 = 12826, - SPELL_POLYMORPH = 29124, - SPELL_POLYMORPH_BACKFIRE = 28406, - SPELL_REMOVE_POLYMORPH = 6924 -}; - -class npc_spitelashes : public CreatureScript -{ -public: - npc_spitelashes() : CreatureScript("npc_spitelashes") { } - - struct npc_spitelashesAI : public ScriptedAI - { - npc_spitelashesAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - } - - void Initialize() - { - morphtimer = 0; - spellhit = false; - } - - uint32 morphtimer; - bool spellhit; - - void Reset() override - { - Initialize(); - } - - void EnterCombat(Unit* /*who*/) override { } - - void SpellHit(Unit* unit, SpellInfo const* spell) override - { - if (spellhit) - return; - - switch (spell->Id) - { - case SPELL_POLYMORPH_RANK1: - case SPELL_POLYMORPH_RANK2: - case SPELL_POLYMORPH_RANK3: - case SPELL_POLYMORPH_RANK4: - if (Player* player = unit->ToPlayer()) - if (player->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE) - { - spellhit = true; - DoCast(me, SPELL_POLYMORPH); - } - break; - default: - break; - } - } - - void UpdateAI(uint32 diff) override - { - // we mustn't remove the Creature in the same round in which we cast the summon spell, otherwise there will be no summons - if (spellhit && morphtimer >= 5000) - { - me->DespawnOrUnsummon(); - return; - } - // walk 5 seconds before summoning - if (spellhit && morphtimer < 5000) - { - morphtimer += diff; - if (morphtimer >= 5000) - { - DoCast(me, SPELL_POLYMORPH_BACKFIRE); // summon copies - DoCast(me, SPELL_REMOVE_POLYMORPH); // visual explosion - } - } - if (!UpdateVictim()) - return; - - /// @todo add abilities for the different creatures - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_spitelashesAI(creature); - } -}; - /*#### # npc_rizzle_sprysprocket ####*/ @@ -468,7 +370,6 @@ public: void AddSC_azshara() { - new npc_spitelashes(); new npc_rizzle_sprysprocket(); new npc_depth_charge(); } |
