From e316869ee4c99a437249e4d24e0734d05bfbf9ac Mon Sep 17 00:00:00 2001 From: "malcromdev@gmail.com>" Date: Tue, 6 Apr 2010 21:32:35 -0230 Subject: remove CRLF from alterac_valley scripts. --HG-- branch : trunk --- .../alterac_valley/boss_balinda.cpp | 404 ++++++++++----------- .../alterac_valley/boss_drekthar.cpp | 274 +++++++------- .../alterac_valley/boss_galvangar.cpp | 258 ++++++------- .../alterac_valley/boss_vanndar.cpp | 256 ++++++------- 4 files changed, 596 insertions(+), 596 deletions(-) (limited to 'src') diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp index 6f5dfac570a..7f90ab15273 100644 --- a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp +++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp @@ -1,203 +1,203 @@ -/* Copyright (C) 2008 - 2010 TrinityCore - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "ScriptedPch.h" - -enum Spells -{ - SPELL_ARCANE_EXPLOSION = 46608, - SPELL_CONE_OF_COLD = 38384, - SPELL_FIREBALL = 46988, - SPELL_FROSTBOLT = 46987 -}; - -enum Yells -{ - YELL_AGGRO = -2100019, - YELL_EVADE = -2100020 -}; - -enum Creatures -{ - NPC_WATER_ELEMENTAL = 25040 -}; - -enum WaterElementalSpells -{ - SPELL_WATERBOLT = 46983 -}; - -struct mob_water_elementalAI : public ScriptedAI -{ - mob_water_elementalAI(Creature *c) : ScriptedAI(c) {} - - uint32 uiWaterBoltTimer; - uint64 uiBalindaGUID; - uint32 uiResetTimer; - - void Reset() - { - uiWaterBoltTimer = 3*IN_MILISECONDS; - uiResetTimer = 5*IN_MILISECONDS; - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - if(uiWaterBoltTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_WATERBOLT); - uiWaterBoltTimer = 5*IN_MILISECONDS; - } else uiWaterBoltTimer -= diff; - - // check if creature is not outside of building - if(uiResetTimer < diff) - { - if (Creature *pBalinda = Unit::GetCreature(*m_creature, uiBalindaGUID)) - if (m_creature->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50) - EnterEvadeMode(); - uiResetTimer = 5*IN_MILISECONDS; - } else uiResetTimer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -struct boss_balindaAI : public ScriptedAI -{ - boss_balindaAI(Creature *c) : ScriptedAI(c), Summons(m_creature) {} - - uint32 uiArcaneExplosionTimer; - uint32 uiConeOfColdTimer; - uint32 uiFireBoltTimer; - uint32 uiFrostboltTimer; - uint32 uiResetTimer; - uint32 uiWaterElementalTimer; - - SummonList Summons; - - void Reset() - { - uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS); - uiConeOfColdTimer = 8*IN_MILISECONDS; - uiFireBoltTimer = 1*IN_MILISECONDS; - uiFrostboltTimer = 4*IN_MILISECONDS; - uiResetTimer = 5*IN_MILISECONDS; - uiWaterElementalTimer = 0; - - Summons.DespawnAll(); - } - - void EnterCombat(Unit *who) - { - DoScriptText(YELL_AGGRO, m_creature); - } - - void JustRespawned() - { - Reset(); - } - - void JustSummoned(Creature* summoned) - { - ((mob_water_elementalAI*)summoned->AI())->uiBalindaGUID = m_creature->GetGUID(); - summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true)); - summoned->setFaction(m_creature->getFaction()); - Summons.Summon(summoned); - } - - void JustDied(Unit* Killer) - { - Summons.DespawnAll(); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - if (uiWaterElementalTimer < diff) - { - if(Summons.empty()) - m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILISECONDS); - uiWaterElementalTimer = 50*IN_MILISECONDS; - } else uiWaterElementalTimer -= diff; - - if (uiArcaneExplosionTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); - uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS); - } else uiArcaneExplosionTimer -= diff; - - if (uiConeOfColdTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_CONE_OF_COLD); - uiConeOfColdTimer = urand(10*IN_MILISECONDS,20*IN_MILISECONDS); - } else uiConeOfColdTimer -= diff; - - if (uiFireBoltTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_FIREBALL); - uiFireBoltTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS); - } else uiFireBoltTimer -= diff; - - if (uiFrostboltTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_FROSTBOLT); - uiFrostboltTimer = urand(4*IN_MILISECONDS,12*IN_MILISECONDS); - } else uiFrostboltTimer -= diff; - - - // check if creature is not outside of building - if(uiResetTimer < diff) - { - if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) - { - EnterEvadeMode(); - DoScriptText(YELL_EVADE, m_creature); - } - uiResetTimer = 5*IN_MILISECONDS; - } else uiResetTimer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_balinda(Creature *_Creature) -{ - return new boss_balindaAI (_Creature); -} - -CreatureAI* GetAI_mob_water_elemental(Creature *_Creature) -{ - return new mob_water_elementalAI (_Creature); -} - -void AddSC_boss_balinda() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_balinda"; - newscript->GetAI = &GetAI_boss_balinda; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_water_elemental"; - newscript->GetAI = &GetAI_mob_water_elemental; - newscript->RegisterSelf(); +/* Copyright (C) 2008 - 2010 TrinityCore + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "ScriptedPch.h" + +enum Spells +{ + SPELL_ARCANE_EXPLOSION = 46608, + SPELL_CONE_OF_COLD = 38384, + SPELL_FIREBALL = 46988, + SPELL_FROSTBOLT = 46987 +}; + +enum Yells +{ + YELL_AGGRO = -2100019, + YELL_EVADE = -2100020 +}; + +enum Creatures +{ + NPC_WATER_ELEMENTAL = 25040 +}; + +enum WaterElementalSpells +{ + SPELL_WATERBOLT = 46983 +}; + +struct mob_water_elementalAI : public ScriptedAI +{ + mob_water_elementalAI(Creature *c) : ScriptedAI(c) {} + + uint32 uiWaterBoltTimer; + uint64 uiBalindaGUID; + uint32 uiResetTimer; + + void Reset() + { + uiWaterBoltTimer = 3*IN_MILISECONDS; + uiResetTimer = 5*IN_MILISECONDS; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(uiWaterBoltTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_WATERBOLT); + uiWaterBoltTimer = 5*IN_MILISECONDS; + } else uiWaterBoltTimer -= diff; + + // check if creature is not outside of building + if(uiResetTimer < diff) + { + if (Creature *pBalinda = Unit::GetCreature(*m_creature, uiBalindaGUID)) + if (m_creature->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50) + EnterEvadeMode(); + uiResetTimer = 5*IN_MILISECONDS; + } else uiResetTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct boss_balindaAI : public ScriptedAI +{ + boss_balindaAI(Creature *c) : ScriptedAI(c), Summons(m_creature) {} + + uint32 uiArcaneExplosionTimer; + uint32 uiConeOfColdTimer; + uint32 uiFireBoltTimer; + uint32 uiFrostboltTimer; + uint32 uiResetTimer; + uint32 uiWaterElementalTimer; + + SummonList Summons; + + void Reset() + { + uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS); + uiConeOfColdTimer = 8*IN_MILISECONDS; + uiFireBoltTimer = 1*IN_MILISECONDS; + uiFrostboltTimer = 4*IN_MILISECONDS; + uiResetTimer = 5*IN_MILISECONDS; + uiWaterElementalTimer = 0; + + Summons.DespawnAll(); + } + + void EnterCombat(Unit *who) + { + DoScriptText(YELL_AGGRO, m_creature); + } + + void JustRespawned() + { + Reset(); + } + + void JustSummoned(Creature* summoned) + { + ((mob_water_elementalAI*)summoned->AI())->uiBalindaGUID = m_creature->GetGUID(); + summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true)); + summoned->setFaction(m_creature->getFaction()); + Summons.Summon(summoned); + } + + void JustDied(Unit* Killer) + { + Summons.DespawnAll(); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if (uiWaterElementalTimer < diff) + { + if(Summons.empty()) + m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILISECONDS); + uiWaterElementalTimer = 50*IN_MILISECONDS; + } else uiWaterElementalTimer -= diff; + + if (uiArcaneExplosionTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); + uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS); + } else uiArcaneExplosionTimer -= diff; + + if (uiConeOfColdTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CONE_OF_COLD); + uiConeOfColdTimer = urand(10*IN_MILISECONDS,20*IN_MILISECONDS); + } else uiConeOfColdTimer -= diff; + + if (uiFireBoltTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FIREBALL); + uiFireBoltTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS); + } else uiFireBoltTimer -= diff; + + if (uiFrostboltTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FROSTBOLT); + uiFrostboltTimer = urand(4*IN_MILISECONDS,12*IN_MILISECONDS); + } else uiFrostboltTimer -= diff; + + + // check if creature is not outside of building + if(uiResetTimer < diff) + { + if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) + { + EnterEvadeMode(); + DoScriptText(YELL_EVADE, m_creature); + } + uiResetTimer = 5*IN_MILISECONDS; + } else uiResetTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_balinda(Creature *_Creature) +{ + return new boss_balindaAI (_Creature); +} + +CreatureAI* GetAI_mob_water_elemental(Creature *_Creature) +{ + return new mob_water_elementalAI (_Creature); +} + +void AddSC_boss_balinda() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_balinda"; + newscript->GetAI = &GetAI_boss_balinda; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_water_elemental"; + newscript->GetAI = &GetAI_mob_water_elemental; + newscript->RegisterSelf(); }; \ No newline at end of file diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp index bc7913d9bc4..0f1346af927 100644 --- a/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp +++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp @@ -1,138 +1,138 @@ -/* Copyright (C) 2008 - 2010 TrinityCore -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include "ScriptedPch.h" - -enum Spells -{ - SPELL_WHIRLWIND = 15589, - SPELL_WHIRLWIND2 = 13736, - SPELL_KNOCKDOWN = 19128, - SPELL_FRENZY = 8269, - SPELL_SWEEPING_STRIKES = 18765, // not sure - SPELL_CLEAVE = 20677, // not sure - SPELL_WINDFURY = 35886, // not sure - SPELL_STORMPIKE = 51876 // not sure -}; - -enum Yells -{ - YELL_AGGRO = -1810000, - YELL_EVADE = -1810001, - YELL_RESPAWN = -1810002, - YELL_RANDOM1 = -1810003, - YELL_RANDOM2 = -1810004, - YELL_RANDOM3 = -1810005, - YELL_RANDOM4 = -1810006, - YELL_RANDOM5 = -1810007 -}; - -struct boss_drektharAI : public ScriptedAI -{ - boss_drektharAI(Creature *c) : ScriptedAI(c) {} - - uint32 uiWhirlwindTimer; - uint32 uiWhirlwind2Timer; - uint32 uiKnockdownTimer; - uint32 uiFrenzyTimer; - uint32 uiYellTimer; - uint32 uiResetTimer; - - void Reset() - { - uiWhirlwindTimer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS); - uiWhirlwind2Timer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS); - uiKnockdownTimer = 12*IN_MILISECONDS; - uiFrenzyTimer = 6*IN_MILISECONDS; - uiResetTimer = 5*IN_MILISECONDS; - uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds - } - - void Aggro(Unit *who) - { - DoScriptText(YELL_AGGRO, m_creature); - } - - void JustRespawned() - { - Reset(); - DoScriptText(YELL_RESPAWN, m_creature); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - if (uiWhirlwindTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_WHIRLWIND); - uiWhirlwindTimer = urand(8*IN_MILISECONDS,18*IN_MILISECONDS); - } else uiWhirlwindTimer -= diff; - - if (uiWhirlwind2Timer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2); - uiWhirlwind2Timer = urand(7*IN_MILISECONDS,25*IN_MILISECONDS); - } else uiWhirlwind2Timer -= diff; - - if (uiKnockdownTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_KNOCKDOWN); - uiKnockdownTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); - } else uiKnockdownTimer -= diff; - - if (uiFrenzyTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_FRENZY); - uiFrenzyTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); - } else uiFrenzyTimer -= diff; - - if (uiYellTimer <= diff) - { - DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5), m_creature); - uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds - } else uiYellTimer -= diff; - - // check if creature is not outside of building - if(uiResetTimer <= diff) - { - if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) - { - EnterEvadeMode(); - DoScriptText(YELL_EVADE, m_creature); - } - uiResetTimer = 5*IN_MILISECONDS; - } else uiResetTimer -= diff; - - DoMeleeAttackIfReady(); - } -}; - - -CreatureAI* GetAI_boss_drekthar(Creature *_Creature) -{ - return new boss_drektharAI (_Creature); -} - -void AddSC_boss_drekthar() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_drekthar"; - newscript->GetAI = &GetAI_boss_drekthar; - newscript->RegisterSelf(); +/* Copyright (C) 2008 - 2010 TrinityCore +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "ScriptedPch.h" + +enum Spells +{ + SPELL_WHIRLWIND = 15589, + SPELL_WHIRLWIND2 = 13736, + SPELL_KNOCKDOWN = 19128, + SPELL_FRENZY = 8269, + SPELL_SWEEPING_STRIKES = 18765, // not sure + SPELL_CLEAVE = 20677, // not sure + SPELL_WINDFURY = 35886, // not sure + SPELL_STORMPIKE = 51876 // not sure +}; + +enum Yells +{ + YELL_AGGRO = -1810000, + YELL_EVADE = -1810001, + YELL_RESPAWN = -1810002, + YELL_RANDOM1 = -1810003, + YELL_RANDOM2 = -1810004, + YELL_RANDOM3 = -1810005, + YELL_RANDOM4 = -1810006, + YELL_RANDOM5 = -1810007 +}; + +struct boss_drektharAI : public ScriptedAI +{ + boss_drektharAI(Creature *c) : ScriptedAI(c) {} + + uint32 uiWhirlwindTimer; + uint32 uiWhirlwind2Timer; + uint32 uiKnockdownTimer; + uint32 uiFrenzyTimer; + uint32 uiYellTimer; + uint32 uiResetTimer; + + void Reset() + { + uiWhirlwindTimer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS); + uiWhirlwind2Timer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS); + uiKnockdownTimer = 12*IN_MILISECONDS; + uiFrenzyTimer = 6*IN_MILISECONDS; + uiResetTimer = 5*IN_MILISECONDS; + uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds + } + + void Aggro(Unit *who) + { + DoScriptText(YELL_AGGRO, m_creature); + } + + void JustRespawned() + { + Reset(); + DoScriptText(YELL_RESPAWN, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if (uiWhirlwindTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_WHIRLWIND); + uiWhirlwindTimer = urand(8*IN_MILISECONDS,18*IN_MILISECONDS); + } else uiWhirlwindTimer -= diff; + + if (uiWhirlwind2Timer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2); + uiWhirlwind2Timer = urand(7*IN_MILISECONDS,25*IN_MILISECONDS); + } else uiWhirlwind2Timer -= diff; + + if (uiKnockdownTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_KNOCKDOWN); + uiKnockdownTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); + } else uiKnockdownTimer -= diff; + + if (uiFrenzyTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_FRENZY); + uiFrenzyTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); + } else uiFrenzyTimer -= diff; + + if (uiYellTimer <= diff) + { + DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5), m_creature); + uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds + } else uiYellTimer -= diff; + + // check if creature is not outside of building + if(uiResetTimer <= diff) + { + if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) + { + EnterEvadeMode(); + DoScriptText(YELL_EVADE, m_creature); + } + uiResetTimer = 5*IN_MILISECONDS; + } else uiResetTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_drekthar(Creature *_Creature) +{ + return new boss_drektharAI (_Creature); +} + +void AddSC_boss_drekthar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_drekthar"; + newscript->GetAI = &GetAI_boss_drekthar; + newscript->RegisterSelf(); } \ No newline at end of file diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp index 223b7b49a1f..063cf356fda 100644 --- a/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp +++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp @@ -1,129 +1,129 @@ -/* Copyright (C) 2008 - 2010 TrinityCore -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include "ScriptedPch.h" - -enum Spells -{ - SPELL_CLEAVE = 15284, - SPELL_FRIGHTENING_SHOUT = 19134, - SPELL_WHIRLWIND1 = 15589, - SPELL_WHIRLWIND2 = 13736, - SPELL_MORTAL_STRIKE = 16856 -}; - -enum Yells -{ - YELL_AGGRO = -1810021, - YELL_EVADE = -1810022 -}; - -struct boss_galvangarAI : public ScriptedAI -{ - boss_galvangarAI(Creature *c) : ScriptedAI(c) {} - - - uint32 uiCleaveTimer; - uint32 uiFrighteningShoutTimer; - uint32 uiWhirlwind1Timer; - uint32 uiWhirlwind2Timer; - uint32 uiMortalStrikeTimer; - uint32 uiResetTimer; - - - void Reset() - { - uiCleaveTimer = urand(1*IN_MILISECONDS,9*IN_MILISECONDS); - uiFrighteningShoutTimer = urand(2*IN_MILISECONDS,19*IN_MILISECONDS); - uiWhirlwind1Timer = urand(1*IN_MILISECONDS,13*IN_MILISECONDS); - uiWhirlwind2Timer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS); - uiMortalStrikeTimer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS); - uiResetTimer = 5*IN_MILISECONDS; - } - - void Aggro(Unit *who) - { - DoScriptText(YELL_AGGRO, m_creature); - } - - void JustRespawned() - { - Reset(); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - if (uiCleaveTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_CLEAVE); - uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS); - } else uiCleaveTimer -= diff; - - if (uiFrighteningShoutTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); - uiFrighteningShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); - } else uiFrighteningShoutTimer -= diff; - - if (uiWhirlwind1Timer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_WHIRLWIND1); - uiWhirlwind1Timer = urand(6*IN_MILISECONDS,10*IN_MILISECONDS); - } else uiWhirlwind1Timer -= diff; - - if (uiWhirlwind2Timer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2); - uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS); - } else uiWhirlwind2Timer -= diff; - - if (uiMortalStrikeTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); - uiMortalStrikeTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS); - } else uiMortalStrikeTimer -= diff; - - // check if creature is not outside of building - if(uiResetTimer <= diff) - { - if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) - { - EnterEvadeMode(); - DoScriptText(YELL_EVADE, m_creature); - } - uiResetTimer = 5*IN_MILISECONDS; - } else uiResetTimer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_galvangar(Creature *_Creature) -{ - return new boss_galvangarAI (_Creature); -} - -void AddSC_boss_galvangar() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_galvangar"; - newscript->GetAI = &GetAI_boss_galvangar; - newscript->RegisterSelf(); -} +/* Copyright (C) 2008 - 2010 TrinityCore +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "ScriptedPch.h" + +enum Spells +{ + SPELL_CLEAVE = 15284, + SPELL_FRIGHTENING_SHOUT = 19134, + SPELL_WHIRLWIND1 = 15589, + SPELL_WHIRLWIND2 = 13736, + SPELL_MORTAL_STRIKE = 16856 +}; + +enum Yells +{ + YELL_AGGRO = -1810021, + YELL_EVADE = -1810022 +}; + +struct boss_galvangarAI : public ScriptedAI +{ + boss_galvangarAI(Creature *c) : ScriptedAI(c) {} + + + uint32 uiCleaveTimer; + uint32 uiFrighteningShoutTimer; + uint32 uiWhirlwind1Timer; + uint32 uiWhirlwind2Timer; + uint32 uiMortalStrikeTimer; + uint32 uiResetTimer; + + + void Reset() + { + uiCleaveTimer = urand(1*IN_MILISECONDS,9*IN_MILISECONDS); + uiFrighteningShoutTimer = urand(2*IN_MILISECONDS,19*IN_MILISECONDS); + uiWhirlwind1Timer = urand(1*IN_MILISECONDS,13*IN_MILISECONDS); + uiWhirlwind2Timer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS); + uiMortalStrikeTimer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS); + uiResetTimer = 5*IN_MILISECONDS; + } + + void Aggro(Unit *who) + { + DoScriptText(YELL_AGGRO, m_creature); + } + + void JustRespawned() + { + Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if (uiCleaveTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS); + } else uiCleaveTimer -= diff; + + if (uiFrighteningShoutTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); + uiFrighteningShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); + } else uiFrighteningShoutTimer -= diff; + + if (uiWhirlwind1Timer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_WHIRLWIND1); + uiWhirlwind1Timer = urand(6*IN_MILISECONDS,10*IN_MILISECONDS); + } else uiWhirlwind1Timer -= diff; + + if (uiWhirlwind2Timer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2); + uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS); + } else uiWhirlwind2Timer -= diff; + + if (uiMortalStrikeTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + uiMortalStrikeTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS); + } else uiMortalStrikeTimer -= diff; + + // check if creature is not outside of building + if(uiResetTimer <= diff) + { + if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) + { + EnterEvadeMode(); + DoScriptText(YELL_EVADE, m_creature); + } + uiResetTimer = 5*IN_MILISECONDS; + } else uiResetTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_galvangar(Creature *_Creature) +{ + return new boss_galvangarAI (_Creature); +} + +void AddSC_boss_galvangar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_galvangar"; + newscript->GetAI = &GetAI_boss_galvangar; + newscript->RegisterSelf(); +} diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp index 584437eeb89..43b674ff4c0 100644 --- a/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp +++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp @@ -1,129 +1,129 @@ -/* Copyright (C) 2008 - 2010 TrinityCore -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include "ScriptedPch.h" - -enum Yells -{ - YELL_AGGRO = -1810008, - YELL_EVADE = -1810009, - YELL_RESPAWN1 = -1810010, - YELL_RESPAWN2 = -1810011, - YELL_RANDOM1 = -1810012, - YELL_RANDOM2 = -1810013, - YELL_RANDOM3 = -1810014, - YELL_RANDOM4 = -1810015, - YELL_RANDOM5 = -1810016, - YELL_RANDOM6 = -1810017, - YELL_RANDOM7 = -1810018 -}; - -enum Spells -{ - SPELL_AVATAR = 19135, - SPELL_THUNDERCLAP = 15588, - SPELL_STORMBOLT = 20685 // not sure -}; - -struct boss_vanndarAI : public ScriptedAI -{ - boss_vanndarAI(Creature *c) : ScriptedAI(c) {} - - - uint32 uiAvatarTimer; - uint32 uiThunderclapTimer; - uint32 uiStormboltTimer; - uint32 uiResetTimer; - uint32 uiYellTimer; - - - void Reset() - { - uiAvatarTimer = 3*IN_MILISECONDS; - uiThunderclapTimer = 4*IN_MILISECONDS; - uiStormboltTimer = 6*IN_MILISECONDS; - uiResetTimer = 5*IN_MILISECONDS; - uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); - } - - void Aggro(Unit *who) - { - DoScriptText(YELL_AGGRO, m_creature); - } - - void JustRespawned() - { - Reset(); - DoScriptText(RAND(YELL_RESPAWN1,YELL_RESPAWN2), m_creature); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - if (uiAvatarTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_AVATAR); - uiAvatarTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS); - } else uiAvatarTimer -= diff; - - if (uiThunderclapTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_THUNDERCLAP); - uiThunderclapTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS); - } else uiThunderclapTimer -= diff; - - if (uiStormboltTimer <= diff) - { - DoCast(m_creature->getVictim(), SPELL_STORMBOLT); - uiStormboltTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS); - } else uiStormboltTimer -= diff; - - if (uiYellTimer <= diff) - { - DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5,YELL_RANDOM6,YELL_RANDOM7), m_creature); - uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds - } else uiYellTimer -= diff; - - // check if creature is not outside of building - if(uiResetTimer <= diff) - { - if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) - { - EnterEvadeMode(); - DoScriptText(YELL_EVADE, m_creature); - } - uiResetTimer = 5*IN_MILISECONDS; - } else uiResetTimer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_vanndar(Creature *_Creature) -{ - return new boss_vanndarAI (_Creature); -} - -void AddSC_boss_vanndar() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_vanndar"; - newscript->GetAI = &GetAI_boss_vanndar; - newscript->RegisterSelf(); +/* Copyright (C) 2008 - 2010 TrinityCore +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "ScriptedPch.h" + +enum Yells +{ + YELL_AGGRO = -1810008, + YELL_EVADE = -1810009, + YELL_RESPAWN1 = -1810010, + YELL_RESPAWN2 = -1810011, + YELL_RANDOM1 = -1810012, + YELL_RANDOM2 = -1810013, + YELL_RANDOM3 = -1810014, + YELL_RANDOM4 = -1810015, + YELL_RANDOM5 = -1810016, + YELL_RANDOM6 = -1810017, + YELL_RANDOM7 = -1810018 +}; + +enum Spells +{ + SPELL_AVATAR = 19135, + SPELL_THUNDERCLAP = 15588, + SPELL_STORMBOLT = 20685 // not sure +}; + +struct boss_vanndarAI : public ScriptedAI +{ + boss_vanndarAI(Creature *c) : ScriptedAI(c) {} + + + uint32 uiAvatarTimer; + uint32 uiThunderclapTimer; + uint32 uiStormboltTimer; + uint32 uiResetTimer; + uint32 uiYellTimer; + + + void Reset() + { + uiAvatarTimer = 3*IN_MILISECONDS; + uiThunderclapTimer = 4*IN_MILISECONDS; + uiStormboltTimer = 6*IN_MILISECONDS; + uiResetTimer = 5*IN_MILISECONDS; + uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); + } + + void Aggro(Unit *who) + { + DoScriptText(YELL_AGGRO, m_creature); + } + + void JustRespawned() + { + Reset(); + DoScriptText(RAND(YELL_RESPAWN1,YELL_RESPAWN2), m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if (uiAvatarTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_AVATAR); + uiAvatarTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS); + } else uiAvatarTimer -= diff; + + if (uiThunderclapTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_THUNDERCLAP); + uiThunderclapTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS); + } else uiThunderclapTimer -= diff; + + if (uiStormboltTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_STORMBOLT); + uiStormboltTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS); + } else uiStormboltTimer -= diff; + + if (uiYellTimer <= diff) + { + DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5,YELL_RANDOM6,YELL_RANDOM7), m_creature); + uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds + } else uiYellTimer -= diff; + + // check if creature is not outside of building + if(uiResetTimer <= diff) + { + if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50) + { + EnterEvadeMode(); + DoScriptText(YELL_EVADE, m_creature); + } + uiResetTimer = 5*IN_MILISECONDS; + } else uiResetTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vanndar(Creature *_Creature) +{ + return new boss_vanndarAI (_Creature); +} + +void AddSC_boss_vanndar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_vanndar"; + newscript->GetAI = &GetAI_boss_vanndar; + newscript->RegisterSelf(); } \ No newline at end of file -- cgit v1.2.3