[svn] * Proper SVN structure
[st4rcore.git] / src / bindings / scripts / scripts / zone / blackrock_spire / boss_quartermaster_zigris.cpp
blob6955ae8ad7125f25a006cc42c76455e3ae79b88a
1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 /* ScriptData
18 SDName: Boss_Quartmaster_Zigris
19 SD%Complete: 100
20 SDComment: Needs revision
21 SDCategory: Blackrock Spire
22 EndScriptData */
24 #include "precompiled.h"
26 #define SPELL_SHOOT 16496
27 #define SPELL_STUNBOMB 16497
28 #define SPELL_HEALING_POTION 15504
29 #define SPELL_HOOKEDNET 15609
31 struct MANGOS_DLL_DECL boss_quatermasterzigrisAI : public ScriptedAI
33 boss_quatermasterzigrisAI(Creature *c) : ScriptedAI(c) {Reset();}
35 uint32 Shoot_Timer;
36 uint32 StunBomb_Timer;
37 //uint32 HelingPotion_Timer;
39 void Reset()
41 Shoot_Timer = 1000;
42 StunBomb_Timer = 16000;
43 //HelingPotion_Timer = 25000;
46 void Aggro(Unit *who)
50 void UpdateAI(const uint32 diff)
52 //Return since we have no target
53 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
54 return;
56 //Shoot_Timer
57 if (Shoot_Timer < diff)
59 DoCast(m_creature->getVictim(),SPELL_SHOOT);
60 Shoot_Timer = 500;
61 }else Shoot_Timer -= diff;
63 //StunBomb_Timer
64 if (StunBomb_Timer < diff)
66 DoCast(m_creature->getVictim(),SPELL_STUNBOMB);
67 StunBomb_Timer = 14000;
68 }else StunBomb_Timer -= diff;
70 DoMeleeAttackIfReady();
73 CreatureAI* GetAI_boss_quatermasterzigris(Creature *_Creature)
75 return new boss_quatermasterzigrisAI (_Creature);
78 void AddSC_boss_quatermasterzigris()
80 Script *newscript;
81 newscript = new Script;
82 newscript->Name="quartermaster_zigris";
83 newscript->GetAI = GetAI_boss_quatermasterzigris;
84 m_scripts[nrscripts++] = newscript;