1 /* Copyright (C) 2006 - 2010 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
18 SDName: Boss_Gahz'ranka
20 SDComment: Massive Geyser with knockback not working. Spell buggy.
24 #include "precompiled.h"
26 #define SPELL_FROSTBREATH 16099
27 #define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon...
28 #define SPELL_SLAM 24326
30 struct MANGOS_DLL_DECL boss_gahzrankaAI
: public ScriptedAI
32 boss_gahzrankaAI(Creature
* pCreature
) : ScriptedAI(pCreature
) {Reset();}
33 uint32 Frostbreath_Timer
;
34 uint32 MassiveGeyser_Timer
;
39 Frostbreath_Timer
= 8000;
40 MassiveGeyser_Timer
= 25000;
44 void UpdateAI(const uint32 diff
)
46 //Return since we have no target
47 if (!m_creature
->SelectHostileTarget() || !m_creature
->getVictim())
51 if (Frostbreath_Timer
< diff
)
53 DoCastSpellIfCan(m_creature
->getVictim(),SPELL_FROSTBREATH
);
54 Frostbreath_Timer
= urand(7000, 11000);
55 }else Frostbreath_Timer
-= diff
;
58 if (MassiveGeyser_Timer
< diff
)
60 DoCastSpellIfCan(m_creature
->getVictim(),SPELL_MASSIVEGEYSER
);
63 MassiveGeyser_Timer
= urand(22000, 32000);
64 }else MassiveGeyser_Timer
-= diff
;
67 if (Slam_Timer
< diff
)
69 DoCastSpellIfCan(m_creature
->getVictim(),SPELL_SLAM
);
70 Slam_Timer
= urand(12000, 20000);
71 }else Slam_Timer
-= diff
;
73 DoMeleeAttackIfReady();
76 CreatureAI
* GetAI_boss_gahzranka(Creature
* pCreature
)
78 return new boss_gahzrankaAI(pCreature
);
81 void AddSC_boss_gahzranka()
84 newscript
= new Script
;
85 newscript
->Name
= "boss_gahzranka";
86 newscript
->GetAI
= &GetAI_boss_gahzranka
;
87 newscript
->RegisterSelf();