diff options
| author | Xanadu <none@none> | 2010-07-20 02:49:28 +0200 |
|---|---|---|
| committer | Xanadu <none@none> | 2010-07-20 02:49:28 +0200 |
| commit | 79622802f397258ee0f34327ba3ae6977ca3e7ff (patch) | |
| tree | 1868946c234ab9ee256a6b7766a15713eae94235 /src/server/scripts/Northrend | |
| parent | 7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff) | |
| parent | f906976837502fa5aa81b982b901d1509f5aa0c4 (diff) | |
Merge. Revision history for source files should be all back now.
--HG--
branch : trunk
rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt
rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp
rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h
rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp
rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'src/server/scripts/Northrend')
153 files changed, 5288 insertions, 2725 deletions
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h index 4113885b6f4..d936d6a8c90 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_AZJOL_NERUB_H diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 6de6578f7bb..65c649c4225 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "azjol_nerub.h" //SQL: UPDATE creature_template SET mechanic_immune_mask = 1073741823 WHERE name like "anub'arak%"; @@ -118,10 +117,10 @@ struct boss_anub_arakAI : public ScriptedAI void Reset() { - uiCarrionBeetlesTimer = 8*IN_MILISECONDS; - uiLeechingSwarmTimer = 20*IN_MILISECONDS; - uiImpaleTimer = 9*IN_MILISECONDS; - uiPoundTimer = 15*IN_MILISECONDS; + uiCarrionBeetlesTimer = 8*IN_MILLISECONDS; + uiLeechingSwarmTimer = 20*IN_MILLISECONDS; + uiImpaleTimer = 9*IN_MILLISECONDS; + uiPoundTimer = 15*IN_MILLISECONDS; uiPhase = PHASE_MELEE; uiUndergroundPhase = 0; @@ -145,7 +144,7 @@ struct boss_anub_arakAI : public ScriptedAI Position targetPos; pTarget->GetPosition(&targetPos); - if (TempSummon* pImpaleTarget = me->SummonCreature(CREATURE_IMPALE_TARGET, targetPos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 6*IN_MILISECONDS)) + if (TempSummon* pImpaleTarget = me->SummonCreature(CREATURE_IMPALE_TARGET, targetPos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 6*IN_MILLISECONDS)) { uiImpaleTarget = pImpaleTarget->GetGUID(); pImpaleTarget->SetReactState(REACT_PASSIVE); @@ -184,7 +183,7 @@ struct boss_anub_arakAI : public ScriptedAI { if (Creature *pImpaleTarget = DoSummonImpaleTarget(target)) pImpaleTarget->CastSpell(pImpaleTarget, SPELL_IMPALE_SHAKEGROUND, true); - uiImpaleTimer = 3*IN_MILISECONDS; + uiImpaleTimer = 3*IN_MILLISECONDS; uiImpalePhase = IMPALE_PHASE_ATTACK; } break; @@ -195,13 +194,13 @@ struct boss_anub_arakAI : public ScriptedAI pImpaleTarget->RemoveAurasDueToSpell(SPELL_IMPALE_SHAKEGROUND); } uiImpalePhase = IMPALE_PHASE_DMG; - uiImpaleTimer = 1*IN_MILISECONDS; + uiImpaleTimer = 1*IN_MILLISECONDS; break; case IMPALE_PHASE_DMG: if (Creature* pImpaleTarget = Unit::GetCreature(*me, uiImpaleTarget)) me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_IMPALE_DMG, SPELL_IMPALE_DMG_H), true); uiImpalePhase = IMPALE_PHASE_TARGET; - uiImpaleTimer = 9*IN_MILISECONDS; + uiImpaleTimer = 9*IN_MILLISECONDS; break; } } else uiImpaleTimer -= diff; @@ -275,12 +274,12 @@ struct boss_anub_arakAI : public ScriptedAI bVenomancerSummoned = false; bDatterSummoned = false; - uiUndergroundTimer = 40*IN_MILISECONDS; - uiVenomancerTimer = 25*IN_MILISECONDS; - uiDatterTimer = 32*IN_MILISECONDS; + uiUndergroundTimer = 40*IN_MILLISECONDS; + uiVenomancerTimer = 25*IN_MILLISECONDS; + uiDatterTimer = 32*IN_MILLISECONDS; uiImpalePhase = 0; - uiImpaleTimer = 9*IN_MILISECONDS; + uiImpaleTimer = 9*IN_MILLISECONDS; DoCast(me, SPELL_SUBMERGE, false); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); @@ -299,13 +298,13 @@ struct boss_anub_arakAI : public ScriptedAI { bChanneling = true; DoCastVictim(SPELL_CARRION_BEETLES); - uiCarrionBeetlesTimer = 25*IN_MILISECONDS; + uiCarrionBeetlesTimer = 25*IN_MILLISECONDS; } else uiCarrionBeetlesTimer -= diff; if (uiLeechingSwarmTimer <= diff) { DoCast(me, SPELL_LEECHING_SWARM, true); - uiLeechingSwarmTimer = 19*IN_MILISECONDS; + uiLeechingSwarmTimer = 19*IN_MILLISECONDS; } else uiLeechingSwarmTimer -= diff; if (uiPoundTimer <= diff) @@ -315,7 +314,7 @@ struct boss_anub_arakAI : public ScriptedAI if (Creature *pImpaleTarget = DoSummonImpaleTarget(target)) me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false); } - uiPoundTimer = 16.5*IN_MILISECONDS; + uiPoundTimer = 16.5*IN_MILLISECONDS; } else uiPoundTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index 0fc4e87d7c5..7b8a81013be 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* @@ -29,7 +28,7 @@ * Hadronox to make his way to you. When Hadronox enters the main room, she will web the doors, and no more non-elites will spawn. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "azjol_nerub.h" enum Spells @@ -72,12 +71,12 @@ struct boss_hadronoxAI : public ScriptedAI me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 9.0f); me->SetFloatValue(UNIT_FIELD_COMBATREACH, 9.0f); - uiAcidTimer = urand(10*IN_MILISECONDS,14*IN_MILISECONDS); - uiLeechTimer = urand(3*IN_MILISECONDS,9*IN_MILISECONDS); - uiPierceTimer = urand(1*IN_MILISECONDS,3*IN_MILISECONDS); - uiGrabTimer = urand(15*IN_MILISECONDS,19*IN_MILISECONDS); - uiDoorsTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); - uiCheckDistanceTimer = 2*IN_MILISECONDS; + uiAcidTimer = urand(10*IN_MILLISECONDS,14*IN_MILLISECONDS); + uiLeechTimer = urand(3*IN_MILLISECONDS,9*IN_MILLISECONDS); + uiPierceTimer = urand(1*IN_MILLISECONDS,3*IN_MILLISECONDS); + uiGrabTimer = urand(15*IN_MILLISECONDS,19*IN_MILLISECONDS); + uiDoorsTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); + uiCheckDistanceTimer = 2*IN_MILLISECONDS; if (pInstance && (pInstance->GetData(DATA_HADRONOX_EVENT) != DONE && !bFirstTime)) pInstance->SetData(DATA_HADRONOX_EVENT, FAIL); @@ -122,7 +121,7 @@ struct boss_hadronoxAI : public ScriptedAI me->GetRespawnCoord(x,y,z); if (uiCheckDistanceTimer <= uiDiff) - uiCheckDistanceTimer = 5*IN_MILISECONDS; + uiCheckDistanceTimer = 5*IN_MILLISECONDS; else { uiCheckDistanceTimer -= uiDiff; @@ -153,7 +152,7 @@ struct boss_hadronoxAI : public ScriptedAI if (uiPierceTimer <= diff) { DoCast(me->getVictim(), SPELL_PIERCE_ARMOR); - uiPierceTimer = 8*IN_MILISECONDS; + uiPierceTimer = 8*IN_MILLISECONDS; } else uiPierceTimer -= diff; if (uiAcidTimer <= diff) @@ -161,7 +160,7 @@ struct boss_hadronoxAI : public ScriptedAI if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_ACID_CLOUD); - uiAcidTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); + uiAcidTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiAcidTimer -= diff; if (uiLeechTimer <= diff) @@ -169,7 +168,7 @@ struct boss_hadronoxAI : public ScriptedAI if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_LEECH_POISON); - uiLeechTimer = urand(11*IN_MILISECONDS,14*IN_MILISECONDS); + uiLeechTimer = urand(11*IN_MILLISECONDS,14*IN_MILLISECONDS); } else uiLeechTimer -= diff; if (uiGrabTimer <= diff) @@ -177,13 +176,13 @@ struct boss_hadronoxAI : public ScriptedAI if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself. DoCast(pTarget, SPELL_WEB_GRAB); - uiGrabTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiGrabTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiGrabTimer -= diff; if (uiDoorsTimer <= diff) { //DoCast(me, RAND(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS)); - uiDoorsTimer = urand(30*IN_MILISECONDS,60*IN_MILISECONDS); + uiDoorsTimer = urand(30*IN_MILLISECONDS,60*IN_MILLISECONDS); } else uiDoorsTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp index 4863bdcb032..9680863acad 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp @@ -1,26 +1,25 @@ /* - * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Comment: Find in the future best timers and the event is not implemented. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "azjol_nerub.h" enum Spells @@ -107,8 +106,8 @@ struct boss_krik_thirAI : public ScriptedAI void Reset() { - uiMindFlayTimer = 15*IN_MILISECONDS; - uiCurseFatigueTimer = 12*IN_MILISECONDS; + uiMindFlayTimer = 15*IN_MILLISECONDS; + uiCurseFatigueTimer = 12*IN_MILLISECONDS; if (pInstance) pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, NOT_STARTED); @@ -118,7 +117,7 @@ struct boss_krik_thirAI : public ScriptedAI { DoScriptText(SAY_AGGRO, me); Summon(); - uiSummonTimer = 15*IN_MILISECONDS; + uiSummonTimer = 15*IN_MILLISECONDS; if (pInstance) pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, IN_PROGRESS); @@ -126,22 +125,22 @@ struct boss_krik_thirAI : public ScriptedAI void Summon() { - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); - me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); + me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS); } void UpdateAI(const uint32 diff) @@ -152,13 +151,13 @@ struct boss_krik_thirAI : public ScriptedAI if (uiSummonTimer <= diff) { Summon(); - uiSummonTimer = 15*IN_MILISECONDS; + uiSummonTimer = 15*IN_MILLISECONDS; } else uiSummonTimer -= diff; if (uiMindFlayTimer <= diff) { DoCast(me->getVictim(), SPELL_MIND_FLAY); - uiMindFlayTimer = 15*IN_MILISECONDS; + uiMindFlayTimer = 15*IN_MILLISECONDS; } else uiMindFlayTimer -= diff; if (uiCurseFatigueTimer <= diff) @@ -170,7 +169,7 @@ struct boss_krik_thirAI : public ScriptedAI DoCast(pTarget, SPELL_CURSE_OF_FATIGUE); DoCast(pTarget_1, SPELL_CURSE_OF_FATIGUE); - uiCurseFatigueTimer = 10*IN_MILISECONDS; + uiCurseFatigueTimer = 10*IN_MILLISECONDS; } else uiCurseFatigueTimer -= diff; if (!me->HasAura(SPELL_FRENZY) && HealthBelowPct(10)) @@ -237,8 +236,8 @@ struct npc_anub_ar_skirmisherAI : public ScriptedAI void Reset() { - uiChargeTimer = 11*IN_MILISECONDS; - uiBackstabTimer = 7*IN_MILISECONDS; + uiChargeTimer = 11*IN_MILLISECONDS; + uiBackstabTimer = 7*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -254,13 +253,13 @@ struct npc_anub_ar_skirmisherAI : public ScriptedAI me->AddThreat(pTarget,1.0f); DoCast(pTarget, SPELL_CHARGE, true); } - uiChargeTimer = 15*IN_MILISECONDS; + uiChargeTimer = 15*IN_MILLISECONDS; } else uiChargeTimer -= diff; if (uiBackstabTimer <= diff) { DoCast(me->getVictim(), SPELL_BACKSTAB); - uiBackstabTimer = 12*IN_MILISECONDS; + uiBackstabTimer = 12*IN_MILLISECONDS; } else uiBackstabTimer -= diff; DoMeleeAttackIfReady(); @@ -277,8 +276,8 @@ struct npc_anub_ar_shadowcasterAI : public ScriptedAI void Reset() { - uiShadowBoltTimer = 6*IN_MILISECONDS; - uiShadowNovaTimer = 15*IN_MILISECONDS; + uiShadowBoltTimer = 6*IN_MILLISECONDS; + uiShadowNovaTimer = 15*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -290,13 +289,13 @@ struct npc_anub_ar_shadowcasterAI : public ScriptedAI { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_SHADOW_BOLT, true); - uiShadowBoltTimer = 15*IN_MILISECONDS; + uiShadowBoltTimer = 15*IN_MILLISECONDS; } else uiShadowBoltTimer -= diff; if (uiShadowNovaTimer <= diff) { DoCast(me->getVictim(), SPELL_SHADOW_NOVA, true); - uiShadowNovaTimer = 17*IN_MILISECONDS; + uiShadowNovaTimer = 17*IN_MILLISECONDS; } else uiShadowNovaTimer -= diff; DoMeleeAttackIfReady(); @@ -312,8 +311,8 @@ struct npc_anub_ar_warriorAI : public ScriptedAI void Reset() { - uiCleaveTimer = 11*IN_MILISECONDS; - uiStrikeTimer = 6*IN_MILISECONDS; + uiCleaveTimer = 11*IN_MILLISECONDS; + uiStrikeTimer = 6*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -324,13 +323,13 @@ struct npc_anub_ar_warriorAI : public ScriptedAI if (uiStrikeTimer <= diff) { DoCast(me->getVictim(), SPELL_STRIKE, true); - uiStrikeTimer = 15*IN_MILISECONDS; + uiStrikeTimer = 15*IN_MILLISECONDS; } else uiStrikeTimer -= diff; if (uiCleaveTimer <= diff) { DoCast(me->getVictim(), SPELL_CLEAVE, true); - uiCleaveTimer = 17*IN_MILISECONDS; + uiCleaveTimer = 17*IN_MILLISECONDS; } else uiCleaveTimer -= diff; DoMeleeAttackIfReady(); @@ -348,8 +347,8 @@ struct npc_watcher_gashraAI : public ScriptedAI void Reset() { - uiWebWrapTimer = 11*IN_MILISECONDS; - uiInfectedBiteTimer = 4*IN_MILISECONDS; + uiWebWrapTimer = 11*IN_MILLISECONDS; + uiInfectedBiteTimer = 4*IN_MILLISECONDS; } void EnterCombat(Unit* /*who*/) @@ -366,13 +365,13 @@ struct npc_watcher_gashraAI : public ScriptedAI { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_WEB_WRAP, true); - uiWebWrapTimer = 17*IN_MILISECONDS; + uiWebWrapTimer = 17*IN_MILLISECONDS; } else uiWebWrapTimer -= diff; if (uiInfectedBiteTimer <= diff) { DoCast(me->getVictim(), SPELL_INFECTED_BITE, true); - uiInfectedBiteTimer = 15*IN_MILISECONDS; + uiInfectedBiteTimer = 15*IN_MILLISECONDS; } else uiInfectedBiteTimer -= diff; DoMeleeAttackIfReady(); @@ -389,9 +388,9 @@ struct npc_watcher_narjilAI : public ScriptedAI void Reset() { - uiWebWrapTimer = 11*IN_MILISECONDS; - uiInfectedBiteTimer = 4*IN_MILISECONDS; - uiBindingWebsTimer = 17*IN_MILISECONDS; + uiWebWrapTimer = 11*IN_MILLISECONDS; + uiInfectedBiteTimer = 4*IN_MILLISECONDS; + uiBindingWebsTimer = 17*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -403,19 +402,19 @@ struct npc_watcher_narjilAI : public ScriptedAI { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_WEB_WRAP, true); - uiWebWrapTimer = 15*IN_MILISECONDS; + uiWebWrapTimer = 15*IN_MILLISECONDS; } else uiWebWrapTimer -= diff; if (uiInfectedBiteTimer <= diff) { DoCast(me->getVictim(), SPELL_INFECTED_BITE, true); - uiInfectedBiteTimer = 11*IN_MILISECONDS; + uiInfectedBiteTimer = 11*IN_MILLISECONDS; } else uiInfectedBiteTimer -= diff; if (uiBindingWebsTimer <= diff) { DoCast(me->getVictim(), SPELL_BLINDING_WEBS, true); - uiBindingWebsTimer = 17*IN_MILISECONDS; + uiBindingWebsTimer = 17*IN_MILLISECONDS; } else uiBindingWebsTimer -= diff; DoMeleeAttackIfReady(); @@ -432,9 +431,9 @@ struct npc_watcher_silthikAI : public ScriptedAI void Reset() { - uiWebWrapTimer = 11*IN_MILISECONDS; - uiInfectedBiteTimer = 4*IN_MILISECONDS; - uiPoisonSprayTimer = 15*IN_MILISECONDS; + uiWebWrapTimer = 11*IN_MILLISECONDS; + uiInfectedBiteTimer = 4*IN_MILLISECONDS; + uiPoisonSprayTimer = 15*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -447,19 +446,19 @@ struct npc_watcher_silthikAI : public ScriptedAI if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_WEB_WRAP, true); - uiWebWrapTimer = 15*IN_MILISECONDS; + uiWebWrapTimer = 15*IN_MILLISECONDS; } else uiWebWrapTimer -= diff; if (uiInfectedBiteTimer <= diff) { DoCast(me->getVictim(), SPELL_INFECTED_BITE, true); - uiInfectedBiteTimer = 15*IN_MILISECONDS; + uiInfectedBiteTimer = 15*IN_MILLISECONDS; } else uiInfectedBiteTimer -= diff; if (uiPoisonSprayTimer <= diff) { DoCast(me->getVictim(), SPELL_POSION_SPRAY, true); - uiPoisonSprayTimer = 17*IN_MILISECONDS; + uiPoisonSprayTimer = 17*IN_MILLISECONDS; } else uiPoisonSprayTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index d12dbd604ba..90f96b21af3 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "azjol_nerub.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h index 240ad77c74d..f324344228a 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_AHNKAHET_H diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp index 51c4bce0c2d..ee5dc6b297f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp @@ -1,26 +1,25 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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 -*/ + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ /* * Comment: Find correct mushrooms spell to make them visible - buffs of the mushrooms not ever applied to the users... */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ahnkahet.h" enum Spells @@ -61,9 +60,9 @@ struct boss_amanitarAI : public ScriptedAI void Reset() { - uiRootTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS); - uiBashTimer = urand(10*IN_MILISECONDS,14*IN_MILISECONDS); - uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiRootTimer = urand(5*IN_MILLISECONDS,9*IN_MILLISECONDS); + uiBashTimer = urand(10*IN_MILLISECONDS,14*IN_MILLISECONDS); + uiBoltTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); uiSpawnTimer = 0; me->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE); @@ -107,9 +106,9 @@ struct boss_amanitarAI : public ScriptedAI Position pos; victim->GetPosition(&pos); me->GetRandomNearPosition(pos, float(urand(5,80))); - me->SummonCreature(NPC_POISONOUS_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILISECONDS); + me->SummonCreature(NPC_POISONOUS_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILLISECONDS); me->GetRandomNearPosition(pos, float(urand(5,80))); - me->SummonCreature(NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILISECONDS); + me->SummonCreature(NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILLISECONDS); } } } @@ -123,27 +122,27 @@ struct boss_amanitarAI : public ScriptedAI if (uiSpawnTimer <= diff) { SpawnAdds(); - uiSpawnTimer = urand(35*IN_MILISECONDS,40*IN_MILISECONDS); + uiSpawnTimer = urand(35*IN_MILLISECONDS,40*IN_MILLISECONDS); } else uiSpawnTimer -= diff; if (uiRootTimer <= diff) { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_ENTANGLING_ROOTS); - uiRootTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiRootTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiRootTimer -= diff; if (uiBashTimer <= diff) { DoCastVictim(SPELL_BASH); - uiBashTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiBashTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiBashTimer -= diff; if (uiBoltTimer <= diff) { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_VENOM_BOLT_VOLLEY); - uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiBoltTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiBoltTimer -= diff; DoMeleeAttackIfReady(); @@ -165,7 +164,7 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AURA, true); uiAuraTimer = 0; - uiDeathTimer = 30*IN_MILISECONDS; + uiDeathTimer = 30*IN_MILLISECONDS; } void JustDied(Unit *killer) @@ -191,7 +190,7 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI { DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AREA, true); DoCast(me, SPELL_POISONOUS_MUSHROOM_POISON_CLOUD, false); - uiAuraTimer = 7*IN_MILISECONDS; + uiAuraTimer = 7*IN_MILLISECONDS; } else uiAuraTimer -= diff; } if (uiDeathTimer <= diff) diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp index 2215d91c749..05c868708f2 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "ahnkahet.h" bool DeadAhnkaharGuardian; // needed for achievement: Respect Your Elders(2038) @@ -76,13 +75,13 @@ struct boss_elder_nadoxAI : public ScriptedAI void Reset() { - uiPlagueTimer = 13*IN_MILISECONDS; - uiRagueTimer = 20*IN_MILISECONDS; + uiPlagueTimer = 13*IN_MILLISECONDS; + uiRagueTimer = 20*IN_MILLISECONDS; - uiSwarmerSpawnTimer = 10*IN_MILISECONDS; - uiGuardSpawnTimer = 25*IN_MILISECONDS; + uiSwarmerSpawnTimer = 10*IN_MILLISECONDS; + uiGuardSpawnTimer = 25*IN_MILLISECONDS; - uiEnragueTimer = 5*IN_MILISECONDS; + uiEnragueTimer = 5*IN_MILLISECONDS; DeadAhnkaharGuardian = false; bGuardSpawned = false; @@ -124,7 +123,7 @@ struct boss_elder_nadoxAI : public ScriptedAI if (uiPlagueTimer <= diff) { DoCast(me->getVictim(), SPELL_BROOD_PLAGUE); - uiPlagueTimer = 15*IN_MILISECONDS; + uiPlagueTimer = 15*IN_MILLISECONDS; } else uiPlagueTimer -= diff; if (IsHeroic()) @@ -133,7 +132,7 @@ struct boss_elder_nadoxAI : public ScriptedAI if (Creature *pSwarmer = me->FindNearestCreature(MOB_AHNKAHAR_SWARMER, 35)) { DoCast(pSwarmer, H_SPELL_BROOD_RAGE, true); - uiRagueTimer = 15*IN_MILISECONDS; + uiRagueTimer = 15*IN_MILLISECONDS; } } else uiRagueTimer -= diff; @@ -144,7 +143,7 @@ struct boss_elder_nadoxAI : public ScriptedAI if (urand(1,3) == 3) // 33% chance of dialog DoScriptText(RAND(SAY_EGG_SAC_1,SAY_EGG_SAC_2), me); - uiSwarmerSpawnTimer = 10*IN_MILISECONDS; + uiSwarmerSpawnTimer = 10*IN_MILLISECONDS; } else uiSwarmerSpawnTimer -= diff; if (!bGuardSpawned && uiGuardSpawnTimer <= diff) @@ -165,7 +164,7 @@ struct boss_elder_nadoxAI : public ScriptedAI if (!me->IsNonMeleeSpellCasted(false)) DoCast(me, SPELL_ENRAGE, true); - uiEnragueTimer = 5*IN_MILISECONDS; + uiEnragueTimer = 5*IN_MILLISECONDS; } else uiEnragueTimer -= diff; DoMeleeAttackIfReady(); @@ -197,7 +196,7 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI { if (me->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY) //magic numbers are bad! DoCast(me, SPELL_GUARDIAN_AURA, true); - uiSprintTimer = 10*IN_MILISECONDS; + uiSprintTimer = 10*IN_MILLISECONDS; } void JustDied(Unit * /*killer*/) @@ -230,7 +229,7 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI if (uiSprintTimer <= diff) { DoCast(me, SPELL_SPRINT); - uiSprintTimer = 25*IN_MILISECONDS; + uiSprintTimer = 25*IN_MILLISECONDS; } else uiSprintTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp index 16c291d6484..0e58217c584 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp @@ -1,26 +1,25 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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 -*/ + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ /* * Comment: Missing AI for Twisted Visages */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ahnkahet.h" enum Spells @@ -125,9 +124,6 @@ struct boss_volazjAI : public ScriptedAI // Summon clone if (Unit *summon = me->SummonCreature(MOB_TWISTED_VISAGE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,0)) { - // required for correct visual - // Fixme: allow mirror image query to send other guid to get rid of minion status - summon->SetUInt64Value(UNIT_FIELD_CREATEDBY, plr->GetGUID()); // clone plr->CastSpell(summon, SPELL_CLONE_PLAYER, true); // set phase @@ -150,9 +146,9 @@ struct boss_volazjAI : public ScriptedAI void Reset() { - uiMindFlayTimer = 8*IN_MILISECONDS; - uiShadowBoltVolleyTimer = 5*IN_MILISECONDS; - uiShiverTimer = 15*IN_MILISECONDS; + uiMindFlayTimer = 8*IN_MILLISECONDS; + uiShadowBoltVolleyTimer = 5*IN_MILLISECONDS; + uiShiverTimer = 15*IN_MILLISECONDS; if (pInstance) { @@ -276,20 +272,20 @@ struct boss_volazjAI : public ScriptedAI if (uiMindFlayTimer <= diff) { DoCast(me->getVictim(), SPELL_MIND_FLAY); - uiMindFlayTimer = 20*IN_MILISECONDS; + uiMindFlayTimer = 20*IN_MILLISECONDS; } else uiMindFlayTimer -= diff; if (uiShadowBoltVolleyTimer <= diff) { DoCast(me->getVictim(), SPELL_SHADOW_BOLT_VOLLEY); - uiShadowBoltVolleyTimer = 5*IN_MILISECONDS; + uiShadowBoltVolleyTimer = 5*IN_MILLISECONDS; } else uiShadowBoltVolleyTimer -= diff; if (uiShiverTimer <= diff) { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_SHIVER); - uiShiverTimer = 15*IN_MILISECONDS; + uiShiverTimer = 15*IN_MILLISECONDS; } else uiShiverTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp index eb8046f63cd..3ea1c0bda4f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp @@ -1,26 +1,25 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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 -*/ + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ /* * Comment: Complete - BUT THE TRIGGER NEEDS DATA WHETHER THE PRISON OF TALDARAM IS OFFLINE ! */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ahnkahet.h" enum Yells @@ -90,11 +89,11 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI void Reset() { - uiOpFerTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS); + uiOpFerTimer = urand(15*IN_MILLISECONDS,20*IN_MILLISECONDS); - uiCycloneTimer = 3*IN_MILISECONDS; - uiBoltTimer = 7*IN_MILISECONDS; - uiThunderTimer = 12*IN_MILISECONDS; + uiCycloneTimer = 3*IN_MILLISECONDS; + uiBoltTimer = 7*IN_MILLISECONDS; + uiThunderTimer = 12*IN_MILLISECONDS; bOpFerok = false; bOpFerokFail = false; @@ -248,7 +247,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) == IN_PROGRESS) OpferRufen(); bOnGround = false; - uiOpFerTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiOpFerTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } void OpferRufen() @@ -304,7 +303,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI if (uiCycloneTimer <= diff) { DoCast(me, SPELL_CYCLONE_STRIKE, false); - uiCycloneTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiCycloneTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiCycloneTimer -= diff; if (uiBoltTimer <= diff) @@ -312,7 +311,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) me->CastSpell(pTarget, DUNGEON_MODE(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false); - uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiBoltTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiBoltTimer -= diff; if (uiThunderTimer <= diff) @@ -320,7 +319,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) me->CastSpell(pTarget, DUNGEON_MODE(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false); - uiThunderTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); + uiThunderTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiThunderTimer -= diff; if (uiOpFerTimer <= diff) @@ -352,7 +351,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI return; bWalking = false; - bCheckTimer = 2*IN_MILISECONDS; + bCheckTimer = 2*IN_MILLISECONDS; if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS) { @@ -467,7 +466,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); } } - bCheckTimer = 2*IN_MILISECONDS; + bCheckTimer = 2*IN_MILLISECONDS; } else bCheckTimer -= diff; //Return since we have no target diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp index 93a66ccfbca..995fccd8611 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ahnkahet.h" enum Spells @@ -98,10 +97,10 @@ struct boss_taldaramAI : public ScriptedAI void Reset() { - uiBloodthirstTimer = 10*IN_MILISECONDS; - uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS); - uiEmbraceTimer = 20*IN_MILISECONDS; - uiFlamesphereTimer = 5*IN_MILISECONDS; + uiBloodthirstTimer = 10*IN_MILLISECONDS; + uiVanishTimer = urand(25*IN_MILLISECONDS,35*IN_MILLISECONDS); + uiEmbraceTimer = 20*IN_MILLISECONDS; + uiFlamesphereTimer = 5*IN_MILLISECONDS; uiEmbraceTakenDamage = 0; Phase = NORMAL; uiPhaseTimer = 0; @@ -130,7 +129,7 @@ struct boss_taldaramAI : public ScriptedAI Creature* pSpheres[3]; //DoCast(me, SPELL_FLAME_SPHERE_SUMMON_1); - pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS); + pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS); Unit *pSphereTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); if (pSphereTarget && pSpheres[0]) { @@ -143,9 +142,9 @@ struct boss_taldaramAI : public ScriptedAI if (IsHeroic()) { //DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_1); - pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS); + pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS); //DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_2); - pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS); + pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS); if (pSphereTarget && pSpheres[1] && pSpheres[2]) { float angle,x,y; @@ -181,7 +180,7 @@ struct boss_taldaramAI : public ScriptedAI me->SetSpeed(MOVE_WALK, 1.0f, true); me->GetMotionMaster()->MoveChase(me->getVictim()); Phase = FEEDING; - uiPhaseTimer = 20*IN_MILISECONDS; + uiPhaseTimer = 20*IN_MILLISECONDS; break; case FEEDING: Phase = NORMAL; @@ -192,15 +191,15 @@ struct boss_taldaramAI : public ScriptedAI if (uiBloodthirstTimer <= diff) { DoCast(me->getVictim(), SPELL_BLOODTHIRST); - uiBloodthirstTimer = 10*IN_MILISECONDS; + uiBloodthirstTimer = 10*IN_MILLISECONDS; } else uiBloodthirstTimer -= diff; if (uiFlamesphereTimer <= diff) { DoCast(me, SPELL_CONJURE_FLAME_SPHERE); Phase = CASTING_FLAME_SPHERES; - uiPhaseTimer = 3*IN_MILISECONDS + diff; - uiFlamesphereTimer = 15*IN_MILISECONDS; + uiPhaseTimer = 3*IN_MILLISECONDS + diff; + uiFlamesphereTimer = 15*IN_MILLISECONDS; } else uiFlamesphereTimer -= diff; if (uiVanishTimer <= diff) @@ -228,7 +227,7 @@ struct boss_taldaramAI : public ScriptedAI uiEmbraceTarget = pEmbraceTarget->GetGUID(); } - uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS); + uiVanishTimer = urand(25*IN_MILLISECONDS,35*IN_MILLISECONDS); } else uiVanishTimer -= diff; DoMeleeAttackIfReady(); @@ -339,7 +338,7 @@ struct mob_taldaram_flamesphereAI : public ScriptedAI DoCast(me, SPELL_FLAME_SPHERE_VISUAL); DoCast(me, SPELL_FLAME_SPHERE_SPAWN_EFFECT); DoCast(me, SPELL_FLAME_SPHERE_PERIODIC); - uiDespawnTimer = 10*IN_MILISECONDS; + uiDespawnTimer = 10*IN_MILLISECONDS; } void EnterCombat(Unit * /*who*/) {} diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp index 4e6e3ec8c9f..7d3fa8d5fba 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "ahnkahet.h" /* Ahn'kahet encounters: diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index c33ea69fa2d..adc3449862b 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -23,7 +22,7 @@ SDComment: AI for Argent Soldiers are not implemented. AI from bosses need more SDCategory: Trial of the Champion EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "trial_of_the_champion.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp index e1f4586ca6c..14b44079719 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -23,7 +22,7 @@ SDComment: missing yells. not sure about timers. SDCategory: Trial of the Champion EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" #include "trial_of_the_champion.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp index 4bf8143a210..53b71a5760e 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> -* 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * + * 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -21,7 +23,7 @@ SDComment: Is missing the ai to make the npcs look for a new mount and use it. SDCategory: Trial Of the Champion EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" #include "Vehicle.h" #include "trial_of_the_champion.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index 04b671ec11c..45cab67c0f4 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -23,7 +22,7 @@ SDComment: SDCategory: Trial Of the Champion EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "trial_of_the_champion.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp index 090b64b96cc..0ebe340a691 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -27,7 +26,7 @@ EndScriptData */ npc_announcer_toc5 EndContentData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "trial_of_the_champion.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h index 221c7c0412f..5533a4a8690 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h @@ -1,6 +1,20 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> -* This program is free software licensed under GPL version 2 -* Please see the included DOCS/LICENSE.TXT for more information */ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ #ifndef DEF_TOC_H #define DEF_TOC_H diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index ba64a4748dd..c03d3df15d8 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -1,26 +1,25 @@ /* - * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Comment: MAYBE need more improve the "Raptor Call". */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "drak_tharon_keep.h" enum eSpells @@ -71,12 +70,12 @@ struct boss_dredAI : public ScriptedAI pInstance->SetData(DATA_KING_DRED_ACHIEV, 0); } - uiBellowingRoarTimer = 33*IN_MILISECONDS; - uiGrievousBiteTimer = 20*IN_MILISECONDS; - uiManglingSlashTimer = 18.5*IN_MILISECONDS; - uiFearsomeRoarTimer = urand(10*IN_MILISECONDS,20*IN_MILISECONDS); - uiPiercingSlashTimer = 17*IN_MILISECONDS; - uiRaptorCallTimer = urand(20*IN_MILISECONDS,25*IN_MILISECONDS); + uiBellowingRoarTimer = 33*IN_MILLISECONDS; + uiGrievousBiteTimer = 20*IN_MILLISECONDS; + uiManglingSlashTimer = 18.5*IN_MILLISECONDS; + uiFearsomeRoarTimer = urand(10*IN_MILLISECONDS,20*IN_MILLISECONDS); + uiPiercingSlashTimer = 17*IN_MILLISECONDS; + uiRaptorCallTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS); } void EnterCombat(Unit* /*who*/) @@ -94,31 +93,31 @@ struct boss_dredAI : public ScriptedAI if (uiBellowingRoarTimer < diff) { DoCastAOE(SPELL_BELLOWING_ROAR, false); - uiBellowingRoarTimer = 40*IN_MILISECONDS; + uiBellowingRoarTimer = 40*IN_MILLISECONDS; } else uiBellowingRoarTimer -=diff; if (uiGrievousBiteTimer < diff) { DoCastVictim(SPELL_GRIEVOUS_BITE ,false); - uiGrievousBiteTimer = 20*IN_MILISECONDS; + uiGrievousBiteTimer = 20*IN_MILLISECONDS; } else uiGrievousBiteTimer -=diff; if (uiManglingSlashTimer < diff) { DoCastVictim(SPELL_MANGLING_SLASH,false); - uiManglingSlashTimer = 20*IN_MILISECONDS; + uiManglingSlashTimer = 20*IN_MILLISECONDS; } else uiManglingSlashTimer -=diff; if (uiFearsomeRoarTimer < diff) { DoCastAOE(SPELL_FEARSOME_ROAR,false); - uiFearsomeRoarTimer = urand(16*IN_MILISECONDS,18*IN_MILISECONDS); + uiFearsomeRoarTimer = urand(16*IN_MILLISECONDS,18*IN_MILLISECONDS); } else uiFearsomeRoarTimer -=diff; if (uiPiercingSlashTimer < diff) { DoCastVictim(SPELL_PIERCING_SLASH,false); - uiPiercingSlashTimer = 20*IN_MILISECONDS; + uiPiercingSlashTimer = 20*IN_MILLISECONDS; } else uiPiercingSlashTimer -=diff; if (uiRaptorCallTimer < diff) @@ -128,9 +127,9 @@ struct boss_dredAI : public ScriptedAI float x,y,z; me->GetClosePoint(x,y,z,me->GetObjectSize()/3,10.0f); - me->SummonCreature(RAND(NPC_RAPTOR_1,NPC_RAPTOR_2),x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1*IN_MILISECONDS); + me->SummonCreature(RAND(NPC_RAPTOR_1,NPC_RAPTOR_2),x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1*IN_MILLISECONDS); - uiRaptorCallTimer = urand(20*IN_MILISECONDS,25*IN_MILISECONDS); + uiRaptorCallTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS); } else uiRaptorCallTimer -=diff; DoMeleeAttackIfReady(); @@ -214,7 +213,7 @@ struct npc_drakkari_scytheclawAI : public ScriptedAI void Reset() { - uiRendTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); + uiRendTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS); } void UpdateAI(const uint32 diff) @@ -226,7 +225,7 @@ struct npc_drakkari_scytheclawAI : public ScriptedAI if (uiRendTimer < diff) { DoCastVictim(SPELL_REND,false); - uiRendTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); + uiRendTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS); }else uiRendTimer -=diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index 5e8792c352d..e8abb804417 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "drak_tharon_keep.h" enum Spells @@ -118,8 +117,8 @@ struct boss_novosAI : public Scripted_NoMovementAI { DoScriptText(SAY_AGGRO, me); Phase = PHASE_1; - uiCrystalHandlerTimer = 30*IN_MILISECONDS; - uiTimer = 1*IN_MILISECONDS; + uiCrystalHandlerTimer = 30*IN_MILLISECONDS; + uiTimer = 1*IN_MILLISECONDS; DoCast(SPELL_ARCANE_FIELD); if (pInstance) { @@ -142,18 +141,18 @@ struct boss_novosAI : public Scripted_NoMovementAI case PHASE_1: if (uiTimer <= diff) { - Creature *pSummon = me->SummonCreature(RAND(CREATURE_FETID_TROLL_CORPSE,CREATURE_HULKING_CORPSE,CREATURE_RISEN_SHADOWCASTER), AddSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS); + Creature *pSummon = me->SummonCreature(RAND(CREATURE_FETID_TROLL_CORPSE,CREATURE_HULKING_CORPSE,CREATURE_RISEN_SHADOWCASTER), AddSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS); pSummon->GetMotionMaster()->MovePoint(0, AddDestinyPoint); //If spell is casted stops casting arcane field so no spell casting //DoCast(me, SPELL_SUMMON_MINIONS); - uiTimer = 3*IN_MILISECONDS; + uiTimer = 3*IN_MILLISECONDS; } else uiTimer -= diff; if (uiCrystalHandlerTimer <= diff) { DoScriptText(SAY_NECRO_ADD, me); - Creature *pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS); + Creature *pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS); pCrystalHandler->GetMotionMaster()->MovePoint(0, AddDestinyPoint); - uiCrystalHandlerTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); + uiCrystalHandlerTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); } else uiCrystalHandlerTimer -= diff; break; case PHASE_2: @@ -162,7 +161,7 @@ struct boss_novosAI : public Scripted_NoMovementAI if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, DUNGEON_MODE(RAND(SPELL_ARCANE_BLAST,SPELL_BLIZZARD,SPELL_FROSTBOLT,SPELL_WRATH_OF_MISERY), RAND(H_SPELL_ARCANE_BLAST,H_SPELL_BLIZZARD,H_SPELL_FROSTBOLT,H_SPELL_WRATH_OF_MISERY))); - uiTimer = urand(1*IN_MILISECONDS,3*IN_MILISECONDS); + uiTimer = urand(1*IN_MILLISECONDS,3*IN_MILLISECONDS); } else uiTimer -= diff; break; } @@ -208,7 +207,7 @@ struct boss_novosAI : public Scripted_NoMovementAI me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Phase = PHASE_2; - uiTimer = 1*IN_MILISECONDS; + uiTimer = 1*IN_MILLISECONDS; } } @@ -237,7 +236,7 @@ struct mob_crystal_handlerAI : public ScriptedAI void Reset() { - uiFlashOfDarknessTimer = 5*IN_MILISECONDS; + uiFlashOfDarknessTimer = 5*IN_MILLISECONDS; } void JustDied(Unit* /*killer*/) @@ -254,7 +253,7 @@ struct mob_crystal_handlerAI : public ScriptedAI if (uiFlashOfDarknessTimer <= diff) { DoCast(me->getVictim(), DUNGEON_MODE(SPELL_FLASH_OF_DARKNESS,H_SPELL_FLASH_OF_DARKNESS)); - uiFlashOfDarknessTimer = 5*IN_MILISECONDS; + uiFlashOfDarknessTimer = 5*IN_MILLISECONDS; } else uiFlashOfDarknessTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp index 1e60dfc6135..46121f49849 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> -* -* 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 -*/ + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "drak_tharon_keep.h" enum Spells @@ -86,10 +85,10 @@ struct boss_tharon_jaAI : public ScriptedAI void Reset() { - uiPhaseTimer = 20*IN_MILISECONDS; - uiCurseOfLifeTimer = 1*IN_MILISECONDS; - uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS); - uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS); + uiPhaseTimer = 20*IN_MILLISECONDS; + uiCurseOfLifeTimer = 1*IN_MILLISECONDS; + uiRainOfFireTimer = urand(14*IN_MILLISECONDS,18*IN_MILLISECONDS); + uiShadowVolleyTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS); Phase = SKELETAL; me->SetDisplayId(me->GetNativeDisplayId()); if (pInstance) @@ -117,26 +116,26 @@ struct boss_tharon_jaAI : public ScriptedAI { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_CURSE_OF_LIFE); - uiCurseOfLifeTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); + uiCurseOfLifeTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS); } else uiCurseOfLifeTimer -= diff; if (uiShadowVolleyTimer < diff) { DoCastVictim(SPELL_SHADOW_VOLLEY); - uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS); + uiShadowVolleyTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS); } else uiShadowVolleyTimer -= diff; if (uiRainOfFireTimer < diff) { DoCastAOE(SPELL_RAIN_OF_FIRE); - uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS); + uiRainOfFireTimer = urand(14*IN_MILLISECONDS,18*IN_MILLISECONDS); } else uiRainOfFireTimer -= diff; if (uiPhaseTimer < diff) { DoCast(SPELL_DECAY_FLESH); Phase = GOING_FLESH; - uiPhaseTimer = 6*IN_MILISECONDS; + uiPhaseTimer = 6*IN_MILLISECONDS; } else uiPhaseTimer -= diff; DoMeleeAttackIfReady(); @@ -156,10 +155,10 @@ struct boss_tharon_jaAI : public ScriptedAI pTemp->SetDisplayId(MODEL_SKELETON); } } - uiPhaseTimer = 20*IN_MILISECONDS; - uiLightningBreathTimer = urand(3*IN_MILISECONDS,4*IN_MILISECONDS); - uiEyeBeamTimer = urand(4*IN_MILISECONDS,8*IN_MILISECONDS); - uiPoisonCloudTimer = urand(6*IN_MILISECONDS,7*IN_MILISECONDS); + uiPhaseTimer = 20*IN_MILLISECONDS; + uiLightningBreathTimer = urand(3*IN_MILLISECONDS,4*IN_MILLISECONDS); + uiEyeBeamTimer = urand(4*IN_MILLISECONDS,8*IN_MILLISECONDS); + uiPoisonCloudTimer = urand(6*IN_MILLISECONDS,7*IN_MILLISECONDS); Phase = FLESH; } else uiPhaseTimer -= diff; break; @@ -168,27 +167,27 @@ struct boss_tharon_jaAI : public ScriptedAI { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_LIGHTNING_BREATH); - uiLightningBreathTimer = urand(6*IN_MILISECONDS,7*IN_MILISECONDS); + uiLightningBreathTimer = urand(6*IN_MILLISECONDS,7*IN_MILLISECONDS); } else uiLightningBreathTimer -= diff; if (uiEyeBeamTimer < diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_EYE_BEAM); - uiEyeBeamTimer = urand(4*IN_MILISECONDS,6*IN_MILISECONDS); + uiEyeBeamTimer = urand(4*IN_MILLISECONDS,6*IN_MILLISECONDS); } else uiEyeBeamTimer -= diff; if (uiPoisonCloudTimer < diff) { DoCastAOE(SPELL_POISON_CLOUD); - uiPoisonCloudTimer = urand(10*IN_MILISECONDS,12*IN_MILISECONDS); + uiPoisonCloudTimer = urand(10*IN_MILLISECONDS,12*IN_MILLISECONDS); } else uiPoisonCloudTimer -= diff; if (uiPhaseTimer < diff) { DoCast(SPELL_RETURN_FLESH); Phase = GOING_SKELETAL; - uiPhaseTimer = 6*IN_MILISECONDS; + uiPhaseTimer = 6*IN_MILLISECONDS; } else uiPhaseTimer -= diff; DoMeleeAttackIfReady(); break; @@ -198,10 +197,10 @@ struct boss_tharon_jaAI : public ScriptedAI DoScriptText(RAND(SAY_SKELETON_1,SAY_SKELETON_2), me); me->DeMorph(); Phase = SKELETAL; - uiPhaseTimer = 20*IN_MILISECONDS; - uiCurseOfLifeTimer = 1*IN_MILISECONDS; - uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS); - uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS); + uiPhaseTimer = 20*IN_MILLISECONDS; + uiCurseOfLifeTimer = 1*IN_MILLISECONDS; + uiRainOfFireTimer = urand(14*IN_MILLISECONDS,18*IN_MILLISECONDS); + uiShadowVolleyTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS); std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) { diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index 03eac73385d..4281ab53463 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -1,26 +1,25 @@ /* - * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Comment: TODO: spawn troll waves */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "drak_tharon_keep.h" enum Spells @@ -77,12 +76,12 @@ struct boss_trollgoreAI : public ScriptedAI void Reset() { - uiConsumeTimer = 15*IN_MILISECONDS; - uiAuraCountTimer = 15.5*IN_MILISECONDS; - uiCrushTimer = urand(1*IN_MILISECONDS,5*IN_MILISECONDS); - uiInfectedWoundTimer = urand(60*IN_MILISECONDS,10*IN_MILISECONDS); - uiExplodeCorpseTimer = 3*IN_MILISECONDS; - uiSpawnTimer = urand(30*IN_MILISECONDS,40*IN_MILISECONDS); + uiConsumeTimer = 15*IN_MILLISECONDS; + uiAuraCountTimer = 15.5*IN_MILLISECONDS; + uiCrushTimer = urand(1*IN_MILLISECONDS,5*IN_MILLISECONDS); + uiInfectedWoundTimer = urand(60*IN_MILLISECONDS,10*IN_MILLISECONDS); + uiExplodeCorpseTimer = 3*IN_MILLISECONDS; + uiSpawnTimer = urand(30*IN_MILLISECONDS,40*IN_MILLISECONDS); bAchiev = IsHeroic(); @@ -113,14 +112,14 @@ struct boss_trollgoreAI : public ScriptedAI uint32 spawnNumber = urand(2,DUNGEON_MODE(3,5)); for (uint8 i = 0; i < spawnNumber; ++i) DoSummon(RAND(NPC_DRAKKARI_INVADER_1,NPC_DRAKKARI_INVADER_2), AddSpawnPoint, 0, TEMPSUMMON_DEAD_DESPAWN); - uiSpawnTimer = urand(30*IN_MILISECONDS,40*IN_MILISECONDS); + uiSpawnTimer = urand(30*IN_MILLISECONDS,40*IN_MILLISECONDS); } else uiSpawnTimer -= diff; if (uiConsumeTimer <= diff) { DoScriptText(SAY_CONSUME, me); DoCast(SPELL_CONSUME); - uiConsumeTimer = 15*IN_MILISECONDS; + uiConsumeTimer = 15*IN_MILLISECONDS; } else uiConsumeTimer -= diff; if (bAchiev) @@ -133,20 +132,20 @@ struct boss_trollgoreAI : public ScriptedAI if (uiCrushTimer <= diff) { DoCastVictim(SPELL_CRUSH); - uiCrushTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); + uiCrushTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS); } else uiCrushTimer -= diff; if (uiInfectedWoundTimer <= diff) { DoCastVictim(SPELL_INFECTED_WOUND); - uiInfectedWoundTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS); + uiInfectedWoundTimer = urand(25*IN_MILLISECONDS,35*IN_MILLISECONDS); } else uiInfectedWoundTimer -= diff; if (uiExplodeCorpseTimer <= diff) { DoCast(SPELL_CORPSE_EXPLODE); DoScriptText(SAY_EXPLODE, me); - uiExplodeCorpseTimer = urand(15*IN_MILISECONDS,19*IN_MILISECONDS); + uiExplodeCorpseTimer = urand(15*IN_MILLISECONDS,19*IN_MILLISECONDS); } else uiExplodeCorpseTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h index 597971d17dd..11e6f1557db 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h +++ b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h @@ -1,20 +1,19 @@ /* -* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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 -*/ + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ #ifndef DEF_DRAK_THARON_H #define DEF_DRAK_THARON_H diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index 9f4d2ee52a2..2c36217755d 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "drak_tharon_keep.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index 59db2842735..6ac11c81e2d 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "forge_of_souls.h" /* diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index 6811ba953e2..13d65619a13 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "forge_of_souls.h" /* diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index 5c85da69898..0e0c22c9b10 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "forge_of_souls.h" enum Spells diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h index e0479eb4d2b..df2c682eaa1 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h @@ -1,17 +1,18 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_FORGE_OF_SOULS_H diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index 67a6cdb4579..074a9d40915 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "forge_of_souls.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp index c9978faca6e..ddb6191c999 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_reflection.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp index 95fb2737ce9..47af8fd19c0 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_reflection.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index fb3d3d5d752..65f326e924f 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_reflection.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h index 46ae0cb283c..0e4dc94b826 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h @@ -1,17 +1,18 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_HALLS_OF_REFLECTION_H diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index 7a5d2479b7c..8a6ffb82fc2 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_reflection.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index 25c78c4a0d3..e854c767f63 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "pit_of_saron.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index 8b8b03a3d4e..961451051a7 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "pit_of_saron.h" /* diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index 55ffa0b4e4b..6f45c3ef76f 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "pit_of_saron.h" /* diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index 8512eca24c1..595b5d01228 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "pit_of_saron.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp index bc53efc7033..b9b8504fcf0 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "pit_of_saron.h" /***************************************SPELLS*************************************/ diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h index 4a221d17518..98ee73a6fe8 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h @@ -1,17 +1,18 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_PIT_OF_SARON_H diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index 04603c68813..3bb998c7096 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -1,26 +1,25 @@ /* - * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Comment: The event with the Living Mojos is not implemented, just is done that when one of the mojos around the boss take damage will make the boss enter in combat! */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "gundrak.h" enum Spells @@ -59,7 +58,7 @@ struct boss_drakkari_colossusAI : public ScriptedAI me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->clearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT); me->SetReactState(REACT_PASSIVE); - MightyBlowTimer = 10*IN_MILISECONDS; + MightyBlowTimer = 10*IN_MILLISECONDS; bHealth = false; bHealth1 = false; } @@ -115,7 +114,7 @@ struct boss_drakkari_colossusAI : public ScriptedAI if (MightyBlowTimer <= diff) { DoCast(me->getVictim(), SPELL_MIGHTY_BLOW, true); - MightyBlowTimer = 10*IN_MILISECONDS; + MightyBlowTimer = 10*IN_MILLISECONDS; } else MightyBlowTimer -= diff; if (!me->hasUnitState(UNIT_STAT_STUNNED)) @@ -153,7 +152,7 @@ struct boss_drakkari_elementalAI : public ScriptedAI { if (Creature *pColossus = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_DRAKKARI_COLOSSUS) : 0)) CAST_AI(boss_drakkari_colossusAI, pColossus->AI())->CreatureState(me, true); - uiSurgeTimer = 7*IN_MILISECONDS; + uiSurgeTimer = 7*IN_MILLISECONDS; bGoToColossus = false; } @@ -196,7 +195,7 @@ struct boss_drakkari_elementalAI : public ScriptedAI if (uiSurgeTimer <= diff) { DoCast(me->getVictim(), SPELL_SURGE); - uiSurgeTimer = 7*IN_MILISECONDS; + uiSurgeTimer = 7*IN_MILLISECONDS; } else uiSurgeTimer -= diff; DoMeleeAttackIfReady(); @@ -223,8 +222,8 @@ struct npc_living_mojoAI : public ScriptedAI void Reset() { - uiMojoWaveTimer = 2*IN_MILISECONDS; - uiMojoPuddleTimer = 7*IN_MILISECONDS; + uiMojoWaveTimer = 2*IN_MILLISECONDS; + uiMojoPuddleTimer = 7*IN_MILLISECONDS; } void EnterCombat(Unit* /*who*/) @@ -268,13 +267,13 @@ struct npc_living_mojoAI : public ScriptedAI if (uiMojoWaveTimer <= diff) { DoCast(me->getVictim(), SPELL_MOJO_WAVE); - uiMojoWaveTimer = 15*IN_MILISECONDS; + uiMojoWaveTimer = 15*IN_MILLISECONDS; } else uiMojoWaveTimer -= diff; if (uiMojoPuddleTimer <= diff) { DoCast(me->getVictim(), SPELL_MOJO_PUDDLE); - uiMojoPuddleTimer = 18*IN_MILISECONDS; + uiMojoPuddleTimer = 18*IN_MILLISECONDS; } else uiMojoPuddleTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp index 3bf1a33da5a..8ddcc12ae49 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "gundrak.h" enum Spells @@ -48,10 +47,10 @@ struct boss_eckAI : public ScriptedAI void Reset() { - uiBerserkTimer = urand(60*IN_MILISECONDS,90*IN_MILISECONDS); //60-90 secs according to wowwiki - uiBiteTimer = 5*IN_MILISECONDS; - uiSpitTimer = 10*IN_MILISECONDS; - uiSpringTimer = 8*IN_MILISECONDS; + uiBerserkTimer = urand(60*IN_MILLISECONDS,90*IN_MILLISECONDS); //60-90 secs according to wowwiki + uiBiteTimer = 5*IN_MILLISECONDS; + uiSpitTimer = 10*IN_MILLISECONDS; + uiSpringTimer = 8*IN_MILLISECONDS; bBerserk = false; @@ -74,13 +73,13 @@ struct boss_eckAI : public ScriptedAI if (uiBiteTimer <= diff) { DoCast(me->getVictim(), SPELL_ECK_BITE); - uiBiteTimer = urand(8*IN_MILISECONDS,12*IN_MILISECONDS); + uiBiteTimer = urand(8*IN_MILLISECONDS,12*IN_MILLISECONDS); } else uiBiteTimer -= diff; if (uiSpitTimer <= diff) { DoCast(me->getVictim(), SPELL_ECK_SPIT); - uiSpitTimer = urand(6*IN_MILISECONDS,14*IN_MILISECONDS); + uiSpitTimer = urand(6*IN_MILLISECONDS,14*IN_MILLISECONDS); } else uiSpitTimer -= diff; if (uiSpringTimer <= diff) @@ -89,7 +88,7 @@ struct boss_eckAI : public ScriptedAI if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) { DoCast(pTarget, RAND(SPELL_ECK_SPRING_1, SPELL_ECK_SPRING_2)); - uiSpringTimer = urand(5*IN_MILISECONDS,10*IN_MILISECONDS); + uiSpringTimer = urand(5*IN_MILLISECONDS,10*IN_MILLISECONDS); } } else uiSpringTimer -= diff; @@ -142,7 +141,7 @@ struct npc_ruins_dwellerAI : public ScriptedAI { pInstance->SetData64(DATA_RUIN_DWELLER_DIED,me->GetGUID()); if (pInstance->GetData(DATA_ALIVE_RUIN_DWELLERS) == 0) - me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILISECONDS); + me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILLISECONDS); } } }; diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index c87a6600783..e90b244b118 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "gundrak.h" //Spells @@ -95,13 +94,13 @@ struct boss_gal_darahAI : public ScriptedAI void Reset() { - uiStampedeTimer = 10*IN_MILISECONDS; - uiWhirlingSlashTimer = 21*IN_MILISECONDS; - uiPunctureTimer = 10*IN_MILISECONDS; - uiEnrageTimer = 15*IN_MILISECONDS; - uiImpalingChargeTimer = 21*IN_MILISECONDS; - uiStompTimer = 25*IN_MILISECONDS; - uiTransformationTimer = 9*IN_MILISECONDS; + uiStampedeTimer = 10*IN_MILLISECONDS; + uiWhirlingSlashTimer = 21*IN_MILLISECONDS; + uiPunctureTimer = 10*IN_MILLISECONDS; + uiEnrageTimer = 15*IN_MILLISECONDS; + uiImpalingChargeTimer = 21*IN_MILLISECONDS; + uiStompTimer = 25*IN_MILLISECONDS; + uiTransformationTimer = 9*IN_MILLISECONDS; uiPhaseCounter = 0; lImpaledPlayers.clear(); @@ -141,7 +140,7 @@ struct boss_gal_darahAI : public ScriptedAI Phase = RHINO; uiPhaseCounter = 0; DoScriptText(SAY_TRANSFORM_1, me); - uiTransformationTimer = 5*IN_MILISECONDS; + uiTransformationTimer = 5*IN_MILLISECONDS; bStartOfTransformation = true; me->clearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT); me->SetReactState(REACT_AGGRESSIVE); @@ -164,13 +163,13 @@ struct boss_gal_darahAI : public ScriptedAI { DoCast(me, SPELL_STAMPEDE); DoScriptText(RAND(SAY_SUMMON_RHINO_1,SAY_SUMMON_RHINO_2,SAY_SUMMON_RHINO_3),me); - uiStampedeTimer = 15*IN_MILISECONDS; + uiStampedeTimer = 15*IN_MILLISECONDS; } else uiStampedeTimer -= diff; if (uiWhirlingSlashTimer <= diff) { DoCast(me->getVictim(), SPELL_WHIRLING_SLASH); - uiWhirlingSlashTimer = 21*IN_MILISECONDS; + uiWhirlingSlashTimer = 21*IN_MILLISECONDS; ++uiPhaseCounter; } else uiWhirlingSlashTimer -= diff; } @@ -184,7 +183,7 @@ struct boss_gal_darahAI : public ScriptedAI Phase = TROLL; uiPhaseCounter = 0; DoScriptText(SAY_TRANSFORM_2, me); - uiTransformationTimer = 9*IN_MILISECONDS; + uiTransformationTimer = 9*IN_MILLISECONDS; bStartOfTransformation = true; me->clearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT); me->SetReactState(REACT_AGGRESSIVE); @@ -206,19 +205,19 @@ struct boss_gal_darahAI : public ScriptedAI if (uiPunctureTimer <= diff) { DoCast(me->getVictim(), SPELL_PUNCTURE); - uiPunctureTimer = 8*IN_MILISECONDS; + uiPunctureTimer = 8*IN_MILLISECONDS; } else uiPunctureTimer -= diff; if (uiEnrageTimer <= diff) { DoCast(me->getVictim(), SPELL_ENRAGE); - uiEnrageTimer = 20*IN_MILISECONDS; + uiEnrageTimer = 20*IN_MILLISECONDS; } else uiEnrageTimer -= diff; if (uiStompTimer <= diff) { DoCast(me->getVictim(), SPELL_STOMP); - uiStompTimer = 20*IN_MILISECONDS; + uiStompTimer = 20*IN_MILLISECONDS; } else uiStompTimer -= diff; if (uiImpalingChargeTimer <= diff) @@ -228,7 +227,7 @@ struct boss_gal_darahAI : public ScriptedAI DoCast(pTarget, SPELL_IMPALING_CHARGE); lImpaledPlayers.insert(pTarget->GetGUID()); } - uiImpalingChargeTimer = 31*IN_MILISECONDS; + uiImpalingChargeTimer = 31*IN_MILLISECONDS; ++uiPhaseCounter; } else uiImpalingChargeTimer -= diff; } diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index 84a7d8bc654..7a9278b2fde 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "gundrak.h" enum eSpells @@ -67,10 +66,10 @@ struct boss_moorabiAI : public ScriptedAI void Reset() { - uiGroundTremorTimer = 18*IN_MILISECONDS; - uiNumblingShoutTimer = 10*IN_MILISECONDS; - uiDeterminedStabTimer = 20*IN_MILISECONDS; - uiTransformationTImer = 12*IN_MILISECONDS; + uiGroundTremorTimer = 18*IN_MILLISECONDS; + uiNumblingShoutTimer = 10*IN_MILLISECONDS; + uiDeterminedStabTimer = 20*IN_MILLISECONDS; + uiTransformationTImer = 12*IN_MILLISECONDS; bPhase = false; if (pInstance) @@ -105,7 +104,7 @@ struct boss_moorabiAI : public ScriptedAI DoCast(me->getVictim(), SPELL_QUAKE, true); else DoCast(me->getVictim(), SPELL_GROUND_TREMOR, true); - uiGroundTremorTimer = 10*IN_MILISECONDS; + uiGroundTremorTimer = 10*IN_MILLISECONDS; } else uiGroundTremorTimer -= uiDiff; if (uiNumblingShoutTimer <= uiDiff) @@ -114,7 +113,7 @@ struct boss_moorabiAI : public ScriptedAI DoCast(me->getVictim(), SPELL_NUMBING_ROAR, true); else DoCast(me->getVictim(), SPELL_NUMBING_SHOUT, true); - uiNumblingShoutTimer = 10*IN_MILISECONDS; + uiNumblingShoutTimer = 10*IN_MILLISECONDS; } else uiNumblingShoutTimer -=uiDiff; if (uiDeterminedStabTimer <= uiDiff) @@ -123,7 +122,7 @@ struct boss_moorabiAI : public ScriptedAI DoCast(me->getVictim(), SPELL_DETERMINED_GORE); else DoCast(me->getVictim(), SPELL_DETERMINED_STAB, true); - uiDeterminedStabTimer = 8*IN_MILISECONDS; + uiDeterminedStabTimer = 8*IN_MILLISECONDS; } else uiDeterminedStabTimer -=uiDiff; if (!bPhase && uiTransformationTImer <= uiDiff) @@ -131,7 +130,7 @@ struct boss_moorabiAI : public ScriptedAI DoScriptText(EMOTE_TRANSFORM, me); DoScriptText(SAY_TRANSFORM, me); DoCast(me, SPELL_TRANSFORMATION, false); - uiTransformationTImer = 10*IN_MILISECONDS; + uiTransformationTImer = 10*IN_MILLISECONDS; } else uiTransformationTImer -= uiDiff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index 1014beaeddd..47a55440b92 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "gundrak.h" //Spells @@ -86,10 +85,10 @@ struct boss_slad_ranAI : public ScriptedAI void Reset() { - uiPoisonNovaTimer = 10*IN_MILISECONDS; - uiPowerfullBiteTimer = 3*IN_MILISECONDS; - uiVenomBoltTimer = 15*IN_MILISECONDS; - uiSpawnTimer = 5*IN_MILISECONDS; + uiPoisonNovaTimer = 10*IN_MILLISECONDS; + uiPowerfullBiteTimer = 3*IN_MILLISECONDS; + uiVenomBoltTimer = 15*IN_MILLISECONDS; + uiSpawnTimer = 5*IN_MILLISECONDS; uiPhase = 0; lSummons.DespawnAll(); @@ -115,19 +114,19 @@ struct boss_slad_ranAI : public ScriptedAI if (uiPoisonNovaTimer <= diff) { DoCast(me->getVictim(), SPELL_POISON_NOVA); - uiPoisonNovaTimer = 15*IN_MILISECONDS; + uiPoisonNovaTimer = 15*IN_MILLISECONDS; } else uiPoisonNovaTimer -= diff; if (uiPowerfullBiteTimer <= diff) { DoCast(me->getVictim(), SPELL_POWERFULL_BITE); - uiPowerfullBiteTimer = 10*IN_MILISECONDS; + uiPowerfullBiteTimer = 10*IN_MILLISECONDS; } else uiPowerfullBiteTimer -= diff; if (uiVenomBoltTimer <= diff) { DoCast(me->getVictim(), SPELL_VENOM_BOLT); - uiVenomBoltTimer = 10*IN_MILISECONDS; + uiVenomBoltTimer = 10*IN_MILLISECONDS; } else uiVenomBoltTimer -= diff; if (uiPhase) @@ -136,11 +135,11 @@ struct boss_slad_ranAI : public ScriptedAI { if (uiPhase == 1) for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i) - me->SummonCreature(CREATURE_SNAKE, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS); + me->SummonCreature(CREATURE_SNAKE, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS); if (uiPhase == 2) for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i) - me->SummonCreature(CREATURE_CONSTRICTORS, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS); - uiSpawnTimer = 5*IN_MILISECONDS; + me->SummonCreature(CREATURE_CONSTRICTORS, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS); + uiSpawnTimer = 5*IN_MILLISECONDS; } else uiSpawnTimer -= diff; } @@ -187,7 +186,7 @@ struct mob_slad_ran_constrictorAI : public ScriptedAI void Reset() { - uiGripOfSladRanTimer = 1*IN_MILISECONDS; + uiGripOfSladRanTimer = 1*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -197,7 +196,7 @@ struct mob_slad_ran_constrictorAI : public ScriptedAI if (uiGripOfSladRanTimer <= diff) { DoCast(me->getVictim(), SPELL_GRIP_OF_SLAD_RAN); - uiGripOfSladRanTimer = 5*IN_MILISECONDS; + uiGripOfSladRanTimer = 5*IN_MILLISECONDS; } else uiGripOfSladRanTimer -= diff; } @@ -214,7 +213,7 @@ struct mob_slad_ran_viperAI : public ScriptedAI void Reset() { - uiVenomousBiteTimer = 2*IN_MILISECONDS; + uiVenomousBiteTimer = 2*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -225,7 +224,7 @@ struct mob_slad_ran_viperAI : public ScriptedAI if (uiVenomousBiteTimer <= diff) { DoCast(me->getVictim(), SPELL_VENOMOUS_BITE); - uiVenomousBiteTimer = 10*IN_MILISECONDS; + uiVenomousBiteTimer = 10*IN_MILLISECONDS; } else uiVenomousBiteTimer -= diff; } }; diff --git a/src/server/scripts/Northrend/Gundrak/gundrak.h b/src/server/scripts/Northrend/Gundrak/gundrak.h index a443aa4e698..c6858b8930c 100644 --- a/src/server/scripts/Northrend/Gundrak/gundrak.h +++ b/src/server/scripts/Northrend/Gundrak/gundrak.h @@ -1,20 +1,19 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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 -*/ + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ #ifndef DEF_GUNDRAK_H #define DEF_GUNDRAK_H diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 4dd896f74f2..6ca2e0886c6 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -1,22 +1,21 @@ /* -* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/> -* -* 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" + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "gundrak.h" #define MAX_ENCOUNTER 5 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp index 896eb068eb6..567f1f01c4d 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" #define SAY_GREET RAND(-1533000,-1533004,-1533005,-1533006,-1533007) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index aa5a940eb8f..b6a3760e6b6 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" enum Yells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index f04b39040db..d04180aa037 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" enum Horsemen diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp index ab6fa6c46d3..a91fa207df7 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" #define SPELL_MORTAL_WOUND 25646 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index d958ff24951..4fcf902714c 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" enum Yells @@ -182,7 +183,7 @@ struct boss_gothikAI : public BossAI if (LiveTriggerGUID.size() < POS_LIVE || DeadTriggerGUID.size() < POS_DEAD) { - error_log("Script Gothik: cannot summon triggers!"); + sLog.outError("Script Gothik: cannot summon triggers!"); EnterEvadeMode(); return; } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index 7df01e18483..1d96a2d70ab 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" #define SPELL_BOMBARD_SLIME 28280 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index 1de9c0e00c8..00b6f498ce0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" #define SAY_AGGRO RAND(-1533109,-1533110,-1533111) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_highlord_mograine.cpp b/src/server/scripts/Northrend/Naxxramas/boss_highlord_mograine.cpp deleted file mode 100644 index 4eb72a3780e..00000000000 --- a/src/server/scripts/Northrend/Naxxramas/boss_highlord_mograine.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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 - */ - -/* ScriptData -SDName: Boss_Highlord_Mograine -SD%Complete: 100 -SDComment: SCRIPT OBSOLETE -SDCategory: Naxxramas -EndScriptData */ - -#include "precompiled.h" - -//All horsemen -#define SPELL_SHIELDWALL 29061 -#define SPELL_BESERK 26662 - -// highlord mograine -#define SPELL_MARK_OF_MOGRAINE 28834 -#define SPELL_RIGHTEOUS_FIRE 28882 // Applied as a 25% chance on melee hit to proc. me->GetVictim() - -#define SAY_TAUNT1 "Enough prattling. Let them come! We shall grind their bones to dust." -#define SAY_TAUNT2 "Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough." -#define SAY_TAUNT3 "Life is meaningless. It is in death that we are truly tested." -#define SAY_AGGRO1 "You seek death?" -#define SAY_AGGRO2 "None shall pass!" -#define SAY_AGGRO3 "Be still!" -#define SAY_SLAY1 "You will find no peace in death." -#define SAY_SLAY2 "The master's will is done." -#define SAY_SPECIAL "Bow to the might of the Highlord!" -#define SAY_DEATH "I... am... released! Perhaps it's not too late to - noo! I need... more time..." - -#define SOUND_TAUNT1 8842 -#define SOUND_TAUNT2 8843 -#define SOUND_TAUNT3 8844 -#define SOUND_AGGRO1 8835 -#define SOUND_AGGRO2 8836 -#define SOUND_AGGRO3 8837 -#define SOUND_SLAY1 8839 -#define SOUND_SLAY2 8840 -#define SOUND_SPECIAL 8841 -#define SOUND_DEATH 8838 - -#define SPIRIT_OF_MOGRAINE 16775 - -struct TRINITY_DLL_DECL boss_highlord_mograineAI : public ScriptedAI -{ - boss_highlord_mograineAI(Creature *c) : ScriptedAI(c) {} - - uint32 Mark_Timer; - uint32 RighteousFire_Timer; - bool ShieldWall1; - bool ShieldWall2; - - void Reset() - { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - RighteousFire_Timer = 2000; // applied approx 1 out of 4 attacks - ShieldWall1 = true; - ShieldWall2 = true; - } - - void InitialYell() - { - if (!me->isInCombat()) - { - switch(rand()%3) - { - case 0: - DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(me,SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(me,SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(me,SOUND_AGGRO3); - break; - } - } - } - - void KilledUnit() - { - switch(rand()%2) - { - case 0: - DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(me,SOUND_SLAY1); - break; - case 1: - DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(me,SOUND_SLAY2); - break; - } - } - - void JustDied(Unit* Killer) - { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(me, SOUND_DEATH); - } - - void Aggro(Unit *who) - { - InitialYell(); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - // Mark of Mograine - if (Mark_Timer < diff) - { - DoCast(me->getVictim(),SPELL_MARK_OF_MOGRAINE); - Mark_Timer = 12000; - }else Mark_Timer -= diff; - - // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if (ShieldWall1 && (me->GetHealth()*100 / me->GetMaxHealth()) < 50) - { - if (ShieldWall1) - { - DoCast(me,SPELL_SHIELDWALL); - ShieldWall1 = false; - } - } - if (ShieldWall2 && (me->GetHealth()*100 / me->GetMaxHealth()) < 20) - { - if (ShieldWall2) - { - DoCast(me,SPELL_SHIELDWALL); - ShieldWall2 = false; - } - } - - // Righteous Fire - if (RighteousFire_Timer < diff) - { - if (rand()%4 == 1) // 1/4 - { - DoCast(me->getVictim(),SPELL_RIGHTEOUS_FIRE); - } - RighteousFire_Timer = 2000; - }else RighteousFire_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_highlord_mograine(Creature* pCreature) -{ - return new boss_highlord_mograineAI (pCreature); -} - -void AddSC_boss_highlord_mograine() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_highlord_mograine"; - newscript->GetAI = &GetAI_boss_highlord_mograine; - newscript->RegisterSelf(); -} - diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index bfcd0636298..5188ab14d2f 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -21,7 +23,7 @@ SDComment: VERIFY SCRIPT SDCategory: Naxxramas EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" enum Yells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp index 0b0c8f5e4c5..c22bf236ec3 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" enum Spells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp index 71d9cb86102..b7a61ad0aca 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" enum Spells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index b0cd4018955..6b93e5ea19d 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" #define SAY_AGGRO RAND(-1533075,-1533076,-1533077) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index e4472b299ce..bd30cb20471 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" enum Spells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp index d507df86e83..12d5b3057f5 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" //Razuvious - NO TEXT sound only diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index d75b3ab78b0..a646e6d8412 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" #define EMOTE_BREATH -1533082 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index 350cd450510..9d224f01022 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" //Stalagg diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 706789a73f1..6ece32054ae 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "naxxramas.h" const DoorData doorData[] = @@ -128,6 +129,8 @@ struct instance_naxxramas : public InstanceData uint64 uiKelthuzadTrigger; uint64 uiPortals[4]; + GOState gothikDoorState; + time_t minHorsemenDiedTime; time_t maxHorsemenDiedTime; @@ -171,7 +174,10 @@ struct instance_naxxramas : public InstanceData pSapphiron->AI()->DoAction(DATA_SAPPHIRON_BIRTH); return; } - case GO_GOTHIK_GATE: GothikGateGUID = add ? pGo->GetGUID() : 0; break; + case GO_GOTHIK_GATE: + GothikGateGUID = add ? pGo->GetGUID() : 0; + pGo->SetGoState(gothikDoorState); + break; case GO_HORSEMEN_CHEST: HorsemenChestGUID = add ? pGo->GetGUID() : 0; break; case GO_HORSEMEN_CHEST_HERO: HorsemenChestGUID = add ? pGo->GetGUID() : 0; break; case GO_KELTHUZAD_PORTAL01: uiPortals[0] = pGo->GetGUID(); break; @@ -194,6 +200,7 @@ struct instance_naxxramas : public InstanceData case DATA_GOTHIK_GATE: if (GameObject *pGothikGate = instance->GetGameObject(GothikGateGUID)) pGothikGate->SetGoState(GOState(value)); + gothikDoorState = GOState(value); break; case DATA_HORSEMEN0: @@ -307,6 +314,21 @@ struct instance_naxxramas : public InstanceData } return false; } + + std::string GetSaveData() + { + std::ostringstream saveStream; + saveStream << GetBossSaveData() << " " << gothikDoorState; + return saveStream.str(); + } + + void Load(const char * data) + { + std::istringstream loadStream(LoadBossState(data)); + uint32 buff; + loadStream >> buff; + gothikDoorState = GOState(buff); + } }; InstanceData* GetInstanceData_instance_naxxramas(Map* pMap) diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index 9b1fac2ff5b..d4e67ce1b81 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -1,19 +1,18 @@ /* - * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_NAXXRAMAS_H diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index bbb1df2731d..71e8ad69ff4 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss malygos SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = '' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" //Spells #define SPELL_ARCANE_BREATH_N 56272 diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h index caa82a92e95..e56f760cb83 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + #ifndef DEF_EYE_OF_ETERNITY_H #define DEF_EYE_OF_ETERNITY_H diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index d93ec415b42..e8ba3c89a67 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -1,4 +1,21 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "eye_of_eternity.h" struct instance_eye_of_eternity : public ScriptedInstance diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index 02c39dc1232..767aeabcc42 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -1,21 +1,22 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "nexus.h" enum Spells @@ -77,7 +78,7 @@ struct boss_anomalusAI : public ScriptedAI void Reset() { Phase = 0; - uiSparkTimer = 5*IN_MILISECONDS; + uiSparkTimer = 5*IN_MILLISECONDS; uiChaoticRiftGUID = 0; bDeadChaoticRift = false; @@ -138,7 +139,7 @@ struct boss_anomalusAI : public ScriptedAI Phase = 1; DoScriptText(SAY_SHIELD, me); DoCast(me, SPELL_RIFT_SHIELD); - Creature* Rift = me->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[urand(0,5)], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS); + Creature* Rift = me->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[urand(0,5)], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILLISECONDS); if (Rift) { //DoCast(Rift, SPELL_CHARGE_RIFT); @@ -154,7 +155,7 @@ struct boss_anomalusAI : public ScriptedAI { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_SPARK); - uiSparkTimer = 5*IN_MILISECONDS; + uiSparkTimer = 5*IN_MILLISECONDS; } else uiSparkTimer -= diff; DoMeleeAttackIfReady(); @@ -187,8 +188,8 @@ struct mob_chaotic_riftAI : public Scripted_NoMovementAI void Reset() { - uiChaoticEnergyBurstTimer = 1*IN_MILISECONDS; - uiSummonCrazedManaWraithTimer = 5*IN_MILISECONDS; + uiChaoticEnergyBurstTimer = 1*IN_MILLISECONDS; + uiSummonCrazedManaWraithTimer = 5*IN_MILLISECONDS; //me->SetDisplayId(25206); //For some reason in DB models for ally and horde are different. //Model for ally (1126) does not show auras. Horde model works perfect. //Set model to horde number @@ -214,20 +215,20 @@ struct mob_chaotic_riftAI : public Scripted_NoMovementAI DoCast(pTarget, SPELL_CHARGED_CHAOTIC_ENERGY_BURST); else DoCast(pTarget, SPELL_CHAOTIC_ENERGY_BURST); - uiChaoticEnergyBurstTimer = 1*IN_MILISECONDS; + uiChaoticEnergyBurstTimer = 1*IN_MILLISECONDS; } else uiChaoticEnergyBurstTimer -= diff; if (uiSummonCrazedManaWraithTimer <= diff) { - Creature* Wraith = me->SummonCreature(MOB_CRAZED_MANA_WRAITH, me->GetPositionX()+1, me->GetPositionY()+1, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS); + Creature* Wraith = me->SummonCreature(MOB_CRAZED_MANA_WRAITH, me->GetPositionX()+1, me->GetPositionY()+1, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILLISECONDS); if (Wraith) if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) Wraith->AI()->AttackStart(pTarget); Unit* Anomalus = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0); if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD)) - uiSummonCrazedManaWraithTimer = 5*IN_MILISECONDS; + uiSummonCrazedManaWraithTimer = 5*IN_MILLISECONDS; else - uiSummonCrazedManaWraithTimer = 10*IN_MILISECONDS; + uiSummonCrazedManaWraithTimer = 10*IN_MILLISECONDS; } else uiSummonCrazedManaWraithTimer -= diff; } }; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index ff633c55eac..befa9fb068d 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -1,21 +1,22 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "nexus.h" enum Spells @@ -70,12 +71,12 @@ struct boss_keristraszaAI : public ScriptedAI void Reset() { - uiCrystalfireBreathTimer = 14*IN_MILISECONDS; - uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILISECONDS,11*IN_MILISECONDS); - uiTailSweepTimer = 5*IN_MILISECONDS; + uiCrystalfireBreathTimer = 14*IN_MILLISECONDS; + uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILLISECONDS,11*IN_MILLISECONDS); + uiTailSweepTimer = 5*IN_MILLISECONDS; bEnrage = false; - uiCheckIntenseColdTimer = 2*IN_MILISECONDS; + uiCheckIntenseColdTimer = 2*IN_MILLISECONDS; bMoreThanTwoIntenseCold = false; me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); @@ -174,7 +175,7 @@ struct boss_keristraszaAI : public ScriptedAI break; } } - uiCheckIntenseColdTimer = 2*IN_MILISECONDS; + uiCheckIntenseColdTimer = 2*IN_MILLISECONDS; } else uiCheckIntenseColdTimer -= diff; if (!bEnrage && HealthBelowPct(25)) @@ -187,13 +188,13 @@ struct boss_keristraszaAI : public ScriptedAI if (uiCrystalfireBreathTimer <= diff) { DoCast(me->getVictim(), SPELL_CRYSTALFIRE_BREATH); - uiCrystalfireBreathTimer = 14*IN_MILISECONDS; + uiCrystalfireBreathTimer = 14*IN_MILLISECONDS; } else uiCrystalfireBreathTimer -= diff; if (uiTailSweepTimer <= diff) { DoCast(me, SPELL_TAIL_SWEEP); - uiTailSweepTimer = 5*IN_MILISECONDS; + uiTailSweepTimer = 5*IN_MILLISECONDS; } else uiTailSweepTimer -= diff; if (uiCrystalChainsCrystalizeTimer <= diff) @@ -203,7 +204,7 @@ struct boss_keristraszaAI : public ScriptedAI DoCast(me, SPELL_CRYSTALIZE); else if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_CRYSTAL_CHAINS); - uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILISECONDS,11*IN_MILISECONDS); + uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILLISECONDS,11*IN_MILLISECONDS); } else uiCrystalChainsCrystalizeTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 0bf9fb07bb7..77dd3025451 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -1,21 +1,22 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "nexus.h" enum Spells @@ -49,7 +50,7 @@ enum Yells enum Achievements { ACHIEV_SPLIT_PERSONALITY = 2150, - ACHIEV_TIMER = 5*IN_MILISECONDS + ACHIEV_TIMER = 5*IN_MILLISECONDS }; const Position CenterOfRoom = {504.80, 89.07, -16.12, 6.27}; @@ -87,9 +88,9 @@ struct boss_magus_telestraAI : public ScriptedAI { Phase = 0; //These times are probably wrong - uiIceNovaTimer = 7*IN_MILISECONDS; + uiIceNovaTimer = 7*IN_MILLISECONDS; uiFireBombTimer = 0; - uiGravityWellTimer = 15*IN_MILISECONDS; + uiGravityWellTimer = 15*IN_MILLISECONDS; uiCooldown = 0; uiFireMagusGUID = 0; @@ -136,7 +137,7 @@ struct boss_magus_telestraAI : public ScriptedAI uint64 SplitPersonality(uint32 entry) { - if (Creature* Summoned = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS)) + if (Creature* Summoned = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILLISECONDS)) { switch (entry) { @@ -223,7 +224,7 @@ struct boss_magus_telestraAI : public ScriptedAI uiFrostMagusGUID = 0; uiArcaneMagusGUID = 0; bIsWaitingToAppear = true; - uiIsWaitingToAppearTimer = 4*IN_MILISECONDS; + uiIsWaitingToAppearTimer = 4*IN_MILLISECONDS; DoScriptText(SAY_MERGE, me); bIsAchievementTimerRunning = false; uiAchievementTimer = 0; @@ -282,9 +283,9 @@ struct boss_magus_telestraAI : public ScriptedAI if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { DoCast(pTarget, SPELL_ICE_NOVA, false); - uiCooldown = 1.5*IN_MILISECONDS; + uiCooldown = 1.5*IN_MILLISECONDS; } - uiIceNovaTimer = 15*IN_MILISECONDS; + uiIceNovaTimer = 15*IN_MILLISECONDS; } else uiIceNovaTimer -= diff; if (uiGravityWellTimer <= diff) @@ -292,9 +293,9 @@ struct boss_magus_telestraAI : public ScriptedAI if (Unit *pTarget = me->getVictim()) { DoCast(pTarget, SPELL_GRAVITY_WELL); - uiCooldown = 6*IN_MILISECONDS; + uiCooldown = 6*IN_MILLISECONDS; } - uiGravityWellTimer = 15*IN_MILISECONDS; + uiGravityWellTimer = 15*IN_MILLISECONDS; } else uiGravityWellTimer -= diff; if (uiFireBombTimer <= diff) @@ -302,9 +303,9 @@ struct boss_magus_telestraAI : public ScriptedAI if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { DoCast(pTarget, SPELL_FIREBOMB, false); - uiCooldown = 2*IN_MILISECONDS; + uiCooldown = 2*IN_MILLISECONDS; } - uiFireBombTimer = 2*IN_MILISECONDS; + uiFireBombTimer = 2*IN_MILLISECONDS; } else uiFireBombTimer -=diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index 1304f95c7ac..c28aff66ed1 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -1,21 +1,22 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "nexus.h" enum Spells @@ -75,10 +76,10 @@ struct boss_ormorokAI : public ScriptedAI void Reset() { - uiCrystalSpikesTimer = 12*IN_MILISECONDS; - uiTrampleTimer = 10*IN_MILISECONDS; - uiSpellReflectionTimer = 30*IN_MILISECONDS; - uiSummonCrystallineTanglerTimer = 17*IN_MILISECONDS; + uiCrystalSpikesTimer = 12*IN_MILLISECONDS; + uiTrampleTimer = 10*IN_MILLISECONDS; + uiSpellReflectionTimer = 30*IN_MILLISECONDS; + uiSummonCrystallineTanglerTimer = 17*IN_MILLISECONDS; bFrenzy = false; bCrystalSpikes = false; @@ -125,7 +126,7 @@ struct boss_ormorokAI : public ScriptedAI fSpikeXY[3][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO-(M_PI/2))); fSpikeXY[3][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO-(M_PI/2))); for (uint8 i = 0; i < 4; ++i) - me->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILISECONDS); + me->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILLISECONDS); if (++uiCrystalSpikesCount >= 13) bCrystalSpikes = false; uiCrystalSpikesTimer2 = 200; @@ -140,14 +141,14 @@ struct boss_ormorokAI : public ScriptedAI if (uiTrampleTimer <= diff) { DoCast(me, SPELL_TRAMPLE); - uiTrampleTimer = 10*IN_MILISECONDS; + uiTrampleTimer = 10*IN_MILLISECONDS; } else uiTrampleTimer -= diff; if (uiSpellReflectionTimer <= diff) { DoScriptText(SAY_REFLECT, me); DoCast(me, SPELL_SPELL_REFLECTION); - uiSpellReflectionTimer = 30*IN_MILISECONDS; + uiSpellReflectionTimer = 30*IN_MILLISECONDS; } else uiSpellReflectionTimer -= diff; if (uiCrystalSpikesTimer <= diff) @@ -160,7 +161,7 @@ struct boss_ormorokAI : public ScriptedAI fBaseY = me->GetPositionY(); fBaseZ = me->GetPositionZ(); fBaseO = me->GetOrientation(); - uiCrystalSpikesTimer = 20*IN_MILISECONDS; + uiCrystalSpikesTimer = 20*IN_MILLISECONDS; } else uiCrystalSpikesTimer -= diff; if (IsHeroic() && (uiSummonCrystallineTanglerTimer <= diff)) @@ -200,7 +201,7 @@ struct boss_ormorokAI : public ScriptedAI Crystalline_Tangler->getThreatManager().addThreat(pTarget, 1000000000.0f); } } - uiSummonCrystallineTanglerTimer = 17*IN_MILISECONDS; + uiSummonCrystallineTanglerTimer = 17*IN_MILLISECONDS; } else uiSummonCrystallineTanglerTimer -= diff; DoMeleeAttackIfReady(); @@ -218,8 +219,8 @@ struct mob_crystal_spikeAI : public Scripted_NoMovementAI void Reset() { - SpellCrystalSpikeDamageTimer = 3.7*IN_MILISECONDS; - SpellCrystalSpikePrevisualTimer = 1*IN_MILISECONDS; + SpellCrystalSpikeDamageTimer = 3.7*IN_MILLISECONDS; + SpellCrystalSpikePrevisualTimer = 1*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -227,13 +228,13 @@ struct mob_crystal_spikeAI : public Scripted_NoMovementAI if (SpellCrystalSpikePrevisualTimer <= diff) { DoCast(me, SPELL_CRYSTAL_SPIKE_PREVISUAL); - SpellCrystalSpikePrevisualTimer = 10*IN_MILISECONDS; + SpellCrystalSpikePrevisualTimer = 10*IN_MILLISECONDS; } else SpellCrystalSpikePrevisualTimer -= diff; if (SpellCrystalSpikeDamageTimer <= diff) { DoCast(me, SPELL_CRYSTALL_SPIKE_DAMAGE); - SpellCrystalSpikeDamageTimer = 10*IN_MILISECONDS; + SpellCrystalSpikeDamageTimer = 10*IN_MILLISECONDS; } else SpellCrystalSpikeDamageTimer -= diff; } }; @@ -246,7 +247,7 @@ struct mob_crystalline_tanglerAI : public ScriptedAI void Reset() { - uiRootsTimer = 1*IN_MILISECONDS; + uiRootsTimer = 1*IN_MILLISECONDS; } void UpdateAI(const uint32 diff) @@ -256,7 +257,7 @@ struct mob_crystalline_tanglerAI : public ScriptedAI if (me->IsWithinDist(me->getVictim(), 5.0f, false)) { DoCast(me->getVictim(), SPELL_ROOTS); - uiRootsTimer = 15*IN_MILISECONDS; + uiRootsTimer = 15*IN_MILLISECONDS; } } else uiRootsTimer -= diff; } diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp index 4bd9f55a013..2a95007a477 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss Commander Kolurg SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = 'boss_commander_kolurg' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #define SPELL_BATTLE_SHOUT 31403 #define SPELL_CHARGE 60067 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp index ef02baa38e6..a4e8f9559ce 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss Commander Stoutbeard SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = 'boss_commander_stoutbeard' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #define SPELL_BATTLE_SHOUT 31403 #define SPELL_CHARGE 60067 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index db70245e3a4..356a7eab12f 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -1,21 +1,22 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "nexus.h" #define NUMBER_OF_ENCOUNTERS 4 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h index 66902bece30..237f5db46f5 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h +++ b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h @@ -1,17 +1,18 @@ -/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_NEXUS_H diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp index 7d276206339..a1201b838c5 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> -* 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" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "oculus.h" enum Spells @@ -188,7 +189,7 @@ struct npc_unstable_sphereAI : public ScriptedAI if (uiPulseTimer <= uiDiff) { DoCast(SPELL_UNSTABLE_SPHERE_PULSE); - uiPulseTimer = 3*IN_MILISECONDS; + uiPulseTimer = 3*IN_MILLISECONDS; } else uiPulseTimer -= uiDiff; if (uiDeathTimer <= uiDiff) diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index 94fb90ab206..cde22d0268c 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> -* 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 -*/ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "oculus.h" //Types of drake mounts: Ruby(Tank), Amber(DPS), Emerald(Healer) diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 29435441d00..4333102c540 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -1,18 +1,19 @@ -/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> -* 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 -*/ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ /* ScriptData SDName: Urom @@ -21,7 +22,7 @@ SDComment: Is not working SPELL_ARCANE_SHIELD. SPELL_FROSTBOMB has some issues, SDCategory: Instance Script EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "oculus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index 79034250a43..1a67d07dcb0 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> -* 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 -*/ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "oculus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index 49be2385a3c..bc1ce7f58dd 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> -* 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" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "oculus.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index 685583532d5..b3572bd92ff 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2006 - 2010 TrinityCore <http://www.trinitycore.org> -* 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 -*/ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "oculus.h" #define GOSSIP_ITEM_DRAKES "So where do we go from here?" diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h index b212c9b8b6a..8228cd10754 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + #ifndef DEF_OCULUS_H #define DEF_OCULUS_H diff --git a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp index 3e24aaeb6c0..65d870afc0d 100644 --- a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp @@ -1,21 +1,21 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * Copyright (C) 2006 - 2010 TrinityCore <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "obsidian_sanctum.h" enum eEnums @@ -53,6 +53,7 @@ enum eEnums SPELL_WILL_OF_SARTHARION = 61254, // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%. SPELL_LAVA_STRIKE = 57571, // (Real spell casted should be 57578) 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572) SPELL_TWILIGHT_REVENGE = 60639, + NPC_FIRE_CYCLONE = 30648, SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x Creature entry 30494) @@ -101,6 +102,7 @@ enum eEnums SPELL_HATCH_EGGS_EFFECT = 58685, NPC_TWILIHT_WHELP = 31214, NPC_TWILIGHT_EGG = 30882, + NPC_SARTHARION_TWILIGHT_EGG = 31204, //Whelps NPC_TWILIGHT_WHELP = 30890, @@ -110,7 +112,10 @@ enum eEnums //flame tsunami SPELL_FLAME_TSUNAMI = 57494, // the visual dummy SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction - SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura + + SPELL_FLAME_TSUNAMI_DMG_AURA = 57491, // periodic damage, npc has this aura + SPELL_FLAME_TSUNAMI_BUFF = 60430, + NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike @@ -132,6 +137,7 @@ struct Waypoint { float m_fX, m_fY, m_fZ; }; + struct Location { float x,y,z; @@ -171,20 +177,22 @@ Waypoint m_aDragonCommon[MAX_WAYPOINT]= {3250.479, 585.827, 98.652}, {3209.969, 566.523, 98.652} }; -static Location FlameRight1Spawn = { 3197.59, 495.336, 57.8462 }; -static Location FlameRight1Direction = { 3289.28, 521.569, 55.1526 }; -static Location FlameRight2Spawn = { 3201.94, 543.324, 56.7209 }; -static Location FlameRight2Direction = { 3288.98, 549.291, 55.1232 }; -static Location FlameLeft1Spawn = { 3290.24, 521.725, 55.1238 }; -static Location FlameLeft1Direction = { 3199.94, 516.891, 57.5112 }; -static Location FlameLeft2Spawn = { 3290.33, 586.51, 55.063 }; -static Location FlameLeft2Direction = { 3195.03, 479.135, 55.6331 }; - -static Location AcolyteofShadron = { 3363.92, 534.703, 97.2683 }; -static Location AcolyteofShadron2 = { 3246.57, 551.263, 58.6164 }; -static Location AcolyteofVesperon = { 3145.68, 520.71, 89.7 }; -static Location AcolyteofVesperon2 = { 3246.57, 551.263, 58.6164 }; +static Location FlameRight1Spawn = { 3200.00, 573.211, 57.1551 }; +static Location FlameRight1Direction = { 3289.28, 573.211, 57.1551 }; +static Location FlameRight2Spawn = { 3200.00, 532.211, 57.1551 }; +static Location FlameRight2Direction = { 3289.28, 532.211, 57.1551 }; +static Location FlameRight3Spawn = { 3200.00, 491.211, 57.1551 }; +static Location FlameRight3Direction = { 3289.28, 491.211, 57.1551 }; +static Location FlameLeft1Spawn = { 3289.28, 511.711, 57.1551 }; +static Location FlameLeft1Direction = { 3200.00, 511.711, 57.1551 }; +static Location FlameLeft2Spawn = { 3289.28, 552.711, 57.1551 }; +static Location FlameLeft2Direction = { 3200.00, 552.711, 57.1551 }; + +static Location AcolyteofShadron = { 3363.92, 534.703, 97.2683 }; +static Location AcolyteofShadron2 = { 3246.57, 551.263, 58.6164 }; +static Location AcolyteofVesperon = { 3145.68, 520.71, 89.7 }; +static Location AcolyteofVesperon2 = { 3246.57, 551.263, 58.6164 }; Locations TwilightEggs[] = { {3219.28, 669.121 , 88.5549}, @@ -196,9 +204,12 @@ Locations TwilightEggs[] = }; Locations TwilightEggsSarth[] = { - {3261.75, 539.14 , 58.6082}, - {3257.41, 512.939 , 58.5432}, - {3231.04, 498.281 , 58.6439} + {3252.73, 515.762 , 58.5501}, + {3256.56, 521.119 , 58.6061}, + {3255.63, 527.513 , 58.7568}, + {3264.90, 525.865 , 58.6436}, + {3264.26, 516.364 , 58.8011}, + {3257.54, 502.285 , 58.2077} }; /*###### @@ -241,7 +252,7 @@ struct boss_sartharionAI : public ScriptedAI m_bIsBerserk = false; m_bIsSoftEnraged = false; - m_uiEnrageTimer = 15*MINUTE*IN_MILISECONDS; + m_uiEnrageTimer = 15*MINUTE*IN_MILLISECONDS; m_bIsHardEnraged = false; m_uiTenebronTimer = 30000; @@ -262,8 +273,68 @@ struct boss_sartharionAI : public ScriptedAI me->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); me->ResetLootMode(); + me->SetHomePosition(3246.57, 551.263, 58.6164, 4.66003); achievProgress = 0; + + // Drakes respawning system + if (pInstance) + { + Creature* pTenebron = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON)); + Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); + Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); + if (pTenebron) + { + pTenebron->SetHomePosition(3239.07, 657.235, 86.8775, 4.74729); + if(pTenebron->isAlive()) + { + if (pTenebron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pTenebron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTenebron->GetMotionMaster()->MoveTargetedHome(); + }else + { + if(pInstance->GetData(TYPE_TENEBRON_PREKILLED) == false) + { + pTenebron->Respawn(); + pTenebron->GetMotionMaster()->MoveTargetedHome(); + } + } + } + if (pShadron) + { + pShadron->SetHomePosition(3363.06, 525.28, 98.362, 4.76475); + if(pShadron->isAlive()) + { + if (pShadron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pShadron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pShadron->GetMotionMaster()->MoveTargetedHome(); + }else + { + if(pInstance->GetData(TYPE_SHADRON_PREKILLED) == false) + { + pShadron->Respawn(); + pShadron->GetMotionMaster()->MoveTargetedHome(); + } + } + } + if (pVesperon) + { + pVesperon->SetHomePosition(3145.68, 520.71, 89.7, 4.64258); + if(pVesperon->isAlive()) + { + if (pVesperon->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pVesperon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pVesperon->GetMotionMaster()->MoveTargetedHome(); + }else + { + if(pInstance->GetData(TYPE_VESPERON_PREKILLED) == false) + { + pVesperon->Respawn(); + pVesperon->GetMotionMaster()->MoveTargetedHome(); + } + } + } + } } void JustReachedHome() @@ -272,7 +343,7 @@ struct boss_sartharionAI : public ScriptedAI pInstance->SetData(TYPE_SARTHARION_EVENT, NOT_STARTED); } - void EnterCombat(Unit* /*pWho*/) + void EnterCombat(Unit* pWho) { DoScriptText(SAY_SARTHARION_AGGRO,me); DoZoneInCombat(); @@ -284,24 +355,41 @@ struct boss_sartharionAI : public ScriptedAI } } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* pKiller) { DoScriptText(SAY_SARTHARION_DEATH,me); if (pInstance) { - if (achievProgress >= 1) - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); - else if (achievProgress >= 2) - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO)); + Creature* pTenebron = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON)); + Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); + Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); + if (pTenebron && pTenebron->isAlive()) + pTenebron->DisappearAndDie(); + if (pShadron && pShadron->isAlive()) + pShadron->DisappearAndDie(); + if (pVesperon && pVesperon->isAlive()) + pVesperon->DisappearAndDie(); + + if (achievProgress == 1) + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); + else if (achievProgress == 2) + { + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO)); + } else if (achievProgress == 3) - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ZONE,H_ACHIEV_TWILIGHT_ZONE)); - + { + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST)); + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO)); + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ZONE,H_ACHIEV_TWILIGHT_ZONE)); + } + pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); } } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_SARTHARION_SLAY_1,SAY_SARTHARION_SLAY_2,SAY_SARTHARION_SLAY_3), me); } @@ -314,14 +402,18 @@ struct boss_sartharionAI : public ScriptedAI me->AddLootMode(LOOT_MODE_HARD_MODE_3); // Add 3rd Drake loot mode else if (me->HasLootMode(LOOT_MODE_HARD_MODE_1)) // Has one Drake loot mode me->AddLootMode(LOOT_MODE_HARD_MODE_2); // Add 2nd Drake loot mode - else // Has no Drake loot modes + else // Has no Drake loot modes me->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode } void FetchDragons() { - if (!pInstance) + if(!pInstance) return; + + me->ResetLootMode(); + achievProgress = 0; + Creature* pFetchTene = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON)); Creature* pFetchShad = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); Creature* pFetchVesp = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); @@ -332,6 +424,11 @@ struct boss_sartharionAI : public ScriptedAI if (pFetchTene && pFetchTene->isAlive() && !pFetchTene->getVictim()) { bCanUseWill = true; + if(!pFetchTene->isInCombat()) + { + AddDrakeLootMode(); + achievProgress++; + } pFetchTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aTene[0].m_fX, m_aTene[0].m_fY, m_aTene[0].m_fZ); if (!pFetchTene->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -341,6 +438,11 @@ struct boss_sartharionAI : public ScriptedAI if (pFetchShad && pFetchShad->isAlive() && !pFetchShad->getVictim()) { bCanUseWill = true; + if(!pFetchShad->isInCombat()) + { + AddDrakeLootMode(); + achievProgress++; + } pFetchShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aShad[0].m_fX, m_aShad[0].m_fY, m_aShad[0].m_fZ); if (!pFetchShad->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -350,6 +452,11 @@ struct boss_sartharionAI : public ScriptedAI if (pFetchVesp && pFetchVesp->isAlive() && !pFetchVesp->getVictim()) { bCanUseWill = true; + if(!pFetchVesp->isInCombat()) + { + AddDrakeLootMode(); + achievProgress++; + } pFetchVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aVesp[0].m_fX, m_aVesp[0].m_fY, m_aVesp[0].m_fZ); if (!pFetchVesp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -375,22 +482,22 @@ struct boss_sartharionAI : public ScriptedAI pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); int32 iTextId = 0; - AddDrakeLootMode(); - - achievProgress++; switch(pTemp->GetEntry()) { case NPC_TENEBRON: iTextId = SAY_SARTHARION_CALL_TENEBRON; + pTemp->AddAura(SPELL_POWER_OF_TENEBRON, pTemp); pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aTene[1].m_fX, m_aTene[1].m_fY, m_aTene[1].m_fZ); break; case NPC_SHADRON: iTextId = SAY_SARTHARION_CALL_SHADRON; + pTemp->AddAura(SPELL_POWER_OF_SHADRON, pTemp); pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aShad[1].m_fX, m_aShad[1].m_fY, m_aShad[1].m_fZ); break; case NPC_VESPERON: iTextId = SAY_SARTHARION_CALL_VESPERON; + pTemp->AddAura(SPELL_POWER_OF_VESPERON, pTemp); pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ); break; } @@ -415,6 +522,27 @@ struct boss_sartharionAI : public ScriptedAI } } + // Selects a random Fire Cyclone and makes it cast Lava Strike. + // FIXME: Frequency of the casts reduced to compensate 100% chance of spawning a Lava Blaze add + void CastLavaStrikeOnTarget(Unit* target) + { + std::list<Creature*> pFireCyclonesList; + Trinity::AllCreaturesOfEntryInRange checker(me, NPC_FIRE_CYCLONE, 200.0f); + Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, pFireCyclonesList, checker); + me->VisitNearbyObject(200.0f, searcher); + + if(pFireCyclonesList.empty()) + return; + + std::list<Creature*>::iterator itr = pFireCyclonesList.begin(); + uint32 rnd = rand()%pFireCyclonesList.size(); + + for(uint32 i = 0; i < rnd; ++i) + ++itr; + + (*itr)->CastSpell(target, SPELL_LAVA_STRIKE, true); + } + void UpdateAI(const uint32 uiDiff) { //Return since we have no target @@ -435,9 +563,9 @@ struct boss_sartharionAI : public ScriptedAI } //soft enrage - if (!m_bIsSoftEnraged && (me->GetHealth()*100 / me->GetMaxHealth()) <= 10) + if (!m_bIsSoftEnraged && HealthBelowPct(10)) { - // TODO + // m_bIsSoftEnraged is used while determining Lava Strike cooldown. m_bIsSoftEnraged = true; } @@ -461,18 +589,20 @@ struct boss_sartharionAI : public ScriptedAI { case 0: { - if (Creature *Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y , FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction.x, FlameRight1Direction.y, FlameRight1Direction.z); - if (Creature *Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y , FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction.x, FlameRight2Direction.y, FlameRight2Direction.z); + Creature *Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y , FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Creature *Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y , FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Creature *Right3 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight3Spawn.x, FlameRight3Spawn.y , FlameRight3Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction.x, FlameRight1Direction.y, FlameRight1Direction.z); + Right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction.x, FlameRight2Direction.y, FlameRight2Direction.z); + Right3->GetMotionMaster()->MovePoint(0, FlameRight3Direction.x, FlameRight3Direction.y, FlameRight3Direction.z); break; } case 1: { - if (Creature *Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y , FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction.x, FlameLeft1Direction.y, FlameLeft1Direction.z); - if (Creature *Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y , FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000)) - Left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction.x, FlameLeft2Direction.y, FlameLeft2Direction.z); + Creature *Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y , FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Creature *Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y , FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000); + Left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction.x, FlameLeft1Direction.y, FlameLeft1Direction.z); + Left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction.x, FlameLeft2Direction.y, FlameLeft2Direction.z); break; } } @@ -515,12 +645,12 @@ struct boss_sartharionAI : public ScriptedAI { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { - DoCast(pTarget, SPELL_LAVA_STRIKE); + CastLavaStrikeOnTarget(pTarget); - if (urand(0,4) == 4) + if(urand(0,5) == 0) DoScriptText(RAND(SAY_SARTHARION_SPECIAL_1,SAY_SARTHARION_SPECIAL_2,SAY_SARTHARION_SPECIAL_3), me); } - m_uiLavaStrikeTimer = urand(5000,20000); + m_uiLavaStrikeTimer = (m_bIsSoftEnraged ? urand(1400, 2000) : urand(5000,20000)); } else m_uiLavaStrikeTimer -= uiDiff; @@ -552,6 +682,10 @@ struct boss_sartharionAI : public ScriptedAI else m_uiVesperonTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); EnterEvadeIfOutOfCombatArea(uiDiff); @@ -619,9 +753,6 @@ struct dummy_dragonAI : public ScriptedAI if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (GameObject* TwilightPortal = GameObject::GetGameObject((*me), pInstance->GetData64(GO_TWILIGHT_PORTAL))) - TwilightPortal->SetGoState(GO_STATE_READY); - m_uiWaypointId = 0; m_uiMoveNextTimer = 500; m_iPortalRespawnTime = 30000; @@ -633,7 +764,7 @@ struct dummy_dragonAI : public ScriptedAI if (!pInstance || uiType != POINT_MOTION_TYPE) return; - debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId); +// debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId); //if healers messed up the raid and we was already initialized if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) @@ -646,6 +777,14 @@ struct dummy_dragonAI : public ScriptedAI if (uiPointId == POINT_ID_LAND) { me->GetMotionMaster()->Clear(); + me->SetInCombatWithZone(); + if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true)) + { + me->AddThreat(target, 1.0f); + me->Attack(target, true); + me->GetMotionMaster()->MoveChase(target); + } + m_bCanMoveFree = false; return; } @@ -695,39 +834,57 @@ struct dummy_dragonAI : public ScriptedAI //using a grid search here seem to be more efficient than caching all four guids //in instance script and calculate range to each. GameObject* pPortal = me->FindNearestGameObject(GO_TWILIGHT_PORTAL,50.0f); - if (GameObject* TwilightPortal = GameObject::GetGameObject((*me), pInstance->GetData64(GO_TWILIGHT_PORTAL))) - TwilightPortal->SetGoState(GO_STATE_ACTIVE); switch(me->GetEntry()) { case NPC_TENEBRON: { iTextId = WHISPER_HATCH_EGGS; - if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[0].x, TwilightEggs[0].y, TwilightEggs[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + { + for(uint32 i = 0; i < 6; ++i) + me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[i].x, TwilightEggs[i].y, TwilightEggs[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + } else - me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggsSarth[0].x, TwilightEggsSarth[0].y, TwilightEggsSarth[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + { + for(uint32 i = 0; i < 6; ++i) + me->SummonCreature(NPC_SARTHARION_TWILIGHT_EGG, TwilightEggsSarth[i].x, TwilightEggsSarth[i].y, TwilightEggsSarth[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + } break; } case NPC_SHADRON: { iTextId = WHISPER_OPEN_PORTAL; - if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + if(pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000); else - me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000); break; } case NPC_VESPERON: { + iTextId = WHISPER_OPEN_PORTAL; if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + { + if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000)) + { + me->InterruptNonMeleeSpells(true); + Acolyte->InterruptNonMeleeSpells(true); + me->CastSpell(me, 32747, false); + } + } else - me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + { + if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000)) + { + me->InterruptNonMeleeSpells(true); + Acolyte->InterruptNonMeleeSpells(true); + me->CastSpell(me, 32747, false); + } + } - iTextId = WHISPER_OPEN_PORTAL; - break; + break; } } @@ -742,7 +899,7 @@ struct dummy_dragonAI : public ScriptedAI //Refresh respawnTime so time again are set to 30secs? } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* pKiller) { int32 iTextId = 0; uint32 uiSpellId = 0; @@ -752,23 +909,39 @@ struct dummy_dragonAI : public ScriptedAI case NPC_TENEBRON: iTextId = SAY_TENEBRON_DEATH; uiSpellId = SPELL_POWER_OF_TENEBRON; + if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + pInstance->SetData(TYPE_TENEBRON_PREKILLED, 1); break; case NPC_SHADRON: iTextId = SAY_SHADRON_DEATH; uiSpellId = SPELL_POWER_OF_SHADRON; + if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + pInstance->SetData(TYPE_SHADRON_PREKILLED, 1); + if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f)) + { + pAcolyte->Kill(pAcolyte); + } break; case NPC_VESPERON: iTextId = SAY_VESPERON_DEATH; uiSpellId = SPELL_POWER_OF_VESPERON; + if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + pInstance->SetData(TYPE_VESPERON_PREKILLED, 1); + if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f)) + { + pAcolyte->Kill(pAcolyte); + } break; } DoScriptText(iTextId, me); - me->RemoveOwnedAura(uiSpellId); + me->RemoveAurasDueToSpell(uiSpellId); if (pInstance) { + pInstance->DoRemoveAurasDueToSpellOnPlayers(uiSpellId); + // not if solo mini-boss fight if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) return; @@ -776,7 +949,10 @@ struct dummy_dragonAI : public ScriptedAI // Twilight Revenge to main boss if (Unit* pSartharion = Unit::GetUnit((*me), pInstance->GetData64(DATA_SARTHARION))) if (pSartharion->isAlive()) + { + pSartharion->RemoveAurasDueToSpell(uiSpellId); DoCast(pSartharion, SPELL_TWILIGHT_REVENGE, true); + } } } @@ -786,11 +962,11 @@ struct dummy_dragonAI : public ScriptedAI { if (m_uiMoveNextTimer <= uiDiff) { - if (m_uiWaypointId < MAX_WAYPOINT) + if(m_uiWaypointId < MAX_WAYPOINT) me->GetMotionMaster()->MovePoint(m_uiWaypointId, m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ); - debug_log("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId); +// debug_log("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId); m_uiMoveNextTimer = 0; } else @@ -811,25 +987,27 @@ struct mob_tenebronAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiHatchEggTimer; + bool m_bHasPortalOpen; + void Reset() { m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiHatchEggTimer = 30000; + + m_bHasPortalOpen = false; } - void Aggro(Unit* /*pWho*/) + void EnterCombat(Unit* pWho) { DoScriptText(SAY_TENEBRON_AGGRO, me); DoZoneInCombat(); DoCast(me, SPELL_POWER_OF_TENEBRON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_TENEBRON_SLAY_1,SAY_TENEBRON_SLAY_2), me); - /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - achievProgress = 1;*/ } void UpdateAI(const uint32 uiDiff) @@ -852,7 +1030,7 @@ struct mob_tenebronAI : public dummy_dragonAI else m_uiShadowFissureTimer -= uiDiff; - // Hach Egg + // Hatch Egg if (m_uiHatchEggTimer <= uiDiff) { OpenPortal(); @@ -871,6 +1049,10 @@ struct mob_tenebronAI : public dummy_dragonAI else m_uiShadowBreathTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); } }; @@ -892,6 +1074,8 @@ struct mob_shadronAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteShadronTimer; + bool m_bHasPortalOpen; + void Reset() { m_uiShadowBreathTimer = 20000; @@ -903,20 +1087,20 @@ struct mob_shadronAI : public dummy_dragonAI if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) me->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + + m_bHasPortalOpen = false; } - void Aggro(Unit* /*pWho*/) + void EnterCombat(Unit* pWho) { DoScriptText(SAY_SHADRON_AGGRO,me); DoZoneInCombat(); DoCast(me, SPELL_POWER_OF_SHADRON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_SHADRON_SLAY_1,SAY_SHADRON_SLAY_2), me); - /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - achievProgress = 2;*/ } void UpdateAI(const uint32 uiDiff) @@ -942,11 +1126,17 @@ struct mob_shadronAI : public dummy_dragonAI // Portal Event if (m_uiAcolyteShadronTimer <= uiDiff) { - if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) - return; + if(m_bHasPortalOpen) + m_uiAcolyteShadronTimer = 10000; + else + { + if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) + return; - OpenPortal(); - m_uiAcolyteShadronTimer = urand(60000,65000); + OpenPortal(); + m_bHasPortalOpen = true; + m_uiAcolyteShadronTimer = urand(60000,65000); + } } else m_uiAcolyteShadronTimer -= uiDiff; @@ -961,6 +1151,10 @@ struct mob_shadronAI : public dummy_dragonAI else m_uiShadowBreathTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); } }; @@ -982,25 +1176,27 @@ struct mob_vesperonAI : public dummy_dragonAI uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteVesperonTimer; + bool m_bHasPortalOpen; + void Reset() { m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiAcolyteVesperonTimer = 60000; + + m_bHasPortalOpen = false; } - void Aggro(Unit* /*pWho*/) + void EnterCombat(Unit* pWho) { DoScriptText(SAY_VESPERON_AGGRO,me); DoZoneInCombat(); DoCast(me, SPELL_POWER_OF_VESPERON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* pVictim) { DoScriptText(RAND(SAY_VESPERON_SLAY_1,SAY_VESPERON_SLAY_2), me); - /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - achievProgress = 3;*/ } void UpdateAI(const uint32 uiDiff) @@ -1026,9 +1222,14 @@ struct mob_vesperonAI : public dummy_dragonAI // Portal Event if (m_uiAcolyteVesperonTimer <= uiDiff) { - OpenPortal(); - DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); - m_uiAcolyteVesperonTimer = urand(60000,70000); + if(m_bHasPortalOpen) + m_uiAcolyteVesperonTimer = 10000; + else + { + OpenPortal(); + DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); + m_uiAcolyteVesperonTimer = urand(60000,70000); + } } else m_uiAcolyteVesperonTimer -= uiDiff; @@ -1043,6 +1244,10 @@ struct mob_vesperonAI : public dummy_dragonAI else m_uiShadowBreathTimer -= uiDiff; + // Don't attack current target if he's not visible for us. + if(me->getVictim() && me->getVictim()->HasAura(57874, 0)) + me->getThreatManager().modifyThreatPercent(me->getVictim(), -100); + DoMeleeAttackIfReady(); } }; @@ -1061,43 +1266,49 @@ struct mob_acolyte_of_shadronAI : public ScriptedAI mob_acolyte_of_shadronAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = pCreature->GetInstanceData(); + Reset(); } ScriptedInstance* pInstance; - uint32 uiShiftEffectTimer; - + uint32 uiDespawnTimer; + void Reset() { - uiShiftEffectTimer = 1000; + uiDespawnTimer = 28000; if (pInstance) { - Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 999, true); - - Creature* pSartharion = Unit::GetCreature(*me, pInstance->GetData64(DATA_SARTHARION)); - if (Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON))) + Creature* pTarget = NULL; //if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - pSartharion->CastSpell(me, SPELL_GIFT_OF_TWILIGTH_SAR, true); + { + if(pTarget = ((Creature*)Unit::GetUnit((*me), pInstance->GetData64(DATA_SARTHARION)))) + pTarget->AddAura(SPELL_GIFT_OF_TWILIGTH_SAR, pTarget); + } else { - pShadron->CastSpell(me, SPELL_GIFT_OF_TWILIGTH_SHA,true); - pShadron->AddThreat(pTarget, 100.0f); - AttackStart(pShadron->getVictim()); + if(pTarget = ((Creature*)Unit::GetUnit((*me), pInstance->GetData64(DATA_SHADRON)))) + pTarget->AddAura(SPELL_GIFT_OF_TWILIGTH_SHA, pTarget); } - } - me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); + } + me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* killer) { if (pInstance) { - //Creature* pDebuffTarget = NULL; + Creature* Shadron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SHADRON)); + if(Shadron) + { + ((mob_shadronAI*)Shadron->AI())->m_bHasPortalOpen = false; + } + + Creature* pDebuffTarget = NULL; Map *map = me->GetMap(); if (map->IsDungeon()) { Map::PlayerList const &PlayerList = map->GetPlayers(); - + if (PlayerList.isEmpty()) return; @@ -1110,28 +1321,31 @@ struct mob_acolyte_of_shadronAI : public ScriptedAI i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT); i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER); } - } + } } - if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - { - //not solo fight, so main boss has deduff - Creature* pDebuffTarget = Unit::GetCreature(*me, pInstance->GetData64(DATA_SARTHARION)); - if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) - pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); - } - else - { - //event not in progress, then solo fight and must remove debuff mini-boss - Creature* pDebuffTarget = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)); - if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) - pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); - } + //not solo fight, so main boss has deduff + pDebuffTarget = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SARTHARION)); + if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) + pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); + + //event not in progress, then solo fight and must remove debuff mini-boss + pDebuffTarget = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SHADRON)); + if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) + pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); } } - void UpdateAI(const uint32 /*uiDiff*/) + void UpdateAI(const uint32 uiDiff) { + if(uiDespawnTimer < uiDiff) + { + me->SetVisibility(VISIBILITY_OFF); + me->Kill(me); + uiDespawnTimer = 28000; + return; + }else uiDespawnTimer -= uiDiff; + if (!UpdateVictim()) return; @@ -1156,26 +1370,32 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI } ScriptedInstance* pInstance; + uint32 uiDespawnTimer; void Reset() { + uiDespawnTimer = 28000; if (pInstance) { - me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); + me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); } DoCast(me, SPELL_TWILIGHT_TORMENT_VESP_ACO); } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* pKiller) { + me->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP_ACO); + // remove twilight torment on Vesperon if (pInstance) { - Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON)); + Creature* pVesperon = pInstance->instance->GetCreature(pInstance->GetData64(DATA_VESPERON)); + if (pVesperon) + ((mob_vesperonAI*)pVesperon->AI())->m_bHasPortalOpen = false; if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); - + Map *map = me->GetMap(); if (map->IsDungeon()) { @@ -1194,15 +1414,26 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER); } if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_TWILIGHT_TORMENT_VESP,0) && !i->getSource()->getVictim()) - i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT); + i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); } } + pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_TWILIGHT_TORMENT_VESP_ACO); + pInstance->DoRemoveAurasDueToSpellOnPlayers(57935); + pInstance->DoRemoveAurasDueToSpellOnPlayers(58835); // Components of spell Twilight Torment } } - void UpdateAI(const uint32 /*uiDiff*/) + void UpdateAI(const uint32 uiDiff) { + if(uiDespawnTimer < uiDiff) + { + me->SetVisibility(VISIBILITY_OFF); + me->Kill(me); + uiDespawnTimer = 28000; + return; + }else uiDespawnTimer -= uiDiff; + if (!UpdateVictim()) return; @@ -1222,9 +1453,10 @@ CreatureAI* GetAI_mob_acolyte_of_vesperon(Creature* pCreature) struct mob_twilight_eggsAI : public Scripted_NoMovementAI { mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) - { + { pInstance = pCreature->GetInstanceData(); } + uint32 m_uiFadeArmorTimer; uint32 m_uiHatchEggTimer; @@ -1232,28 +1464,46 @@ struct mob_twilight_eggsAI : public Scripted_NoMovementAI void Reset() { - m_uiHatchEggTimer = 20000; + if(pInstance) + { + me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); + } m_uiFadeArmorTimer = 1000; + m_uiHatchEggTimer = 20000; } + void SpawnWhelps() { + me->RemoveAllAuras(); + if (!pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) me->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - else + else me->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); me->DealDamage(me, me->GetHealth()); } + + void JustSummoned(Creature* pWho) + { + pWho->SetInCombatWithZone(); + } + void UpdateAI(const uint32 uiDiff) { if (m_uiHatchEggTimer <= uiDiff) { + Creature* Tenebron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_TENEBRON)); + if(Tenebron) + ((mob_tenebronAI*)Tenebron->AI())->m_bHasPortalOpen = false; SpawnWhelps(); } else - m_uiHatchEggTimer -= uiDiff; + m_uiHatchEggTimer -= uiDiff; } - void AttackStart(Unit* /*pWho*/) {} - void MoveInLineOfSight(Unit* /*pWho*/) {} + + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} }; CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) @@ -1262,33 +1512,46 @@ CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) } /*###### -## Flame Tzunami +## Mob Flame Tsunami ######*/ struct npc_flame_tsunamiAI : public ScriptedAI { npc_flame_tsunamiAI(Creature* pCreature) : ScriptedAI(pCreature) { - me->HasAura(SPELL_FLAME_TSUNAMI_DMG_AURA); - DoCast(me, SPELL_FLAME_TSUNAMI); + me->SetDisplayId(11686); + me->AddAura(SPELL_FLAME_TSUNAMI, me); } uint32 Tsunami_Timer; + uint32 TsunamiBuff_timer; + uint32 entry; void Reset() { Tsunami_Timer = 100; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + TsunamiBuff_timer = 1000; + entry = 0; } - + void UpdateAI(const uint32 diff) { if (Tsunami_Timer <= diff) { - DoCast(me, SPELL_FLAME_TSUNAMI_DMG_AURA); - Tsunami_Timer = 1000; - } else Tsunami_Timer -= diff; + DoCast(me,SPELL_FLAME_TSUNAMI_DMG_AURA); + Tsunami_Timer = 500; + }else Tsunami_Timer -= diff; + + if(TsunamiBuff_timer <= diff) + { + if (Unit* LavaBlaze = GetClosestCreatureWithEntry(me,NPC_LAVA_BLAZE, 10.0f, true)) + LavaBlaze->CastSpell(LavaBlaze, SPELL_FLAME_TSUNAMI_BUFF, true); + TsunamiBuff_timer = 1000; + }else TsunamiBuff_timer -= diff; } }; + // Twilight Fissure struct npc_twilight_fissureAI : public Scripted_NoMovementAI { @@ -1301,6 +1564,10 @@ struct npc_twilight_fissureAI : public Scripted_NoMovementAI void Reset() { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->AddAura( 46265 , me ); // Wrong, can't find proper visual + me->AddAura( 69422 , me ); VoidBlast_Timer = 5000; } @@ -1308,8 +1575,12 @@ struct npc_twilight_fissureAI : public Scripted_NoMovementAI { if (VoidBlast_Timer <= diff) { - DoCast(me->getVictim(), RAID_MODE(SPELL_VOID_BLAST, SPELL_VOID_BLAST_H)); + DoCastAOE(RAID_MODE(SPELL_VOID_BLAST, SPELL_VOID_BLAST_H)); + ////twilight realm + //DoCast(me->getVictim(), 57620, true); + //DoCast(me->getVictim(), 57874, true); VoidBlast_Timer = 9000; + me->RemoveAllAuras(); me->Kill(me); } else VoidBlast_Timer -= diff; } @@ -1332,12 +1603,17 @@ CreatureAI* GetAI_npc_twilight_fissure(Creature* pCreature) struct mob_twilight_whelpAI : public ScriptedAI { - mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) {} + mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } uint32 m_uiFadeArmorTimer; void Reset() { + me->RemoveAllAuras(); + me->SetInCombatWithZone(); m_uiFadeArmorTimer = 1000; } diff --git a/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp index 7ef8e03c779..4cb38db3a28 100644 --- a/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -1,4 +1,21 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "obsidian_sanctum.h" #define MAX_ENCOUNTER 1 @@ -17,6 +34,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance uint64 m_uiShadronGUID; uint64 m_uiVesperonGUID; + bool m_bTenebronKilled; + bool m_bShadronKilled; + bool m_bVesperonKilled; + void Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -25,6 +46,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance m_uiTenebronGUID = 0; m_uiShadronGUID = 0; m_uiVesperonGUID = 0; + + m_bTenebronKilled = false; + m_bShadronKilled = false; + m_bVesperonKilled = false; } void OnCreatureCreate(Creature* pCreature, bool /*add*/) @@ -55,12 +80,24 @@ struct instance_obsidian_sanctum : public ScriptedInstance { if (uiType == TYPE_SARTHARION_EVENT) m_auiEncounter[0] = uiData; + else if(uiType == TYPE_TENEBRON_PREKILLED) + m_bTenebronKilled = true; + else if(uiType == TYPE_SHADRON_PREKILLED) + m_bShadronKilled = true; + else if(uiType == TYPE_VESPERON_PREKILLED) + m_bVesperonKilled = true; } uint32 GetData(uint32 uiType) { if (uiType == TYPE_SARTHARION_EVENT) return m_auiEncounter[0]; + else if(uiType == TYPE_TENEBRON_PREKILLED) + return m_bTenebronKilled; + else if(uiType == TYPE_SHADRON_PREKILLED) + return m_bShadronKilled; + else if(uiType == TYPE_VESPERON_PREKILLED) + return m_bVesperonKilled; return 0; } diff --git a/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h b/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h index 59013174795..43825d04f47 100644 --- a/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h +++ b/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h @@ -1,9 +1,29 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + #ifndef DEF_OBSIDIAN_SANCTUM_H #define DEF_OBSIDIAN_SANCTUM_H enum eTypes { TYPE_SARTHARION_EVENT = 1, + TYPE_TENEBRON_PREKILLED = 2, + TYPE_SHADRON_PREKILLED = 3, + TYPE_VESPERON_PREKILLED = 4, DATA_SARTHARION = 10, DATA_TENEBRON = 11, diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp index c2da2a24e71..aa0be07d7bd 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -21,7 +23,7 @@ SDComment: Waypoint needed, we expect boss to always have 2x Stormforged Lieuten SDCategory: Halls of Lightning EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_lightning.h" enum eEnums diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index ecf61188b3e..88c240b49bd 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -1,25 +1,26 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * + * 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Comment: Timer check pending */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_lightning.h" enum Spells @@ -93,10 +94,10 @@ struct boss_ionarAI : public ScriptedAI bIsSplitPhase = true; bHasDispersed = false; - uiSplitTimer = 25*IN_MILISECONDS; + uiSplitTimer = 25*IN_MILLISECONDS; - uiStaticOverloadTimer = urand(5*IN_MILISECONDS, 6*IN_MILISECONDS); - uiBallLightningTimer = urand(10*IN_MILISECONDS, 11*IN_MILISECONDS); + uiStaticOverloadTimer = urand(5*IN_MILLISECONDS, 6*IN_MILLISECONDS); + uiBallLightningTimer = urand(10*IN_MILLISECONDS, 11*IN_MILLISECONDS); uiDisperseHealth = 45 + urand(0,10); @@ -199,7 +200,7 @@ struct boss_ionarAI : public ScriptedAI { if (uiSplitTimer <= uiDiff) { - uiSplitTimer = 2.5*IN_MILISECONDS; + uiSplitTimer = 2.5*IN_MILLISECONDS; // Return sparks to where Ionar splitted if (bIsSplitPhase) @@ -215,7 +216,7 @@ struct boss_ionarAI : public ScriptedAI DoCast(me, SPELL_SPARK_DESPAWN, false); - uiSplitTimer = 25*IN_MILISECONDS; + uiSplitTimer = 25*IN_MILLISECONDS; bIsSplitPhase = true; if (me->getVictim()) @@ -233,7 +234,7 @@ struct boss_ionarAI : public ScriptedAI if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_STATIC_OVERLOAD); - uiStaticOverloadTimer = urand(5*IN_MILISECONDS, 6*IN_MILISECONDS); + uiStaticOverloadTimer = urand(5*IN_MILLISECONDS, 6*IN_MILLISECONDS); } else uiStaticOverloadTimer -= uiDiff; @@ -241,7 +242,7 @@ struct boss_ionarAI : public ScriptedAI if (uiBallLightningTimer <= uiDiff) { DoCast(me->getVictim(), SPELL_BALL_LIGHTNING); - uiBallLightningTimer = urand(10*IN_MILISECONDS, 11*IN_MILISECONDS); + uiBallLightningTimer = urand(10*IN_MILLISECONDS, 11*IN_MILLISECONDS); } else uiBallLightningTimer -= uiDiff; @@ -309,7 +310,7 @@ struct mob_spark_of_ionarAI : public ScriptedAI void Reset() { - uiCheckTimer = 2*IN_MILISECONDS; + uiCheckTimer = 2*IN_MILLISECONDS; me->SetReactState(REACT_PASSIVE); } @@ -357,7 +358,7 @@ struct mob_spark_of_ionarAI : public ScriptedAI else me->ForcedDespawn(); } - uiCheckTimer = 2*IN_MILISECONDS; + uiCheckTimer = 2*IN_MILLISECONDS; } else uiCheckTimer -= uiDiff; diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index f08c19efca2..e0a55a79ccd 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -21,7 +23,7 @@ SDComment: Missing intro. Remove hack of Pulsing Shockwave when core supports. A SDCategory: Halls of Lightning EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_lightning.h" enum eEnums diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 184050e3103..cb5878defb3 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -21,7 +23,7 @@ SDComment: Not considered complete. Some events may fail and need further develo SDCategory: Halls of Lightning EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_lightning.h" enum eEnums diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h index d9739fdf888..2c270d5796e 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h @@ -1,6 +1,20 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ #ifndef DEF_HALLS_OF_LIGHTNING_H #define DEF_HALLS_OF_LIGHTNING_H diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index 46cd5c9cccc..8dbcf8da23f 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -21,7 +23,7 @@ SDComment: All ready. SDCategory: Halls of Lightning EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_lightning.h" /* Halls of Lightning encounters: diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp index 0674b7c79eb..63b1de56c38 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss krystallus SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = 'boss_krystallus' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_stone.h" enum Spells @@ -20,6 +37,9 @@ enum Spells SPELL_GROUND_SLAM = 50827, SPELL_SHATTER = 50810, H_SPELL_SHATTER = 61546, + SPELL_SHATTER_EFFECT = 50811, + H_SPELL_SHATTER_EFFECT = 61547, + SPELL_STONED = 50812, SPELL_STOMP = 48131, H_SPELL_STOMP = 59744 }; @@ -108,8 +128,7 @@ struct boss_krystallusAI : public ScriptedAI { if (uiShatterTimer <= diff) { - DoCast(me, SPELL_SHATTER); - bIsSlam = false; + DoCast(me, DUNGEON_MODE(SPELL_SHATTER, H_SPELL_SHATTER)); } else uiShatterTimer -= diff; } @@ -130,6 +149,32 @@ struct boss_krystallusAI : public ScriptedAI return; DoScriptText(SAY_KILL, me); } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + //this part should be in the core + if (pSpell->Id == SPELL_SHATTER || pSpell->Id == H_SPELL_SHATTER) + { + //this spell must have custom handling in the core, dealing damage based on distance + pTarget->CastSpell(pTarget, DUNGEON_MODE(SPELL_SHATTER_EFFECT, H_SPELL_SHATTER_EFFECT), true); + + if (pTarget->HasAura(SPELL_STONED)) + pTarget->RemoveAurasDueToSpell(SPELL_STONED); + + //clear this, if we are still performing + if (bIsSlam) + { + bIsSlam = false; + + //and correct movement, if not already + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + { + if (me->getVictim()) + me->GetMotionMaster()->MoveChase(me->getVictim()); + } + } + } + } }; CreatureAI* GetAI_boss_krystallus(Creature* pCreature) diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp index b3c3c675347..e7fde3dcea7 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss maiden_of_grief SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = 'boss_maiden_of_grief' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_stone.h" enum Spells diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index 68c3e34e6bf..1cab83db949 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss sjonnir SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = 'boss_sjonnir' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "halls_of_stone.h" enum Spells diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp index 8febdaab879..d7e7f495cfb 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp @@ -1,4 +1,21 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" #include "halls_of_stone.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h index b61e7057ddc..06a405390d2 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + #ifndef DEF_HALLS_OF_STONE_H #define DEF_HALLS_OF_STONE_H enum Data diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index 69bb3779e70..e4bbcdd9690 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -1,4 +1,21 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "halls_of_stone.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp index e944543fb9e..5019bb29d21 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" #define GAMEOBJECT_GIVE_OF_THE_OBSERVER 194821 diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp index 8d3ae4d3431..98fac4f80d2 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -23,7 +22,7 @@ SDComment: Runes need DB support, chain lightning won't cast, supercharge won't SDCategory: Ulduar - Ulduar EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" // Any boss diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp index 41c0f317f4e..da3d671eb6d 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" //boss_auriaya diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index b50f12805a4..0d462097213 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -1,29 +1,29 @@ /* - * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* - * Comment: Tower Event support is not finished, there is missing code on triggers and - * Lore Keeper and Brann Bronzebeard are not scripted yet. Lore Keeper's script - * should activate the hard mode so is not possible to play hard-mode yet. Add a call to - * Leviathan's DoAction(0) from Lore Keeper's script to activate hard-mode + * Comment: there is missing code on triggers, + * brann bronzebeard needs correct gossip info. + * requires more work involving area triggers. + * if reached brann speaks through his radio.. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" +#include "ScriptedEscortAI.h" #include "ulduar.h" #include "Vehicle.h" @@ -36,19 +36,32 @@ enum Spells SPELL_MISSILE_BARRAGE = 62400, SPELL_SYSTEMS_SHUTDOWN = 62475, - SPELL_FLAME_CANNON = 62395, -// SPELL_FLAME_CANNON = 64692, trigger the same spell - SPELL_OVERLOAD_CIRCUIT = 62399, + SPELL_START_THE_ENGINE = 62472, SPELL_SEARING_FLAME = 62402, SPELL_BLAZE = 62292, SPELL_SMOKE_TRAIL = 63575, SPELL_ELECTROSHOCK = 62522, - //TOWER BUFF SPELLS - SPELL_THORIM_S_HAMMER = 62912, // Tower of Storms - SPELL_MIMIRON_S_INFERNO = 62910, // Tower of Flames - SPELL_HODIR_S_FURY = 62297, // Tower of Frost - SPELL_FREYA_S_WARD = 62906 // Tower of Nature + //TOWER Additional SPELLS + SPELL_THORIM_S_HAMMER = 62911, // Tower of Storms + SPELL_MIMIRON_S_INFERNO = 62909, // Tower of Flames + SPELL_HODIR_S_FURY = 62533, // Tower of Frost + SPELL_FREYA_S_WARD = 62906, // Tower of Nature + SPELL_FREYA_SUMMONS = 62947, // Tower of Nature + //TOWER ap & health spells + SPELL_BUFF_TOWER_OF_STORMS = 65076, + SPELL_BUFF_TOWER_OF_FLAMES = 65075, + SPELL_BUFF_TOWER_OF_FR0ST = 65077, + SPELL_BUFF_TOWER_OF_LIFE = 64482, + //Additional Spells + SPELL_LASH = 65062, + SPELL_FREYA_S_WARD_EFFECT_1 = 62947, + SPELL_FREYA_S_WARD_EFFECT_2 = 62907, + SPELL_AUTO_REPAIR = 62705, + AURA_DUMMY_BLUE = 63294, + AURA_DUMMY_GREEN = 63295, + AURA_DUMMY_YELLOW = 63292, + SPELL_LIQUID_PYRITE = 62494, }; enum Creatures @@ -56,6 +69,25 @@ enum Creatures MOB_MECHANOLIFT = 33214, MOB_LIQUID = 33189, MOB_CONTAINER = 33218, + MOB_THORIM_BEACON = 33365, + MOB_MIMIRON_BEACON = 33370, + MOB_HODIR_BEACON = 33212, + MOB_FREYA_BEACON = 33367, + NPC_THORIM_TARGET_BEACON = 33364, + NPC_MIMIRON_TARGET_BEACON = 33369, + NPC_HODIR_TARGET_BEACON = 33108, + NPC_FREYA_TARGET_BEACON = 33366, + NPC_LOREKEEPER = 33686, //Hard mode starter + NPC_BRANZ_BRONZBEARD = 33579, + NPC_DELORAH = 33701, +}; + +enum Towers +{ + GO_TOWER_OF_STORMS = 194377, + GO_TOWER_OF_FLAMES = 194371, + GO_TOWER_OF_FROST = 194370, + GO_TOWER_OF_LIFE = 194375, }; enum Events @@ -66,10 +98,11 @@ enum Events EVENT_VENT, EVENT_SPEED, EVENT_SUMMON, + EVENT_SHUTDOWN, EVENT_THORIM_S_HAMMER, // Tower of Storms EVENT_MIMIRON_S_INFERNO, // Tower of Flames EVENT_HODIR_S_FURY, // Tower of Frost - EVENT_FREYA_S_WARD // Tower of Nature + EVENT_FREYA_S_WARD, // Tower of Nature }; enum Seats @@ -79,6 +112,17 @@ enum Seats SEAT_DEVICE = 2, }; +enum Vehicles +{ + VEHICLE_SIEGE = 33060, + VEHICLE_CHOPPER = 33062, + VEHICLE_DEMOLISHER = 33109, +}; + +#define EMOTE_PURSUE "Flame Leviathan pursues $N." +#define EMOTE_OVERLOAD "Flame Leviathan's circuits overloaded." +#define EMOTE_REPAIR "Automatic repair sequence initiated." + enum Yells { SAY_AGGRO = -1603060, @@ -101,24 +145,24 @@ enum Yells enum eAchievementData { - //ACHIEV_CHAMPION_OF_ULDUAR = 10042, - //ACHIEV_CONQUEROR_OF_ULDUAR = 10352, - ACHIEV_10_NUKED_FROM_ORBIT = 10058, - ACHIEV_25_NUKED_FROM_ORBIT = 10060, - ACHIEV_10_ORBITAL_BOMBARDMENT = 10056, - ACHIEV_25_ORBITAL_BOMBARDMENT = 10061, - ACHIEV_10_ORBITAL_DEVASTATION = 10057, - ACHIEV_25_ORBITAL_DEVASTATION = 10059, - ACHIEV_10_ORBIT_UARY = 10218, - ACHIEV_25_ORBIT_UARY = 10219, - ACHIEV_10_SHUTOUT = 10054, - ACHIEV_25_SHUTOUT = 10055, - ACHIEV_10_SIEGE_OF_ULDUAR = 9999, - ACHIEV_25_SIEGE_OF_ULDUAR = 10003, - //ACHIEV_10_THREE_CAR_GARAGE = 10046, 10047, 10048, - //ACHIEV_25_THREE_CAR_GARAGE = 10049, 10050, 10051, - ACHIEV_10_UNBROKEN = 10044, - ACHIEV_25_UNBROKEN = 10045, + //ACHIEV_CHAMPION_OF_ULDUAR = 2903, + //ACHIEV_CONQUEROR_OF_ULDUAR = 2904, + ACHIEV_10_NUKED_FROM_ORBIT = 2915, + ACHIEV_25_NUKED_FROM_ORBIT = 2917, + ACHIEV_10_ORBITAL_BOMBARDMENT = 2913, + ACHIEV_25_ORBITAL_BOMBARDMENT = 2918, + ACHIEV_10_ORBITAL_DEVASTATION = 2914, + ACHIEV_25_ORBITAL_DEVASTATION = 2916, + ACHIEV_10_ORBIT_UARY = 3056, + ACHIEV_25_ORBIT_UARY = 3057, + ACHIEV_10_SHUTOUT = 2911, + ACHIEV_25_SHUTOUT = 2912, + ACHIEV_10_SIEGE_OF_ULDUAR = 2886, + ACHIEV_25_SIEGE_OF_ULDUAR = 2887, + ACHIEV_10_THREE_CAR_GARAGE = 2907, //no core support for using a vehicle + ACHIEV_25_THREE_CAR_GARAGE = 2908, //no core support for using a vehicle + ACHIEV_10_UNBROKEN = 2905, + ACHIEV_25_UNBROKEN = 2906, }; static Position Center[]= @@ -126,38 +170,119 @@ static Position Center[]= {354.8771, -12.90240, 409.803650}, }; +const Position PosSiege[5] = +{ + {-814.59,-64.54,429.92,5.969}, + {-784.37,-33.31,429.92,5.096}, + {-808.99,-52.10,429.92,5.668}, + {-798.59,-44.00,429.92,5.663}, + {-812.83,-77.71,429.92,0.046}, +}; + +const Position PosChopper[5] = +{ + {-717.83,-106.56,430.02,0.122}, + {-717.83,-114.23,430.44,0.122}, + {-717.83,-109.70,430.22,0.122}, + {-718.45,-118.24,430.26,0.052}, + {-718.45,-123.58,430.41,0.085}, +}; + +const Position PosDemolisher[5] = +{ + {-724.12,-176.64,430.03,2.543}, + {-766.70,-225.03,430.50,1.710}, + {-729.54,-186.26,430.12,1.902}, + {-756.01,-219.23,430.50,2.369}, + {-798.01,-227.24,429.84,1.446}, +}; + struct boss_flame_leviathanAI : public BossAI { boss_flame_leviathanAI(Creature* pCreature) : BossAI(pCreature, TYPE_LEVIATHAN), vehicle(pCreature->GetVehicleKit()) { assert(vehicle); - - pInstance = pCreature->GetInstanceData(); + pInstance = me->GetInstanceData(); + uiActiveTowers = 4; + ActiveTowers = false; + towerOfStorms = false; + towerOfLife = false; + towerOfFlames = false; + towerOfFrost = false; + me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); + me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); //deathgrip + + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + me->SetReactState(REACT_PASSIVE); } ScriptedInstance* pInstance; Vehicle* vehicle; uint8 uiActiveTowers; + bool ActiveTowers; + bool towerOfStorms; + bool towerOfLife; + bool towerOfFlames; + bool towerOfFrost; void Reset() { _Reset(); + /*me->SetLootMode(LOOT_MODE_HARD_MODE_4); + me->SetLootMode(LOOT_MODE_HARD_MODE_3); + me->SetLootMode(LOOT_MODE_HARD_MODE_2); + me->SetLootMode(LOOT_MODE_HARD_MODE_1);*/ + if (pInstance) + pInstance->SetData(TYPE_LEVIATHAN, NOT_STARTED); assert(vehicle); - uiActiveTowers = 0; - me->SetReactState(REACT_AGGRESSIVE); + me->GetVehicleKit(); + me->SetReactState(REACT_DEFENSIVE); } void EnterCombat(Unit* /*who*/) { _EnterCombat(); - DoScriptText(SAY_AGGRO, me); - me->SetReactState(REACT_DEFENSIVE); + pInstance->SetData(TYPE_LEVIATHAN, IN_PROGRESS); //_Reset doesnt do this correctly + me->SetReactState(REACT_AGGRESSIVE); events.ScheduleEvent(EVENT_PURSUE, 0); events.ScheduleEvent(EVENT_MISSILE, 1500); events.ScheduleEvent(EVENT_VENT, 20000); events.ScheduleEvent(EVENT_SPEED, 15000); events.ScheduleEvent(EVENT_SUMMON, 0); + if (ActiveTowers) + { + if (towerOfStorms) + { + me->AddAura(SPELL_BUFF_TOWER_OF_STORMS, me); + events.ScheduleEvent(EVENT_THORIM_S_HAMMER, 35000); + } + + if (towerOfFlames) + { + me->AddAura(SPELL_BUFF_TOWER_OF_FLAMES, me); + events.ScheduleEvent(EVENT_MIMIRON_S_INFERNO,70000); + } + + if (towerOfFrost) + { + me->AddAura(SPELL_BUFF_TOWER_OF_FR0ST, me); + events.ScheduleEvent(EVENT_HODIR_S_FURY, 105000); + } + + if (towerOfLife) + { + me->AddAura(SPELL_BUFF_TOWER_OF_LIFE, me); + events.ScheduleEvent(EVENT_FREYA_S_WARD, 140000); + } + + if (!towerOfLife && !towerOfFrost && !towerOfFlames && !towerOfStorms) + DoScriptText(SAY_TOWER_NONE, me); + else + DoScriptText(SAY_HARDMODE, me); + } + else + DoScriptText(SAY_AGGRO, me); if (Creature *turret = CAST_CRE(vehicle->GetPassenger(SEAT_TURRET))) turret->AI()->DoZoneInCombat(); @@ -170,39 +295,40 @@ struct boss_flame_leviathanAI : public BossAI AttackStart(pTarget); } + void JustDied(Unit* /*victim*/) { _JustDied(); + pInstance->SetData(TYPE_LEVIATHAN, DONE); //_Reset doesnt do this correctly DoScriptText(SAY_DEATH, me); - if (pInstance) + + if (ActiveTowers) { - if (uiActiveTowers) + switch (uiActiveTowers) { - switch (uiActiveTowers) - { - case 4: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBIT_UARY, ACHIEV_25_ORBIT_UARY)); - break; - case 3: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_NUKED_FROM_ORBIT, ACHIEV_25_NUKED_FROM_ORBIT)); - break; - case 2: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_DEVASTATION, ACHIEV_25_ORBITAL_DEVASTATION)); - break; - case 1: - pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_BOMBARDMENT, ACHIEV_25_ORBITAL_BOMBARDMENT)); - break; - } + case 4: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBIT_UARY, ACHIEV_25_ORBIT_UARY)); + break; + case 3: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_NUKED_FROM_ORBIT, ACHIEV_25_NUKED_FROM_ORBIT)); + break; + case 2: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_DEVASTATION, ACHIEV_25_ORBITAL_DEVASTATION)); + break; + case 1: + pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_BOMBARDMENT, ACHIEV_25_ORBITAL_BOMBARDMENT)); + break; } } } void SpellHit(Unit* /*caster*/, const SpellEntry* pSpell) { - if (pSpell->Id == 62472) + if (pSpell->Id == SPELL_START_THE_ENGINE) vehicle->InstallAllAccessories(); - else if (pSpell->Id == SPELL_ELECTROSHOCK) - me->InterruptSpell(CURRENT_CHANNELED_SPELL); + else + if (pSpell->Id == SPELL_ELECTROSHOCK) + me->InterruptSpell(CURRENT_CHANNELED_SPELL); } void UpdateAI(const uint32 diff) @@ -221,60 +347,104 @@ struct boss_flame_leviathanAI : public BossAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; + if (me->HasAura(SPELL_SYSTEMS_SHUTDOWN)) + { + me->SetReactState(REACT_PASSIVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); + return; + } + else + { + me->SetReactState(REACT_AGGRESSIVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); + } + uint32 eventId = events.GetEvent(); if (!me->getVictim()) eventId = EVENT_PURSUE; switch(eventId) { - case 0: break; // this is a must - case EVENT_PURSUE: - DoCastAOE(SPELL_PURSUED, true); - //events.RepeatEvent(35000); // this should not be used because eventId may be overriden - events.RescheduleEvent(EVENT_PURSUE, 35000); - if (!me->getVictim()) // all siege engines and demolishers are dead - UpdateVictim(); // begin to kill other things - return; - case EVENT_MISSILE: - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM)) - DoCast(pTarget, SPELL_MISSILE_BARRAGE); - events.RepeatEvent(1500); - return; - case EVENT_VENT: - DoCastAOE(SPELL_FLAME_VENTS); - events.RepeatEvent(20000); - return; - case EVENT_SPEED: - DoCastAOE(SPELL_GATHERING_SPEED); - events.RepeatEvent(15000); - return; - case EVENT_SUMMON: - if (summons.size() < 15) // 4seat+1turret+10lift - if (Creature* pLift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0)) - pLift->GetMotionMaster()->MoveRandom(100); - events.RepeatEvent(2000); - return; - case EVENT_THORIM_S_HAMMER: // Tower of Storms - DoCast(me, SPELL_THORIM_S_HAMMER); - events.RepeatEvent(urand(60000, 120000)); - return; - case EVENT_MIMIRON_S_INFERNO: // Tower of Flames - DoCast(me->getVictim(), SPELL_MIMIRON_S_INFERNO); - events.RepeatEvent(urand(60000, 120000)); - return; - case EVENT_HODIR_S_FURY: // Tower of Frost - DoCast(me->getVictim(), SPELL_HODIR_S_FURY); - events.RepeatEvent(urand(60000, 120000)); - return; - case EVENT_FREYA_S_WARD: // Tower of Nature - DoCast(me, SPELL_FREYA_S_WARD); - events.RepeatEvent(urand(60000, 120000)); - return; - default: - events.PopEvent(); - break; + case 0: break; // this is a must + case EVENT_PURSUE: + DoCastAOE(SPELL_PURSUED, true); + DoScriptText(RAND(SAY_TARGET_1, SAY_TARGET_2, SAY_TARGET_3), me); + events.RescheduleEvent(EVENT_PURSUE, 30000); + UpdateVictim(); // begin to kill other things + if (me->getVictim()) + me->MonsterTextEmote(EMOTE_PURSUE, me->getVictim()->GetGUID(), true); + return; + case EVENT_MISSILE: + if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM)) + DoCast(pTarget, SPELL_MISSILE_BARRAGE); + events.RepeatEvent(1500); + return; + case EVENT_VENT: + DoCastAOE(SPELL_FLAME_VENTS); + events.RepeatEvent(20000); + return; + case EVENT_SPEED: + DoCastAOE(SPELL_GATHERING_SPEED); + events.RepeatEvent(15000); + return; + case EVENT_SUMMON: + if (summons.size() < 15) // 4seat+1turret+10lift + if (Creature* pLift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0)) + pLift->GetMotionMaster()->MoveRandom(100); + events.RepeatEvent(2000); + return; + case EVENT_SHUTDOWN: + DoScriptText(RAND(SAY_OVERLOAD_1, SAY_OVERLOAD_2, SAY_OVERLOAD_3), me); + me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true); + DoCast(SPELL_SYSTEMS_SHUTDOWN); + me->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED); + me->MonsterTextEmote(EMOTE_REPAIR, 0, true); + events.CancelEvent(EVENT_SHUTDOWN); + return; + case EVENT_THORIM_S_HAMMER: // Tower of Storms + for (uint8 i = 0; i < 7; ++i) + { + if (Creature* pThorim = DoSummon(MOB_THORIM_BEACON, me, urand(20,60), 20000, TEMPSUMMON_TIMED_DESPAWN)) + pThorim->GetMotionMaster()->MoveRandom(100); + } + DoScriptText(SAY_TOWER_STORM, me); + events.CancelEvent(EVENT_THORIM_S_HAMMER); + return; + case EVENT_MIMIRON_S_INFERNO: // Tower of Flames + me->SummonCreature(MOB_MIMIRON_BEACON, 390.93, -13.91, 409.81); + DoScriptText(SAY_TOWER_FLAME, me); + events.CancelEvent(EVENT_MIMIRON_S_INFERNO); + return; + case EVENT_HODIR_S_FURY: // Tower of Frost + for (uint8 i = 0; i < 7; ++i) + { + if (Creature* pHodir = DoSummon(MOB_HODIR_BEACON, me, 50, 0)) + pHodir->GetMotionMaster()->MoveRandom(100); + } + DoScriptText(SAY_TOWER_FROST, me); + events.CancelEvent(EVENT_HODIR_S_FURY); + return; + case EVENT_FREYA_S_WARD: // Tower of Nature + DoScriptText(SAY_TOWER_NATURE, me); + StartFreyaEvent(); + if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM)) + DoCast(pTarget, SPELL_FREYA_S_WARD); + events.CancelEvent(EVENT_FREYA_S_WARD); + return; + default: + events.PopEvent(); + break; } - DoSpellAttackIfReady(SPELL_BATTERING_RAM); + if (me->IsWithinMeleeRange(me->getVictim())) + DoSpellAttackIfReady(SPELL_BATTERING_RAM); + } + + void StartFreyaEvent()//summon these 4 on each corner wich wil spawn additional hostile mobs + { + me->SummonCreature(MOB_FREYA_BEACON, 377.02, -119.10, 409.81); + me->SummonCreature(MOB_FREYA_BEACON, 377.02, 54.78, 409.81); + me->SummonCreature(MOB_FREYA_BEACON, 185.62, 54.78, 409.81); + me->SummonCreature(MOB_FREYA_BEACON, 185.62, -119.10, 409.81); } void DoAction(const int32 uiAction) @@ -282,51 +452,62 @@ struct boss_flame_leviathanAI : public BossAI // Start encounter if (uiAction == 10) { - me->GetMotionMaster()->MovePoint(0, Center[0]); + me->SetHomePosition(354.8771, -12.90240, 409.803, 0); + me->GetMotionMaster()->MoveCharge(354.8771, -12.90240, 409.803); //position center me->SetReactState(REACT_AGGRESSIVE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED); + DoZoneInCombat(); return; } - /* - Tower event triggers - General TODO: - Yells - - Actions: - DoAction(0): Activate hard-mode. Buff up leviathan's AP & health, schedule all the tower spells. - Should be triggered on Lore Keeper's script - DoAction(1-4): A tower have been destroyed, debuff leviathan's AP & health - DoAction(1); Tower of Storms has been destroyed, deschedule spell Thorim's Hammer - DoAction(2): Tower of Flames has been destroyed, deschedule spell Mimiron's Inferno - DoAction(3): Tower of Frost has been destroyed, deschedule spell Hodir's Fury - DoAction(4): Tower of Nature has been destroyed, deschedule spell Freya's Ward - */ - - if (uiAction) // Tower destruction, debuff leviathan AP & health + + if (uiAction && uiAction <= 4) // Tower destruction, debuff leviathan loot and reduce active tower { - --uiActiveTowers; + if (me->HasLootMode(31) && uiActiveTowers == 4) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_4); + --uiActiveTowers; + } + if (me->HasLootMode(15) && uiActiveTowers == 3) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_3); + --uiActiveTowers; + } + if (me->HasLootMode(7) && uiActiveTowers == 2) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_2); + --uiActiveTowers; + } + if (me->HasLootMode(3) && uiActiveTowers == 1) + { + me->RemoveLootMode(LOOT_MODE_HARD_MODE_1); + --uiActiveTowers; + } } switch (uiAction) { - case 0: // Activate hard-mode - events.ScheduleEvent(EVENT_THORIM_S_HAMMER, urand(30000,60000)); - events.ScheduleEvent(EVENT_MIMIRON_S_INFERNO, urand(30000,60000)); - events.ScheduleEvent(EVENT_HODIR_S_FURY, urand(30000,60000)); - events.ScheduleEvent(EVENT_FREYA_S_WARD, urand(30000,60000)); - uiActiveTowers=4; + case 0: // Activate hard-mode setting counter to 4 towers, enable all towers apply buffs on levithian + ActiveTowers = true; + towerOfStorms = true; + towerOfLife = true; + towerOfFlames = true; + towerOfFrost = true; + me->SetLootMode(31); break; case 1: // Tower of Storms destroyed - events.CancelEvent(EVENT_THORIM_S_HAMMER); + towerOfStorms = false; break; case 2: // Tower of Flames destroyed - events.CancelEvent(EVENT_MIMIRON_S_INFERNO); + towerOfFlames = false; break; case 3: // Tower of Frost destroyed - events.CancelEvent(EVENT_HODIR_S_FURY); + towerOfFrost = false; break; case 4: // Tower of Nature destroyed - events.CancelEvent(EVENT_FREYA_S_WARD); + towerOfLife = false; + break; + case 9: // Schedule event + events.ScheduleEvent(EVENT_SHUTDOWN, 0); break; } } @@ -336,7 +517,7 @@ struct boss_flame_leviathanAI : public BossAI struct boss_flame_leviathan_seatAI : public PassiveAI { - boss_flame_leviathan_seatAI(Creature *c) : PassiveAI(c), vehicle(c->GetVehicleKit()) + boss_flame_leviathan_seatAI(Creature* pCreature) : PassiveAI(pCreature), vehicle(pCreature->GetVehicleKit()) { assert(vehicle); #ifdef BOSS_DEBUG @@ -377,17 +558,17 @@ struct boss_flame_leviathan_seatAI : public PassiveAI device->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } } - else if (seatId == SEAT_TURRET) - { - if (apply) - return; - - if (Unit* device = vehicle->GetPassenger(SEAT_DEVICE)) + else + if (seatId == SEAT_TURRET) { - device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); - device->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable + if (apply) + return; + if (Unit* device = vehicle->GetPassenger(SEAT_DEVICE)) + { + device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); + device->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable + } } - } } }; @@ -411,7 +592,12 @@ struct boss_flame_leviathan_defense_turretAI : public TurretAI struct boss_flame_leviathan_overload_deviceAI : public PassiveAI { - boss_flame_leviathan_overload_deviceAI(Creature* pCreature) : PassiveAI(pCreature) {} + boss_flame_leviathan_overload_deviceAI(Creature* pCreature) : PassiveAI(pCreature) + { + pInstance = pCreature->GetInstanceData(); + } + + ScriptedInstance *pInstance; void DoAction(const int32 param) { @@ -419,6 +605,7 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI { me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pInstance->instance->GetCreature(TYPE_LEVIATHAN)->AI()->DoAction(9); //should be called if all 3 overload devices are active if (me->GetVehicle()) { if (Unit* pPlayer = me->GetVehicle()->GetPassenger(SEAT_PLAYER)) @@ -435,28 +622,83 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI struct boss_flame_leviathan_safety_containerAI : public PassiveAI { - boss_flame_leviathan_safety_containerAI(Creature *c) : PassiveAI(c) {} + boss_flame_leviathan_safety_containerAI(Creature* pCreature) : PassiveAI(pCreature) + { + } + + void JustDied() + { + float x,y,z; + me->GetPosition(x,y,z); + z = me->GetMap()->GetHeight(x, y, z); + me->GetMotionMaster()->MovePoint(0,x,y,z); + me->GetMap()->CreatureRelocation(me, x,y,z,0); + } + + void UpdateAI(const uint32 diff) + { + } +}; +struct npc_mechanoliftAI : public PassiveAI +{ + npc_mechanoliftAI(Creature* pCreature) : PassiveAI(pCreature), vehicle(pCreature->GetVehicleKit()) + { + assert(vehicle); + } + + Vehicle* vehicle; + + uint32 MoveTimer; + + void Reset () + { + MoveTimer = 0; + me->GetMotionMaster()->MoveRandom(50); + } + + void JustDied(Unit* pKiller) + { + me->GetMotionMaster()->MoveTargetedHome(); + Creature* pLiquid = DoSummon(MOB_LIQUID, me, 0); + if (pLiquid) + { + pLiquid->CastSpell(pLiquid, SPELL_LIQUID_PYRITE, true); + pLiquid->GetMotionMaster()->MoveFall(pKiller->GetPositionZ()); + } + + } - void MovementInform(uint32 /*type*/, uint32 id) + void MovementInform(uint32 type, uint32 id) { - if (id == me->GetEntry()) + if (id == 1) { - if (Creature* pLiquid = DoSummon(MOB_LIQUID, me, 0)) - pLiquid->CastSpell(pLiquid, 62494, true); - me->DisappearAndDie(); // this will relocate creature to sky + Creature* pContainer = me->FindNearestCreature(MOB_CONTAINER, 5, true); + if (pContainer) + pContainer->EnterVehicle(me); } } - void UpdateAI(const uint32 /*diff*/) + void UpdateAI(const uint32 diff) { - if (!me->GetVehicle() && me->isSummon() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) - me->GetMotionMaster()->MoveFall(409.8f, me->GetEntry()); + if (MoveTimer <= diff) + { + if (me->GetVehicleKit()->HasEmptySeat(-1)) + { + Creature* pContainer = me->FindNearestCreature(MOB_CONTAINER, 50, true); + if (pContainer && !pContainer->GetVehicle()) + me->GetMotionMaster()->MovePoint(1,pContainer->GetPositionX(),pContainer->GetPositionY(),pContainer->GetPositionZ()); + } + MoveTimer = 30000; //check next 30 seconds + } + else + MoveTimer-=diff; } }; -struct spell_pool_of_tarAI : public TriggerAI + +struct spell_pool_of_tarAI : public PassiveAI { - spell_pool_of_tarAI(Creature *c) : TriggerAI(c) + spell_pool_of_tarAI(Creature* pCreature) : PassiveAI(pCreature) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -466,9 +708,9 @@ struct spell_pool_of_tarAI : public TriggerAI damage = 0; } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellEntry* pSpell) { - if (spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE)) + if (pSpell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE)) me->CastSpell(me, SPELL_BLAZE, true); } }; @@ -481,7 +723,6 @@ struct npc_colossusAI : public ScriptedAI } ScriptedInstance *pInstance; - Position pPos; void JustDied(Unit* /*Who*/) { @@ -496,9 +737,339 @@ struct npc_colossusAI : public ScriptedAI { if (!UpdateVictim()) return; + DoMeleeAttackIfReady() ; + } +}; + +struct npc_thorims_hammerAI : public ScriptedAI +{ + npc_thorims_hammerAI(Creature* pCreature) : ScriptedAI (pCreature) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->AddAura(AURA_DUMMY_BLUE, me); + } + + void MoveInLineOfSight(Unit* who) + { + if (who->GetTypeId() == TYPEID_PLAYER && who->IsVehicle() && me->IsInRange(who,0,10,false)) + { + if (Creature* pTrigger = DoSummonFlyer(NPC_THORIM_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN)) + pTrigger->CastSpell(who, SPELL_THORIM_S_HAMMER, true); + } + } + + void Reset () + { + } + + void UpdateAI(const uint32 diff) + { + if (!me->HasAura(AURA_DUMMY_BLUE)) + me->AddAura(AURA_DUMMY_BLUE, me); + + if (!UpdateVictim()) + return; + } +}; + +struct npc_mimirons_infernoAI : public npc_escortAI +{ + npc_mimirons_infernoAI(Creature* pCreature) : npc_escortAI(pCreature) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->AddAura(AURA_DUMMY_YELLOW, me); + me->SetReactState(REACT_PASSIVE); + } + + void WaypointReached(uint32 i) + { + } + + void Reset() + { + infernoTimer = 2000; + } + + uint32 infernoTimer; + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + Start(false,true,0,NULL,false,true); + } + else + { + if(infernoTimer <= diff) + { + if (Creature* pTrigger = DoSummonFlyer(NPC_MIMIRON_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN)) + { + pTrigger->CastSpell(me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), SPELL_MIMIRON_S_INFERNO, true); + infernoTimer = 2000; + } + } + else + infernoTimer -= diff; + + if (!me->HasAura(AURA_DUMMY_YELLOW)) + me->AddAura(AURA_DUMMY_YELLOW, me); + } + } +}; + + +struct npc_hodirs_furyAI : public ScriptedAI +{ + npc_hodirs_furyAI(Creature* pCreature) : ScriptedAI (pCreature) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->AddAura(AURA_DUMMY_GREEN, me); + } + + void MoveInLineOfSight(Unit* who) + { + if (who->GetTypeId() == TYPEID_PLAYER && who->IsVehicle() && me->IsInRange(who,0,5,false)) + { + if (Creature* pTrigger = DoSummonFlyer(NPC_HODIR_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN)) + pTrigger->CastSpell(who, SPELL_HODIR_S_FURY, true); + } + } + + void Reset() + { + } + + void UpdateAI(const uint32 diff) + { + if (!me->HasAura(AURA_DUMMY_GREEN)) + me->AddAura(AURA_DUMMY_GREEN, me); + + if (!UpdateVictim()) + return; } }; +struct npc_freyas_wardAI : public ScriptedAI +{ + npc_freyas_wardAI(Creature* pCreature) : ScriptedAI(pCreature) + { + me->AddAura(AURA_DUMMY_GREEN, me); + } + + uint32 summonTimer ; + + void Reset() + { + summonTimer = 5000 ; + } + + void UpdateAI(const uint32 diff) + { + if(summonTimer <= diff) + { + DoCast(SPELL_FREYA_S_WARD_EFFECT_1) ; + DoCast(SPELL_FREYA_S_WARD_EFFECT_2) ; + summonTimer = 20000 ; + } + else + summonTimer -= diff ; + + if (!me->HasAura(AURA_DUMMY_GREEN)) + me->AddAura(AURA_DUMMY_GREEN, me); + + if (!UpdateVictim()) + return; + } +}; + +struct npc_freya_ward_summonAI : public ScriptedAI +{ + npc_freya_ward_summonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pCreature->GetMotionMaster()->MoveRandom(100); + } + + uint32 lashTimer ; + + void Reset() + { + lashTimer = 5000 ; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(lashTimer <= diff) + { + DoCast(SPELL_LASH); + lashTimer = 20000; + } + else + lashTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; +//npc lore keeper +#define GOSSIP_ITEM_1 "Activate secondary defensive systems" +#define GOSSIP_ITEM_2 "Confirmed" +struct npc_lorekeeperAI : public ScriptedAI +{ + npc_lorekeeperAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = pCreature->GetInstanceData(); + } + + ScriptedInstance* pInstance; + + void DoAction(const int32 uiAction) + { + // Start encounter + if (uiAction == 0) + { + for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i) + DoSummon(VEHICLE_SIEGE, PosSiege[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN); + for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i) + DoSummon(VEHICLE_CHOPPER, PosChopper[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN); + for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i) + DoSummon(VEHICLE_DEMOLISHER,PosDemolisher[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN); + return; + } + } +}; + +bool GossipHello_npc_lorekeeper(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* pInstance = pCreature->GetInstanceData(); + if (pInstance && pInstance->GetData(TYPE_LEVIATHAN) !=DONE && pPlayer) + { + pPlayer->PrepareGossipMenu(pCreature); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + } + return true; +} +//enable hardmode +bool GossipSelect_npc_lorekeeper(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +{ + ScriptedInstance* pInstance = pCreature->GetInstanceData(); + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + if (pPlayer) + { + pPlayer->PrepareGossipMenu(pCreature); + pInstance->instance->LoadGrid(364,-16); //make sure leviathan is loaded + + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_2,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + } + break; + case GOSSIP_ACTION_INFO_DEF+2: + if (pPlayer) + pPlayer->CLOSE_GOSSIP_MENU(); + + if (Creature* pLeviathan = pInstance->instance->GetCreature(pInstance->GetData64(TYPE_LEVIATHAN))) + { + CAST_AI(boss_flame_leviathanAI, (pLeviathan->AI()))->DoAction(0); //enable hard mode activating the 4 additional events spawning additional vehicles + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->AI()->DoAction(0); // spawn the vehicles + pCreature->SetVisibility(VISIBILITY_OFF); + if (Creature* Delorah = pCreature->FindNearestCreature(NPC_DELORAH, 1000, true)) + { + if (Creature* Branz = pCreature->FindNearestCreature(NPC_BRANZ_BRONZBEARD, 1000, true)) + { + Delorah->GetMotionMaster()->MovePoint(0, Branz->GetPositionX()-4, Branz->GetPositionY(), Branz->GetPositionZ()); + //TODO DoScriptText(xxxx, Delorah, Branz); when reached at branz + } + } + } + break; + } + return true; +} +////npc_brann_bronzebeard this requires more work involving area triggers. if reached this guy speaks through his radio.. +//#define GOSSIP_ITEM_1 "xxxxx" +//#define GOSSIP_ITEM_2 "xxxxx" +// +//bool GossipHello_npc_brann_bronzebeard(Player* pPlayer, Creature* pCreature) +//{ +// ScriptedInstance* pInstance = pCreature->GetInstanceData(); +// if (pInstance && pInstance->GetData(TYPE_LEVIATHAN) !=DONE) +// { +// pPlayer->PrepareGossipMenu(pCreature); +// +// pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); +// pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); +// } +// return true; +//} +// +//bool GossipSelect_npc_brann_bronzebeard(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) +//{ +// switch(uiAction) +// { +// case GOSSIP_ACTION_INFO_DEF+1: +// if (pPlayer) +// { +// pPlayer->PrepareGossipMenu(pCreature); +// +// pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_2,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); +// pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); +// } +// break; +// case GOSSIP_ACTION_INFO_DEF+2: +// if (pPlayer) +// pPlayer->CLOSE_GOSSIP_MENU(); +// if (Creature* Lorekeeper = pCreature->FindNearestCreature(NPC_LOREKEEPER, 1000, true)) //lore keeper of lorgannon +// Lorekeeper->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); +// break; +// } +// return true; +//} + +void GODestroyed_go_ulduar_tower(Player* pPlayer, GameObject* pGO, uint32 value) +{ + ScriptedInstance* pInstance = pGO->GetInstanceData(); + if (pGO->GetGOValue()->building.health == 0) + { + switch(pGO->GetEntry()) + { + case GO_TOWER_OF_STORMS: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_STORM_DESTROYED); + break; + case GO_TOWER_OF_FLAMES: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_FLAMES_DESTROYED); + break; + case GO_TOWER_OF_FROST: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_FROST_DESTROYED); + break; + case GO_TOWER_OF_LIFE: + pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_LIFE_DESTROYED); + break; + } + } +} + +bool AreaTrigger_at_RX_214_repair_o_matic_station(Player* pPlayer, const AreaTriggerEntry* pAt) +{ + if(Creature* vehicle = pPlayer->GetVehicleCreatureBase()) + { + if(!vehicle->HasAura(SPELL_AUTO_REPAIR)) + { + pPlayer->MonsterTextEmote(EMOTE_REPAIR, pPlayer->GetGUID(), true); + pPlayer->CastSpell(vehicle, SPELL_AUTO_REPAIR, true); + } + } + return true; +} + CreatureAI* GetAI_boss_flame_leviathan(Creature* pCreature) { return new boss_flame_leviathanAI (pCreature); @@ -519,11 +1090,16 @@ CreatureAI* GetAI_boss_flame_leviathan_overload_device(Creature* pCreature) return new boss_flame_leviathan_overload_deviceAI (pCreature); } -CreatureAI* GetAI_boss_flame_leviathan_safety_containerAI(Creature* pCreature) +CreatureAI* GetAI_boss_flame_leviathan_safety_container(Creature* pCreature) { return new boss_flame_leviathan_safety_containerAI(pCreature); } +CreatureAI* GetAI_npc_mechanolift(Creature* pCreature) +{ + return new npc_mechanoliftAI(pCreature); +} + CreatureAI* GetAI_spell_pool_of_tar(Creature* pCreature) { return new spell_pool_of_tarAI (pCreature); @@ -534,6 +1110,35 @@ CreatureAI* GetAI_npc_colossus(Creature* pCreature) return new npc_colossusAI(pCreature); } +CreatureAI* GetAI_npc_thorims_hammer(Creature* pCreature) +{ + return new npc_thorims_hammerAI(pCreature); +} + +CreatureAI* GetAI_npc_mimirons_inferno(Creature* pCreature) +{ + return new npc_mimirons_infernoAI(pCreature); +} + +CreatureAI* GetAI_npc_hodirs_fury(Creature* pCreature) +{ + return new npc_hodirs_furyAI(pCreature); +} + +CreatureAI* GetAI_npc_freyas_ward(Creature* pCreature) +{ + return new npc_freyas_wardAI(pCreature); +} + +CreatureAI* GetAI_npc_freya_ward_summon(Creature* pCreature) +{ + return new npc_freya_ward_summonAI (pCreature); +} +CreatureAI* GetAI_npc_lorekeeper(Creature* pCreature) +{ + return new npc_lorekeeperAI (pCreature); +} + void AddSC_boss_flame_leviathan() { Script *newscript; @@ -559,7 +1164,12 @@ void AddSC_boss_flame_leviathan() newscript = new Script; newscript->Name = "boss_flame_leviathan_safety_container"; - newscript->GetAI = &GetAI_boss_flame_leviathan_safety_containerAI; + newscript->GetAI = &GetAI_boss_flame_leviathan_safety_container; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mechanolift"; + newscript->GetAI = &GetAI_npc_mechanolift; newscript->RegisterSelf(); newscript = new Script; @@ -571,4 +1181,52 @@ void AddSC_boss_flame_leviathan() newscript->Name = "npc_colossus"; newscript->GetAI = &GetAI_npc_colossus; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thorims_hammer"; + newscript->GetAI = &GetAI_npc_thorims_hammer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mimirons_inferno"; + newscript->GetAI = &GetAI_npc_mimirons_inferno; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_hodirs_fury"; + newscript->GetAI = &GetAI_npc_hodirs_fury; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_freyas_ward"; + newscript->GetAI = &GetAI_npc_freyas_ward; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_freya_ward_summon"; + newscript->GetAI = &GetAI_npc_freya_ward_summon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lorekeeper"; + newscript->GetAI = &GetAI_npc_lorekeeper; + newscript->pGossipHello = &GossipHello_npc_lorekeeper; + newscript->pGossipSelect = &GossipSelect_npc_lorekeeper; + newscript->RegisterSelf(); + + /*newscript = new Script; + newscript->Name = "npc_brann_bronzebeard"; + newscript->pGossipHello = &GossipHello_npc_brann_bronzebeard; + newscript->pGossipSelect = &GossipSelect_npc_brann_bronzebeard; + newscript->RegisterSelf();*/ + + newscript = new Script; + newscript->Name = "go_ulduar_tower"; + newscript->pGODestroyed = &GODestroyed_go_ulduar_tower; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_RX_214_repair_o_matic_station"; + newscript->pAreaTrigger = &AreaTrigger_at_RX_214_repair_o_matic_station; + newscript->RegisterSelf(); } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp index ee995878a0e..df1298eb3b7 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum Yells diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp index f84c638d3e3..7b573864ee0 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum Yells diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp index 6facd8ac639..b43dbe82b60 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum Yells diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp index 05f9ecd3c66..ac5414eaedf 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" #define SPELL_FLAME_JETS 62680 diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp index 2080b458a1b..710484de42c 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp index 2b9994d5d9b..85fab4d67db 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum Yells diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp index c61f1046474..bf4ddae9e99 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -22,7 +21,7 @@ SDAuthor: MaXiMiUS SD%Complete: 65 EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" //not in db diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp index bbab077e10e..a508457e62a 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum Yells diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp index 58123951d2f..600bb41a469 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* @@ -28,7 +27,7 @@ make the life sparks visible... */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum Spells diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp index 8f42f289204..57c0008536b 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum Sara_Yells diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp index 692dbf72473..27f59ebb835 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ulduar.h" enum eGameObjects @@ -64,8 +63,7 @@ struct instance_ulduar : public ScriptedInstance uint64 uiFreyaChestGUID; void Initialize() - { - uiLeviathanGUID = 0; + { uiIgnisGUID = 0; uiRazorscaleGUID = 0; uiXT002GUID = 0; @@ -106,7 +104,7 @@ struct instance_ulduar : public ScriptedInstance switch(pCreature->GetEntry()) { case NPC_LEVIATHAN: - uiLeviathanGUID = pCreature->GetGUID(); + uiLeviathanGUID = pCreature->GetGUID(); break; case NPC_IGNIS: uiIgnisGUID = pCreature->GetGUID(); @@ -187,22 +185,24 @@ struct instance_ulduar : public ScriptedInstance if (flag == 7) flag =0; break; - case GO_LEVIATHAN_GATE: - uiLeviathanGateGUID = pGO->GetGUID(); - HandleGameObject(NULL, false, pGO); - break; + case GO_LEVIATHAN_GATE: + uiLeviathanGateGUID = add ? pGO->GetGUID() : NULL; + HandleGameObject(NULL, false, pGO); + break; } } void ProcessEvent(GameObject* pGO, uint32 uiEventId) { // Flame Leviathan's Tower Event triggers - Creature* pFlameLeviathan = instance->GetCreature(NPC_LEVIATHAN); + Creature* pFlameLeviathan = instance->GetCreature(uiLeviathanGUID); + if (pFlameLeviathan && pFlameLeviathan->isAlive()) //No leviathan, no event triggering ;) switch(uiEventId) { case EVENT_TOWER_OF_STORM_DESTROYED: - pFlameLeviathan->AI()->DoAction(1); + //pGO->GetInstanceData()->SetData(DATA_TOWER_STORMS,DESTROYED); + pFlameLeviathan->AI()->DoAction(1); break; case EVENT_TOWER_OF_FROST_DESTROYED: pFlameLeviathan->AI()->DoAction(2); @@ -210,7 +210,7 @@ struct instance_ulduar : public ScriptedInstance case EVENT_TOWER_OF_FLAMES_DESTROYED: pFlameLeviathan->AI()->DoAction(3); break; - case EVENT_TOWER_OF_NATURE_DESTROYED: + case EVENT_TOWER_OF_LIFE_DESTROYED: pFlameLeviathan->AI()->DoAction(4); break; } @@ -218,9 +218,6 @@ struct instance_ulduar : public ScriptedInstance void SetData(uint32 type, uint32 data) { - if (type != TYPE_COLOSSUS) - uiEncounter[type] = data; - switch(type) { /*case TYPE_IGNIS: @@ -235,12 +232,12 @@ struct instance_ulduar : public ScriptedInstance case TYPE_LEVIATHAN: if (data == IN_PROGRESS) { - for (uint8 uiI = 0; uiI < 7; uiI++) + for (uint8 uiI = 0; uiI < 7; ++uiI) HandleGameObject(uiLeviathanDoor[uiI],false); } else { - for (uint8 uiI = 0; uiI < 7; uiI++) + for (uint8 uiI = 0; uiI < 7; ++uiI) HandleGameObject(uiLeviathanDoor[uiI],true); } break; @@ -265,32 +262,21 @@ struct instance_ulduar : public ScriptedInstance pGO->SetRespawnTime(pGO->GetRespawnDelay()); break; case TYPE_COLOSSUS: + uiEncounter[TYPE_COLOSSUS] = data; if (data == 2) { if (Creature* pBoss = instance->GetCreature(uiLeviathanGUID)) pBoss->AI()->DoAction(10); if (GameObject* pGate = instance->GetGameObject(uiLeviathanGateGUID)) - pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); } - break; + break; default: break; } if (data == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - saveStream << uiEncounter[i] << " "; - - m_strInstData = saveStream.str(); - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } } uint64 GetData64(uint32 data) @@ -351,9 +337,9 @@ struct instance_ulduar : public ScriptedInstance std::ostringstream saveStream; saveStream << "U U " << uiEncounter[0] << " " << uiEncounter[1] << " " << uiEncounter[2] << " " << uiEncounter[3] - << uiEncounter[4] << " " << uiEncounter[5] << " " << uiEncounter[6] << " " << uiEncounter[7] - << uiEncounter[8] << " " << uiEncounter[9] << " " << uiEncounter[10] << " " << uiEncounter[11] - << uiEncounter[12] << " " << uiEncounter[13] << " " << uiEncounter[14]; + << " " << uiEncounter[4] << " " << uiEncounter[5] << " " << uiEncounter[6] << " " << uiEncounter[7] + << " " << uiEncounter[8] << " " << uiEncounter[9] << " " << uiEncounter[10] << " " << uiEncounter[11] + << " " << uiEncounter[12] << " " << uiEncounter[13] << " " << uiEncounter[14]; m_strInstData = saveStream.str(); diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h index cb11bcb579c..a6d1271ce0e 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h @@ -1,19 +1,18 @@ /* - * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_ULDUAR_H @@ -43,7 +42,7 @@ enum eTypes DATA_MOLGEIM = 21, DATA_BRUNDIR = 22, DATA_RUNEMASTER_MOLGEIM = 23, - DATA_STORMCALLER_BRUNDIR = 24, + DATA_STORMCALLER_BRUNDIR = 24, NPC_LEVIATHAN = 33113, NPC_IGNIS = 33118, @@ -65,7 +64,7 @@ enum eTypes EVENT_TOWER_OF_STORM_DESTROYED = 21031, EVENT_TOWER_OF_FROST_DESTROYED = 21032, EVENT_TOWER_OF_FLAMES_DESTROYED = 21033, - EVENT_TOWER_OF_NATURE_DESTROYED = 21030 + EVENT_TOWER_OF_LIFE_DESTROYED = 21030 }; #endif diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp index 44f9e86b69c..102cb69a3b1 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp @@ -1,4 +1,22 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "ulduar.h" /* diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index 77f824c48d5..bc2270cf79f 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -23,7 +22,7 @@ SDComment: Some Problems with Annhylde Movement, Blizzlike Timers SDCategory: Udgarde Keep EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_keep.h" enum Yells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index d69f0eee846..31274403c0e 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -23,7 +22,7 @@ SDComment: Needs Prince Movements, Needs adjustments to blizzlike timers, Needs SDCategory: Utgarde Keep EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_keep.h" enum eEnums diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp index 2146d37635b..02fc594b74a 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -23,7 +22,7 @@ SDComment: Needs adjustments to blizzlike timers, Yell Text + Sound to DB SDCategory: Utgarde Keep EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_keep.h" enum eEnums diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index 03f97b1d27e..1a45b18326c 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -23,7 +22,7 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter SDCategory: Utgarde Keep EndScriptData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_keep.h" #define MAX_ENCOUNTER 3 @@ -109,7 +108,7 @@ struct instance_utgarde_keep : public ScriptedInstance } } - debug_log("TSCR: Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!"); + sLog.outDebug("TSCR: Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!"); return NULL; } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 95825aa49b6..4ee2059712d 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_keep.h" uint32 entry_search[3] = diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h index b630e156564..f65c54f540c 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DEF_UTGARDE_KEEP_H diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 297fe37b7d8..af20d156c15 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss palehoof SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = 'boss_palehoof' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_pinnacle.h" enum Spells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index a75eb3465be..964f30adb91 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -1,17 +1,18 @@ -/* Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* Script Data Start @@ -24,7 +25,7 @@ SDComment: <Known Bugs> SDCategory: Utgarde Pinnacle Script Data End */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_pinnacle.h" //Yell @@ -252,7 +253,7 @@ struct boss_skadiAI : public ScriptedAI break; case CREATURE_TRIGGER: pSummoned->CastSpell((Unit*)NULL, SPELL_FREEZING_CLOUD, true); - pSummoned->ForcedDespawn(10*IN_MILISECONDS); + pSummoned->ForcedDespawn(10*IN_MILLISECONDS); break; } Summons.Summon(pSummoned); @@ -275,7 +276,7 @@ struct boss_skadiAI : public ScriptedAI Phase = SKADI; me->SetFlying(false); me->Unmount(); - if(Creature* pGrauf = me->SummonCreature(CREATURE_GRAUF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3*IN_MILISECONDS)) + if(Creature* pGrauf = me->SummonCreature(CREATURE_GRAUF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3*IN_MILLISECONDS)) { pGrauf->GetMotionMaster()->MoveFall(0); pGrauf->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index aae1015ddab..bd3cf42c502 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -1,20 +1,21 @@ -/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_pinnacle.h" enum Spells @@ -104,7 +105,7 @@ struct boss_svalaAI : public ScriptedAI void Reset() { Phase = IDLE; - uiIntroTimer = 1*IN_MILISECONDS; + uiIntroTimer = 1*IN_MILLISECONDS; uiIntroPhase = 0; uiArthasGUID = 0; @@ -149,28 +150,28 @@ struct boss_svalaAI : public ScriptedAI case 0: DoScriptText(SAY_DIALOG_WITH_ARTHAS_1, me); ++uiIntroPhase; - uiIntroTimer = 3.5*IN_MILISECONDS; + uiIntroTimer = 3.5*IN_MILLISECONDS; break; case 1: DoScriptText(SAY_DIALOG_OF_ARTHAS_1, pArthas); ++uiIntroPhase; - uiIntroTimer = 3.5*IN_MILISECONDS; + uiIntroTimer = 3.5*IN_MILLISECONDS; break; case 2: DoScriptText(SAY_DIALOG_WITH_ARTHAS_2, me); ++uiIntroPhase; - uiIntroTimer = 3.5*IN_MILISECONDS; + uiIntroTimer = 3.5*IN_MILLISECONDS; break; case 3: DoScriptText(SAY_DIALOG_OF_ARTHAS_2, pArthas); ++uiIntroPhase; - uiIntroTimer = 3.5*IN_MILISECONDS; + uiIntroTimer = 3.5*IN_MILLISECONDS; break; case 4: DoScriptText(SAY_DIALOG_WITH_ARTHAS_3, me); DoCast(me, SPELL_SVALA_TRANSFORMING1); ++uiIntroPhase; - uiIntroTimer = 2.8*IN_MILISECONDS; + uiIntroTimer = 2.8*IN_MILLISECONDS; break; case 5: DoCast(me, SPELL_SVALA_TRANSFORMING2); @@ -178,7 +179,7 @@ struct boss_svalaAI : public ScriptedAI uiIntroTimer = 200; break; case 6: - if (Creature* pSvalaSorrowgrave = me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILISECONDS)) + if (Creature* pSvalaSorrowgrave = me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS)) { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); me->SetDisplayId(DATA_SVALA_DISPLAY_ID); @@ -243,10 +244,10 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI void Reset() { - uiSinsterStrikeTimer = 7*IN_MILISECONDS; - uiCallFlamesTimer = 10*IN_MILISECONDS; - uiRitualOfSwordTimer = 20*IN_MILISECONDS; - uiSacrificeTimer = 8*IN_MILISECONDS; + uiSinsterStrikeTimer = 7*IN_MILLISECONDS; + uiCallFlamesTimer = 10*IN_MILLISECONDS; + uiRitualOfSwordTimer = 20*IN_MILLISECONDS; + uiSacrificeTimer = 8*IN_MILLISECONDS; bSacrificed = false; @@ -293,7 +294,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI if (uiSinsterStrikeTimer <= diff) { DoCast(me->getVictim(), SPELL_SINSTER_STRIKE); - uiSinsterStrikeTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS); + uiSinsterStrikeTimer = urand(5*IN_MILLISECONDS,9*IN_MILLISECONDS); } else uiSinsterStrikeTimer -= diff; if (uiCallFlamesTimer <= diff) @@ -301,7 +302,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) { DoCast(pTarget, SPELL_CALL_FLAMES); - uiCallFlamesTimer = urand(8*IN_MILISECONDS,12*IN_MILISECONDS); + uiCallFlamesTimer = urand(8*IN_MILLISECONDS,12*IN_MILLISECONDS); } } else uiCallFlamesTimer -= diff; @@ -347,7 +348,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) me->GetMotionMaster()->MoveChase(pTarget); - uiSacrificeTimer = 8*IN_MILISECONDS; + uiSacrificeTimer = 8*IN_MILLISECONDS; } else uiSacrificeTimer -= diff; } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index 1a650f94101..62d297396ac 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + /* Script Data Start SDName: Boss ymiron SDAuthor: LordVanMartin @@ -9,7 +26,7 @@ Script Data End */ /*** SQL START *** update creature_template set scriptname = 'boss_ymiron' where entry = ''; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "utgarde_pinnacle.h" enum Spells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp index cf042867707..dbbd7b058f2 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp @@ -1,4 +1,21 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "utgarde_pinnacle.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h index a51d7aceda0..4592cb2f335 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + #ifndef DEF_PINNACLE_H #define DEF_PINNACLE_H diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index 11d432e94c6..124a8f0b8b8 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /*** SQL START *** @@ -21,7 +20,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_archavon' WHERE `entry`='31125 UPDATE `creature_template` SET `ScriptName`='mob_archavon_warder' WHERE `entry`='32353'; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "vault_of_archavon.h" #define EMOTE_BERSERK -1590002 diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp index 92a0331708e..6757d28a208 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "vault_of_archavon.h" //Emalon spells diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index 61843647136..f8bc8295f21 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /*** SQL START *** @@ -21,7 +20,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_koralon' WHERE `entry`='35013' UPDATE `creature_template` SET `ScriptName`='mob_flame_warder' WHERE `entry`='35143'; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "vault_of_archavon.h" enum Events diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp index 2e16f9211d2..eddf62700fe 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /*** SQL START *** @@ -23,7 +22,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_frozen_orb_stalker' WHERE `entr UPDATE `creature_template` SET `ScriptName`='mob_frozen_orb' WHERE `entry`='38456'; *** SQL END ***/ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "vault_of_archavon.h" // Spells Toravon diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp index a7183921cce..e7449acafb4 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp @@ -1,4 +1,21 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "vault_of_archavon.h" #define ENCOUNTERS 4 diff --git a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h index 6aa642ff701..1885235359e 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h +++ b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + #ifndef DEF_ARCHAVON_H #define DEF_ARCHAVON_H diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp index 589e69a6f18..8e760ba00c6 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp @@ -1,15 +1,21 @@ -/* Script Data Start -SDName: Boss cyanigosa -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = '' where entry = ''; -*** SQL END ***/ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "violet_hold.h" enum Spells @@ -68,7 +74,6 @@ struct boss_cyanigosaAI : public ScriptedAI void EnterCombat(Unit* /*who*/) { DoScriptText(SAY_AGGRO, me); - DoCast(me, SPELL_TRANSFORM); if (pInstance) pInstance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS); diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp index a9cc7393af4..d25f87ca230 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp @@ -1,15 +1,21 @@ -/* Script Data Start -SDName: Boss erekem -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = '' where entry = ''; -*** SQL END ***/ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp index a28bfdffb7c..fe216d8db4e 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp @@ -1,28 +1,21 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -/* Script Data Start -SDName: Boss ichoron -SDAuthor: ckegg -SD%Complete: 80% -SDComment: TODO: better spawn location for adds -SDCategory: -Script Data End */ - -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "violet_hold.h" enum Spells @@ -298,15 +291,23 @@ struct boss_ichoronAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->SetSpeed(MOVE_RUN, 0.3f); - pSummoned->GetMotionMaster()->MoveFollow(me, 0, 0); - m_waterElements.push_back(pSummoned->GetGUID()); + if (pSummoned) + { + pSummoned->SetSpeed(MOVE_RUN, 0.3f); + pSummoned->GetMotionMaster()->MoveFollow(me, 0, 0); + m_waterElements.push_back(pSummoned->GetGUID()); + pInstance->SetData64(DATA_ADD_TRASH_MOB,pSummoned->GetGUID()); + } } void SummonedCreatureDespawn(Creature *pSummoned) { - m_waterElements.remove(pSummoned->GetGUID()); + if (pSummoned) + { + m_waterElements.remove(pSummoned->GetGUID()); + pInstance->SetData64(DATA_DEL_TRASH_MOB,pSummoned->GetGUID()); + } } void KilledUnit(Unit * victim) diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp index d8cd3a4962f..7a86fedf849 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp @@ -1,15 +1,21 @@ -/* Script Data Start -SDName: Boss lavanthor -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = '' where entry = ''; -*** SQL END ***/ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp index 6d283c7bfb4..0abcbbf720c 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp @@ -1,15 +1,21 @@ -/* Script Data Start -SDName: Boss moragg -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = '' where entry = ''; -*** SQL END ***/ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "violet_hold.h" //Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index 2633705c1b7..8fb3f200852 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -1,27 +1,21 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ -/* Script Data Start -SDName: Boss xevozz -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index da75ed94fc2..ebe703aae38 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -1,11 +1,21 @@ -/* Script Data Start -SDName: Boss zuramat -SD%Complete: -SDComment: The phasemask for the voids dosen't work. -SDCategory: -Script Data End */ - -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 781511f940b..80051ace614 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -1,4 +1,21 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" #include "violet_hold.h" #define MAX_ENCOUNTER 3 @@ -32,14 +49,58 @@ enum GameObjects GO_ACTIVATION_CRYSTAL = 193611 }; +enum AzureSaboteurSpells +{ + SABOTEUR_SHIELD_DISRUPTION = 58291, + SABOTEUR_SHIELD_EFFECT = 45775 +}; + +enum CrystalSpells +{ + SPELL_ARCANE_LIGHTNING = 57912 +}; + +enum Events +{ + EVENT_ACTIVATE_CRYSTAL = 20001 +}; + const Position PortalLocation[] = { - {1936.07, 803.198, 53.3749, 3.12414}, - {1877.51, 850.104, 44.6599, 4.7822 }, - {1890.64, 753.471, 48.7224, 1.71042}, - {1908.31, 809.657, 38.7037, 3.08701}, - {1918.37, 853.437, 47.1624, 4.12294}, - {1927.61, 758.436, 51.4533, 2.20891} + {1877.51, 850.104, 44.6599, 4.7822 }, // WP 1 + {1918.37, 853.437, 47.1624, 4.12294}, // WP 2 + {1936.07, 803.198, 53.3749, 3.12414}, // WP 3 + {1927.61, 758.436, 51.4533, 2.20891}, // WP 4 + {1890.64, 753.471, 48.7224, 1.71042}, // WP 5 + {1908.31, 809.657, 38.7037, 3.08701} // WP 6 +}; + +const Position BossStartMove1 = {1894.684448, 739.390503, 47.668003}; +const Position BossStartMove2 = {1875.173950, 860.832703, 43.333565}; +const Position BossStartMove21 = {1858.854614, 855.071411, 43.333565}; +const Position BossStartMove22 = {1891.926636, 863.388977, 43.333565}; +const Position BossStartMove3 = {1916.138062, 778.152222, 35.772308}; +const Position BossStartMove4 = {1853.618286, 758.557617, 38.657505}; +const Position BossStartMove5 = {1906.683960, 842.348022, 38.637459}; +const Position BossStartMove6 = {1928.207031, 852.864441, 47.200813}; + +const Position CyanigosasSpawnLocation = {1930.281250, 804.407715, 52.410946, 3.139621}; +const Position MiddleRoomLocation = {1892.291260, 805.696838, 38.438862, 3.139621}; +const Position MiddleRoomPortalSaboLocation = {1896.622925, 804.854126, 38.504772, 3.139621}; + +//Cyanigosa's prefight event data +enum Yells +{ + CYANIGOSA_SAY_SPAWN = -1608005 +}; +enum Spells +{ + CYANIGOSA_SPELL_TRANSFORM = 58668, + CYANIGOSA_BLUE_AURA = 47759, +}; +enum Achievements +{ + ACHIEV_DEFENSELESS = 1816 }; struct instance_violet_hold : public ScriptedInstance @@ -65,10 +126,16 @@ struct instance_violet_hold : public ScriptedInstance uint64 uiXevozzCell; uint64 uiZuramatCell; uint64 uiMainDoor; + uint64 uiTeleportationPortal; + uint64 uiSaboteurPortal; uint64 uiActivationCrystal[3]; uint32 uiActivationTimer; + uint32 uiCyanigosaEventTimer; + uint32 uiDoorSpellTimer; + + std::set<uint64> trashMobs; // to kill with crystal uint8 uiWaveCount; uint8 uiLocation; @@ -76,12 +143,20 @@ struct instance_violet_hold : public ScriptedInstance uint8 uiSecondBoss; uint8 uiRemoveNpc; + uint8 uiDoorIntegrity; + uint8 m_auiEncounter[MAX_ENCOUNTER]; uint8 uiCountErekemGuards; uint8 uiCountActivationCrystals; + uint8 uiCyanigosaEventPhase; + uint8 uiMainEventPhase; // SPECIAL: pre event animations, IN_PROGRESS: event itself bool bActive; bool bWiped; + bool bIsDoorSpellCasted; + bool bCrystalActivated; + + std::list<uint8> NpcAtDoorCastingList; std::string str_data; @@ -105,19 +180,30 @@ struct instance_violet_hold : public ScriptedInstance uiXevozzCell = 0; uiZuramatCell = 0; uiMainDoor = 0; + uiTeleportationPortal = 0; + uiSaboteurPortal = 0; + + trashMobs.clear(); + uiRemoveNpc = 0; + uiDoorIntegrity = 100; + uiWaveCount = 0; uiLocation = urand(0,5); uiFirstBoss = 0; uiSecondBoss = 0; uiCountErekemGuards = 0; uiCountActivationCrystals = 0; + uiCyanigosaEventPhase = 1; uiActivationTimer = 5000; + uiDoorSpellTimer = 2000; + uiCyanigosaEventTimer = 3*IN_MILLISECONDS; bActive = false; - bWiped = false; + bIsDoorSpellCasted = false; + bCrystalActivated = false; memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } @@ -161,6 +247,7 @@ struct instance_violet_hold : public ScriptedInstance break; case CREATURE_CYANIGOSA: uiCyanigosa = pCreature->GetGUID(); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); break; case CREATURE_SINCLARI: uiSinclari = pCreature->GetGUID(); @@ -231,8 +318,11 @@ struct instance_violet_hold : public ScriptedInstance if (data == DONE) { SaveToDB(); + uiMainEventPhase = DONE; if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) pMainDoor->SetGoState(GO_STATE_ACTIVE); + if (!bCrystalActivated && uiDoorIntegrity == 100) + DoCompleteAchievement(ACHIEV_DEFENSELESS); } break; case DATA_WAVE_COUNT: @@ -242,6 +332,75 @@ struct instance_violet_hold : public ScriptedInstance case DATA_REMOVE_NPC: uiRemoveNpc = data; break; + case DATA_PORTAL_LOCATION: + uiLocation = (uint8)data; + break; + case DATA_DOOR_INTEGRITY: + uiDoorIntegrity = data; + DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, uiDoorIntegrity); + break; + case DATA_NPC_PRESENCE_AT_DOOR_ADD: + NpcAtDoorCastingList.push_back(data); + break; + case DATA_NPC_PRESENCE_AT_DOOR_REMOVE: + if(!NpcAtDoorCastingList.empty()) + NpcAtDoorCastingList.pop_back(); + break; + case DATA_MAIN_DOOR: + if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) + { + switch(data) + { + case GO_STATE_ACTIVE: + pMainDoor->SetGoState(GO_STATE_ACTIVE); + break; + case GO_STATE_READY: + pMainDoor->SetGoState(GO_STATE_READY); + break; + case GO_STATE_ACTIVE_ALTERNATIVE: + pMainDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + break; + } + } + break; + case DATA_START_BOSS_ENCOUNTER: + switch(uiWaveCount) + { + case 6: + StartBossEncounter(uiFirstBoss); + break; + case 12: + StartBossEncounter(uiSecondBoss); + break; + } + break; + case DATA_ACTIVATE_CRYSTAL: + ActivateCrystal(); + break; + case DATA_MAIN_EVENT_PHASE: + uiMainEventPhase = data; + if (data == IN_PROGRESS) // Start event + { + if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) + pMainDoor->SetGoState(GO_STATE_READY); + uiWaveCount = 1; + bActive = true; + uiRemoveNpc = 0; // might not have been reset after a wipe on a boss. + } + break; + } + } + + void SetData64(uint32 type, uint64 data) + { + switch(type) + { + case DATA_ADD_TRASH_MOB: + trashMobs.insert(data); + break; + case DATA_DEL_TRASH_MOB: + trashMobs.erase(data); + break; } } @@ -254,6 +413,42 @@ struct instance_violet_hold : public ScriptedInstance case DATA_CYANIGOSA_EVENT: return m_auiEncounter[2]; case DATA_WAVE_COUNT: return uiWaveCount; case DATA_REMOVE_NPC: return uiRemoveNpc; + case DATA_PORTAL_LOCATION: return uiLocation; + case DATA_DOOR_INTEGRITY: return uiDoorIntegrity; + case DATA_NPC_PRESENCE_AT_DOOR: return NpcAtDoorCastingList.size(); + case DATA_FIRST_BOSS: return uiFirstBoss; + case DATA_SECOND_BOSS: return uiSecondBoss; + case DATA_MAIN_EVENT_PHASE: return uiMainEventPhase; + } + + return 0; + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_MORAGG: return uiMoragg; + case DATA_EREKEM: return uiErekem; + case DATA_EREKEM_GUARD_1: return uiErekemGuard[0]; + case DATA_EREKEM_GUARD_2: return uiErekemGuard[1]; + case DATA_ICHORON: return uiIchoron; + case DATA_LAVANTHOR: return uiLavanthor; + case DATA_XEVOZZ: return uiXevozz; + case DATA_ZURAMAT: return uiZuramat; + case DATA_CYANIGOSA: return uiCyanigosa; + case DATA_MORAGG_CELL: return uiMoraggCell; + case DATA_EREKEM_CELL: return uiErekemCell; + case DATA_EREKEM_RIGHT_GUARD_CELL: return uiErekemRightGuardCell; + case DATA_EREKEM_LEFT_GUARD_CELL: return uiErekemLeftGuardCell; + case DATA_ICHORON_CELL: return uiIchoronCell; + case DATA_LAVANTHOR_CELL: return uiLavanthorCell; + case DATA_XEVOZZ_CELL: return uiXevozzCell; + case DATA_ZURAMAT_CELL: return uiZuramatCell; + case DATA_MAIN_DOOR: return uiMainDoor; + case DATA_SINCLARI: return uiSinclari; + case DATA_TELEPORTATION_PORTAL: return uiTeleportationPortal; + case DATA_SABOTEUR_PORTAL: return uiSaboteurPortal; } return 0; @@ -261,9 +456,10 @@ struct instance_violet_hold : public ScriptedInstance void SpawnPortal() { + SetData(DATA_PORTAL_LOCATION, (GetData(DATA_PORTAL_LOCATION) + urand(1,5))%6); if (Creature *pSinclari = instance->GetCreature(uiSinclari)) - if (Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL,PortalLocation[uiLocation],TEMPSUMMON_CORPSE_DESPAWN)) - uiLocation = (uiLocation+urand(1,5))%6; + if(Creature *portal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL,PortalLocation[GetData(DATA_PORTAL_LOCATION)],TEMPSUMMON_CORPSE_DESPAWN)) + uiTeleportationPortal = portal->GetGUID(); } void StartBossEncounter(uint8 uiBoss, bool bForceRespawn = true) @@ -276,7 +472,7 @@ struct instance_violet_hold : public ScriptedInstance HandleGameObject(uiMoraggCell,bForceRespawn); pBoss = instance->GetCreature(uiMoragg); if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->GetMotionMaster()->MovePoint(0, BossStartMove1); break; case BOSS_EREKEM: HandleGameObject(uiErekemCell, bForceRespawn); @@ -284,8 +480,9 @@ struct instance_violet_hold : public ScriptedInstance HandleGameObject(uiErekemLeftGuardCell, bForceRespawn); pBoss = instance->GetCreature(uiErekem); + if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->GetMotionMaster()->MovePoint(0, BossStartMove2); if (Creature* pGuard1 = instance->GetCreature(uiErekemGuard[0])) { @@ -293,6 +490,7 @@ struct instance_violet_hold : public ScriptedInstance pGuard1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); else pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard1->GetMotionMaster()->MovePoint(0, BossStartMove21); } if (Creature* pGuard2 = instance->GetCreature(uiErekemGuard[1])) @@ -301,45 +499,52 @@ struct instance_violet_hold : public ScriptedInstance pGuard2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); else pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pGuard2->GetMotionMaster()->MovePoint(0, BossStartMove22); } break; case BOSS_ICHORON: HandleGameObject(uiIchoronCell,bForceRespawn); pBoss = instance->GetCreature(uiIchoron); if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->GetMotionMaster()->MovePoint(0, BossStartMove3); break; case BOSS_LAVANTHOR: HandleGameObject(uiLavanthorCell,bForceRespawn); pBoss = instance->GetCreature(uiLavanthor); if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->GetMotionMaster()->MovePoint(0, BossStartMove4); break; case BOSS_XEVOZZ: HandleGameObject(uiXevozzCell,bForceRespawn); pBoss = instance->GetCreature(uiXevozz); if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->GetMotionMaster()->MovePoint(0, BossStartMove5); break; case BOSS_ZURAMAT: HandleGameObject(uiZuramatCell,bForceRespawn); pBoss = instance->GetCreature(uiZuramat); if (pBoss) - pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->GetMotionMaster()->MovePoint(0, BossStartMove6); break; } - if (!bForceRespawn && pBoss) + // generic boss state changes + if (pBoss) { - if (pBoss->isDead()) + pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pBoss->SetReactState(REACT_AGGRESSIVE); + + if (!bForceRespawn) { - // respawn but avoid to be looted again - pBoss->Respawn(); - pBoss->RemoveLootMode(1); + if (pBoss->isDead()) + { + // respawn but avoid to be looted again + pBoss->Respawn(); + pBoss->RemoveLootMode(1); + } + pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + uiWaveCount = 0; } - pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); - SetData(DATA_WAVE_COUNT,0); - uiWaveCount = 0; } } @@ -347,14 +552,19 @@ struct instance_violet_hold : public ScriptedInstance { DoUpdateWorldState(WORLD_STATE_VH, 1); DoUpdateWorldState(WORLD_STATE_VH_WAVE_COUNT, uiWaveCount); - DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, 100); // TODO switch(uiWaveCount) { case 6: if (uiFirstBoss == 0) uiFirstBoss = urand(1,6); - StartBossEncounter(uiFirstBoss); + if (Creature *pSinclari = instance->GetCreature(uiSinclari)) + { + if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN)) + uiSaboteurPortal = pPortal->GetGUID(); + if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN)) + pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false); + } break; case 12: if (uiSecondBoss == 0) @@ -362,56 +572,33 @@ struct instance_violet_hold : public ScriptedInstance { uiSecondBoss = urand(1,6); } while (uiSecondBoss == uiFirstBoss); - StartBossEncounter(uiSecondBoss); + if (Creature *pSinclari = instance->GetCreature(uiSinclari)) + { + if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN)) + uiSaboteurPortal = pPortal->GetGUID(); + if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN)) + pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false); + } break; case 18: { Creature *pSinclari = instance->GetCreature(uiSinclari); if (pSinclari) - pSinclari->SummonCreature(CREATURE_CYANIGOSA,PortalLocation[0],TEMPSUMMON_DEAD_DESPAWN); + pSinclari->SummonCreature(CREATURE_CYANIGOSA,CyanigosasSpawnLocation,TEMPSUMMON_DEAD_DESPAWN); break; } case 1: { if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) pMainDoor->SetGoState(GO_STATE_READY); + DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, 100); } default: - if (!bWiped) - SpawnPortal(); - bWiped = false; + SpawnPortal(); break; } } - uint64 GetData64(uint32 identifier) - { - switch(identifier) - { - case DATA_MORAGG: return uiMoragg; - case DATA_EREKEM: return uiErekem; - case DATA_EREKEM_GUARD_1: return uiErekemGuard[0]; - case DATA_EREKEM_GUARD_2: return uiErekemGuard[1]; - case DATA_ICHORON: return uiIchoron; - case DATA_LAVANTHOR: return uiLavanthor; - case DATA_XEVOZZ: return uiXevozz; - case DATA_ZURAMAT: return uiZuramat; - case DATA_CYANIGOSA: return uiCyanigosa; - case DATA_MORAGG_CELL: return uiMoraggCell; - case DATA_EREKEM_CELL: return uiErekemCell; - case DATA_EREKEM_RIGHT_GUARD_CELL: return uiErekemRightGuardCell; - case DATA_EREKEM_LEFT_GUARD_CELL: return uiErekemLeftGuardCell; - case DATA_ICHORON_CELL: return uiIchoronCell; - case DATA_LAVANTHOR_CELL: return uiLavanthorCell; - case DATA_XEVOZZ_CELL: return uiXevozzCell; - case DATA_ZURAMAT_CELL: return uiZuramatCell; - case DATA_MAIN_DOOR: return uiMainDoor; - case DATA_SINCLARI: return uiSinclari; - } - - return 0; - } - std::string GetSaveData() { OUT_SAVE_INST_DATA; @@ -483,7 +670,8 @@ struct instance_violet_hold : public ScriptedInstance if (!instance->HavePlayers()) return; - if (bActive) + // portals should spawn if other portal is dead and doors are closed + if (bActive && uiMainEventPhase == IN_PROGRESS) { if (uiActivationTimer < diff) { @@ -493,24 +681,118 @@ struct instance_violet_hold : public ScriptedInstance } else uiActivationTimer -= diff; } - if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) - if (pMainDoor->GetGoState() != GO_STATE_ACTIVE && CheckWipe()) + // if main event is in progress and players have wiped then reset instance + if ( uiMainEventPhase == IN_PROGRESS && CheckWipe()) + { + SetData(DATA_REMOVE_NPC, 1); + StartBossEncounter(uiFirstBoss, false); + StartBossEncounter(uiSecondBoss, false); + + SetData(DATA_MAIN_DOOR,GO_STATE_ACTIVE); + SetData(DATA_WAVE_COUNT, 0); + uiMainEventPhase = NOT_STARTED; + + if (Creature* pSinclari = instance->GetCreature(uiSinclari)) + { + pSinclari->SetVisibility(VISIBILITY_ON); + + std::list<Creature*> GuardList; + pSinclari->GetCreatureListWithEntryInGrid(GuardList, NPC_VIOLET_HOLD_GUARD, 40.0f); + if (!GuardList.empty()) + { + for (std::list<Creature*>::const_iterator itr = GuardList.begin(); itr != GuardList.end(); ++itr) + { + if (Creature* pGuard = *itr) + { + pGuard->SetVisibility(VISIBILITY_ON); + pGuard->SetReactState(REACT_AGGRESSIVE); + pGuard->GetMotionMaster()->MovePoint(1,pGuard->GetHomePosition()); + } + } + } + pSinclari->GetMotionMaster()->MovePoint(1,pSinclari->GetHomePosition()); + pSinclari->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE); + } + } + + // Cyanigosa is spawned but not tranformed, prefight event + Creature *pCyanigosa = instance->GetCreature(uiCyanigosa); + if (pCyanigosa && !pCyanigosa->HasAura(CYANIGOSA_SPELL_TRANSFORM)) + { + if (uiCyanigosaEventTimer <= diff) { - SetData(DATA_REMOVE_NPC, 1); - StartBossEncounter(uiFirstBoss, false); - StartBossEncounter(uiSecondBoss, false); - bWiped = true; - if (Creature* pSinclari = instance->GetCreature(uiSinclari)) + switch(uiCyanigosaEventPhase) { - pSinclari->DisappearAndDie(); - pSinclari->Respawn(true); + case 1: + pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_BLUE_AURA, false); + DoScriptText(CYANIGOSA_SAY_SPAWN, pCyanigosa); + uiCyanigosaEventTimer = 7*IN_MILLISECONDS; + ++uiCyanigosaEventPhase; + break; + case 2: + pCyanigosa->GetMotionMaster()->MoveJump(MiddleRoomLocation.GetPositionX(), MiddleRoomLocation.GetPositionY(), MiddleRoomLocation.GetPositionZ(), 10.0f, 20.0f); + pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_BLUE_AURA, false); + uiCyanigosaEventTimer = 7*IN_MILLISECONDS; + ++uiCyanigosaEventPhase; + break; + case 3: + pCyanigosa->RemoveAurasDueToSpell(CYANIGOSA_BLUE_AURA); + pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_SPELL_TRANSFORM, 0); + pCyanigosa->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE); + pCyanigosa->SetReactState(REACT_AGGRESSIVE); + uiCyanigosaEventTimer = 2*IN_MILLISECONDS; + ++uiCyanigosaEventPhase; + break; + case 4: + uiCyanigosaEventPhase = 0; + break; } + } else uiCyanigosaEventTimer -= diff; + } - if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) - pMainDoor->SetGoState(GO_STATE_ACTIVE); - SetData(DATA_WAVE_COUNT, 0); + // if there are NPCs in front of the prison door, which are casting the door seal spell and doors are active + if (GetData(DATA_NPC_PRESENCE_AT_DOOR) && uiMainEventPhase == IN_PROGRESS) + { + // if door integrity is > 0 then decrase it's integrity state + if(GetData(DATA_DOOR_INTEGRITY)) + { + if(uiDoorSpellTimer < diff) + { + SetData(DATA_DOOR_INTEGRITY,GetData(DATA_DOOR_INTEGRITY)-1); + uiDoorSpellTimer =2000; + } else uiDoorSpellTimer -= diff; + } + // else set door state to active (means door will open and group have failed to sustain mob invasion on the door) + else + { + SetData(DATA_MAIN_DOOR,GO_STATE_ACTIVE); + uiMainEventPhase = FAIL; } + } } + + void ActivateCrystal() + { + // Kill all mobs registered with SetData64(ADD_TRASH_MOB) + // TODO: All visual, spells etc + for (std::set<uint64>::const_iterator itr = trashMobs.begin(); itr != trashMobs.end(); ++itr) + { + Creature* pCreature = instance->GetCreature(*itr); + if (pCreature && pCreature->isAlive()) + pCreature->CastSpell(pCreature,SPELL_ARCANE_LIGHTNING,true); // Who should cast the spell? + } + } + + void ProcessEvent(GameObject* pGO, uint32 uiEventId) + { + switch(uiEventId) + { + case EVENT_ACTIVATE_CRYSTAL: + bCrystalActivated = true; // Activation by player's will throw event signal + ActivateCrystal(); + break; + } +} }; InstanceData* GetInstanceData_instance_violet_hold(Map* pMap) diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 49883b5dbf3..1267ede8be6 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -1,36 +1,252 @@ -#include "ScriptedPch.h" +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" +#include "ScriptedEscortAI.h" #include "violet_hold.h" #define GOSSIP_START_EVENT "Get your people to safety, we'll keep the Blue Dragonflight's forces at bay." #define GOSSIP_ITEM_1 "Activate the crystals when we get in trouble, right" +#define GOSSIP_I_WANT_IN "Sorry, I'm late! Can I get in to help my friends?" #define SPAWN_TIME 20000 enum PortalCreatures { - CREATURE_AZURE_INVADER = 30661, - CREATURE_AZURE_SPELLBREAKER = 30662, - CREATURE_AZURE_BINDER = 30663, - CREATURE_AZURE_MAGE_SLAYER = 30664, + CREATURE_AZURE_INVADER_1 = 30661, + CREATURE_AZURE_INVADER_2 = 30961, + CREATURE_AZURE_SPELLBREAKER_1 = 30662, + CREATURE_AZURE_SPELLBREAKER_2 = 30962, + CREATURE_AZURE_BINDER_1 = 30663, + CREATURE_AZURE_BINDER_2 = 30918, + CREATURE_AZURE_MAGE_SLAYER_1 = 30664, + CREATURE_AZURE_MAGE_SLAYER_2 = 30963, CREATURE_AZURE_CAPTAIN = 30666, CREATURE_AZURE_SORCEROR = 30667, CREATURE_AZURE_RAIDER = 30668, CREATURE_AZURE_STALKER = 32191 }; +enum AzureInvaderSpells +{ + SPELL_CLEAVE = 15496, + SPELL_IMPALE = 58459, + H_SPELL_IMPALE = 59256, + SPELL_BRUTAL_STRIKE = 58460, + SPELL_SUNDER_ARMOR = 58461 +}; + +enum AzureSellbreakerSpells +{ + SPELL_ARCANE_BLAST = 58462, + H_SPELL_ARCANE_BLAST = 59257, + SPELL_SLOW = 25603, + SPELL_CHAINS_OF_ICE = 58464, + SPELL_CONE_OF_COLD = 58463, + H_SPELL_CONE_OF_COLD = 59258 +}; + +enum AzureBinderSpells +{ + SPELL_ARCANE_BARRAGE = 58456, + H_SPELL_ARCANE_BARRAGE = 59248, + SPELL_ARCANE_EXPLOSION = 58455, + H_SPELL_ARCANE_EXPLOSION = 59245, + SPELL_FROST_NOVA = 58458, + H_SPELL_FROST_NOVA = 59253, + SPELL_FROSTBOLT = 58457, + H_SPELL_FROSTBOLT = 59251, +}; + +enum AzureMageSlayerSpells +{ + SPELL_ARCANE_EMPOWERMENT = 58469, + SPELL_SPELL_LOCK = 30849 +}; + +enum AzureCaptainSpells +{ + SPELL_MORTAL_STRIKE = 32736, + SPELL_WHIRLWIND_OF_STEEL = 41057 +}; + +enum AzureSorcerorSpells +{ + SPELL_ARCANE_STREAM = 60181, + H_SPELL_ARCANE_STREAM = 60204, + SPELL_MANA_DETONATION = 60182, + H_SPELL_MANA_DETONATION = 60205 +}; + +enum AzureRaiderSpells +{ + SPELL_CONCUSSION_BLOW = 52719, + SPELL_MAGIC_REFLECTION = 60158 +}; + +enum AzureStalkerSpells +{ + SPELL_BACKSTAB = 58471, + SPELL_TACTICAL_BLINK = 58470 +}; + +enum AzureSaboteurSpells +{ + SABOTEUR_SHIELD_DISRUPTION = 58291, + SABOTEUR_SHIELD_EFFECT = 45775 +}; + +enum TrashDoorSpell +{ + SPELL_DESTROY_DOOR_SEAL = 58040 +}; + enum Spells { - SPELL_PORTAL_CHANNEL = 58012 + SPELL_PORTAL_CHANNEL = 58012, + SPELL_CRYSTALL_ACTIVATION = 57804 }; enum eSinclari { - NPC_VIOLET_HOLD_GUARD = 30659, + SAY_SINCLARI_1 = -1608045 +}; + +float FirstPortalWPs [6][3] = +{ + {1877.670288, 842.280273, 43.333591}, + {1877.338867, 834.615356, 38.762287}, + {1872.161011, 823.854309, 38.645401}, + {1864.860474, 815.787170, 38.784843}, + {1858.953735, 810.048950, 44.008759}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; + +float SecondPortalFirstWPs [9][3] = +{ + {1902.561401, 853.334656, 47.106117}, + {1895.486084, 855.376404, 44.334591}, + {1882.805176, 854.993286, 43.333591}, + {1877.670288, 842.280273, 43.333591}, + {1877.338867, 834.615356, 38.762287}, + {1872.161011, 823.854309, 38.645401}, + {1864.860474, 815.787170, 38.784843}, + {1858.953735, 810.048950, 44.008759}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; - SAY_SINCLARI_1 = -1608045, +float SecondPortalSecondWPs [8][3] = +{ + {1929.392212, 837.614990, 47.136166}, + {1928.290649, 824.750427, 45.474411}, + {1915.544922, 826.919373, 38.642811}, + {1900.933960, 818.855652, 38.801647}, + {1886.810547, 813.536621, 38.490490}, + {1869.079712, 808.701538, 38.689003}, + {1860.843384, 806.645020, 44.008789}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; + +float ThirdPortalWPs [8][3] = +{ + {1934.049438, 815.778503, 52.408699}, + {1928.290649, 824.750427, 45.474411}, + {1915.544922, 826.919373, 38.642811}, + {1900.933960, 818.855652, 38.801647}, + {1886.810547, 813.536621, 38.490490}, + {1869.079712, 808.701538, 38.689003}, + {1860.843384, 806.645020, 44.008789}, + {1843.707153, 805.807739, 44.135197} + //{1825.736084, 807.305847, 44.363785} +}; + +float FourthPortalWPs [9][3] = +{ + {1921.658447, 761.657043, 50.866741}, + {1910.559814, 755.780457, 47.701447}, + {1896.664673, 752.920898, 47.667004}, + {1887.398804, 763.633240, 47.666851}, + {1879.020386, 775.396973, 38.705990}, + {1872.439087, 782.568604, 38.808292}, + {1863.573364, 791.173584, 38.743660}, + {1857.811890, 796.765564, 43.950329}, + {1845.577759, 800.681152, 44.104248} + //{1827.100342, 801.605957, 44.363358} +}; + +float FifthPortalWPs [6][3] = +{ + {1887.398804, 763.633240, 47.666851}, + {1879.020386, 775.396973, 38.705990}, + {1872.439087, 782.568604, 38.808292}, + {1863.573364, 791.173584, 38.743660}, + {1857.811890, 796.765564, 43.950329}, + {1845.577759, 800.681152, 44.104248} + //{1827.100342, 801.605957, 44.363358} +}; + +float SixthPoralWPs [4][3] = +{ + {1888.861084, 805.074768, 38.375790}, + {1869.793823, 804.135804, 38.647018}, + {1861.541504, 804.149780, 43.968292}, + {1843.567017, 804.288208, 44.139091} + //{1826.889648, 803.929993, 44.363239} +}; + +const float SaboteurFinalPos1[3][3] = +{ + {1892.502319, 777.410767, 38.630402}, + {1891.165161, 762.969421, 47.666920}, + {1893.168091, 740.919189, 47.666920} +}; +const float SaboteurFinalPos2[3][3] = +{ + {1882.242676, 834.818726, 38.646786}, + {1879.220825, 842.224854, 43.333641}, + {1873.842896, 863.892456, 43.333641} +}; +const float SaboteurFinalPos3[2][3] = +{ + {1904.298340, 792.400391, 38.646782}, + {1935.716919, 758.437073, 30.627895} +}; +const float SaboteurFinalPos4[3] = +{ + 1855.006104, 760.641724, 38.655266 +}; +const float SaboteurFinalPos5[3] = +{ + 1906.667358, 841.705566, 38.637894 }; +const float SaboteurFinalPos6[5][3] = +{ + {1911.437012, 821.289246, 38.684128}, + {1920.734009, 822.978027, 41.525414}, + {1928.262939, 830.836609, 44.668266}, + {1929.338989, 837.593933, 47.137596}, + {1931.063354, 848.468445, 47.190434} + }; -const Position DoorPosition = { 1828.300049, 797.309021, 46.135502, 1.48353}; -const Position MovePosition = { 1806.955566, 803.851807, 44.363323}; +const Position MovePosition = {1806.955566, 803.851807, 44.363323}; +const Position playerTeleportPosition = {1830.531006, 803.939758, 44.340508, 6.281611}; +const Position sinclariOutsidePosition = {1817.315674, 804.060608, 44.363998}; struct npc_sinclariAI : public ScriptedAI { @@ -49,7 +265,6 @@ struct npc_sinclariAI : public ScriptedAI uiPhase = 0; uiTimer = 0; - me->SetVisibility(VISIBILITY_ON); me->SetReactState(REACT_AGGRESSIVE); std::list<Creature*> GuardList; @@ -69,22 +284,6 @@ struct npc_sinclariAI : public ScriptedAI } } - void MovementInform(uint32 uiType, uint32 /*uiId*/) - { - if (uiType != POINT_MOTION_TYPE) - return; - - if (pInstance) - { - pInstance->SetData(DATA_WAVE_COUNT,1); - pInstance->SetData(DATA_REMOVE_NPC,0); // might not have been reset after a wipe on a boss. - } - - //She should not be despawned, she will be used by the instance to summon some npcs - me->SetVisibility(VISIBILITY_OFF); - me->SetReactState(REACT_PASSIVE); - } - void UpdateAI(const uint32 uiDiff) { ScriptedAI::UpdateAI(uiDiff); @@ -96,10 +295,10 @@ struct npc_sinclariAI : public ScriptedAI switch(uiPhase) { case 1: - DoScriptText(SAY_SINCLARI_1, me); - uiTimer = 4000; - uiPhase = 2; - break; + DoScriptText(SAY_SINCLARI_1, me); + uiTimer = 4000; + uiPhase = 2; + break; case 2: { std::list<Creature*> GuardList; @@ -135,7 +334,14 @@ struct npc_sinclariAI : public ScriptedAI break; } case 4: - me->GetMotionMaster()->MovePoint(0, MovePosition); + me->GetMotionMaster()->MovePoint(0, sinclariOutsidePosition); + uiTimer = 4000; + uiPhase = 5; + break; + case 5: + if (pInstance) + pInstance->SetData(DATA_MAIN_EVENT_PHASE,IN_PROGRESS); + me->SetReactState(REACT_PASSIVE); uiTimer = 0; uiPhase = 0; break; @@ -158,14 +364,24 @@ CreatureAI* GetAI_npc_sinclari(Creature* pCreature) bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) { - ScriptedInstance* pInstance = pCreature->GetInstanceData(); - if (pInstance && pInstance->GetData(DATA_CYANIGOSA_EVENT) != DONE && pInstance->GetData(DATA_WAVE_COUNT) == 0 && pPlayer) + if (ScriptedInstance* pInstance = pCreature->GetInstanceData()) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_START_EVENT,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID()); - }else - pPlayer->SEND_GOSSIP_MENU(13910, pCreature->GetGUID()); + switch (pInstance->GetData(DATA_MAIN_EVENT_PHASE)) + { + case NOT_STARTED: + case FAIL: // Allow to start event if not started or wiped + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_START_EVENT,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID()); + break; + case IN_PROGRESS: // Allow to teleport inside if event is in progress + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_I_WANT_IN,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID()); + break; + default: + pPlayer->SEND_GOSSIP_MENU(13910, pCreature->GetGUID()); + } + } return true; } @@ -174,73 +390,235 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 /*ui switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - if (pPlayer) - pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CLOSE_GOSSIP_MENU(); CAST_AI(npc_sinclariAI, (pCreature->AI()))->uiPhase = 1; + if (ScriptedInstance *pInstance = pCreature->GetInstanceData()) + pInstance->SetData(DATA_MAIN_EVENT_PHASE,SPECIAL); break; case GOSSIP_ACTION_INFO_DEF+2: pPlayer->SEND_GOSSIP_MENU(13854, pCreature->GetGUID()); break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->NearTeleportTo(playerTeleportPosition.GetPositionX(),playerTeleportPosition.GetPositionY(),playerTeleportPosition.GetPositionZ(),playerTeleportPosition.GetOrientation(),true); + pPlayer->CLOSE_GOSSIP_MENU(); + break; } return true; } +struct mob_azure_saboteurAI : public npc_escortAI +{ + mob_azure_saboteurAI(Creature *c):npc_escortAI(c) + { + pInstance = c->GetInstanceData(); + bHasGotMovingPoints = false; + uiBoss = 0; + Reset(); + } + + ScriptedInstance* pInstance; + bool bHasGotMovingPoints; + uint32 uiBoss; + + void Reset() + { + if (pInstance && !uiBoss) + uiBoss = pInstance->GetData(DATA_WAVE_COUNT) == 6 ? pInstance->GetData(DATA_FIRST_BOSS) : pInstance->GetData(DATA_SECOND_BOSS); + } + + void WaypointReached(uint32 uiWPointId) + { + switch(uiBoss) + { + case 1: + if(uiWPointId == 2) + FinishPointReached(); + break; + case 2: + if(uiWPointId == 2) + FinishPointReached(); + break; + case 3: + if(uiWPointId == 1) + FinishPointReached(); + break; + case 4: + if(uiWPointId == 0) + FinishPointReached(); + break; + case 5: + if(uiWPointId == 0) + FinishPointReached(); + break; + case 6: + if(uiWPointId == 4) + FinishPointReached(); + break; + } + } + + void UpdateAI(const uint32 diff) + { + if (pInstance && pInstance->GetData(DATA_MAIN_EVENT_PHASE != IN_PROGRESS)) + me->CastStop(); + + npc_escortAI::UpdateAI(diff); + + if(!bHasGotMovingPoints) + { + bHasGotMovingPoints = true; + switch(uiBoss) + { + case 1: + for(int i=0;i<3;i++) + AddWaypoint(i,SaboteurFinalPos1[i][0],SaboteurFinalPos1[i][1],SaboteurFinalPos1[i][2],0); + me->SetHomePosition(SaboteurFinalPos1[2][0],SaboteurFinalPos1[2][1],SaboteurFinalPos1[2][2],4.762346); + break; + case 2: + for(int i=0;i<3;i++) + AddWaypoint(i,SaboteurFinalPos2[i][0],SaboteurFinalPos2[i][1],SaboteurFinalPos2[i][2],0); + me->SetHomePosition(SaboteurFinalPos2[2][0],SaboteurFinalPos2[2][1],SaboteurFinalPos2[2][2],1.862674); + break; + case 3: + for(int i=0;i<2;i++) + AddWaypoint(i,SaboteurFinalPos3[i][0],SaboteurFinalPos3[i][1],SaboteurFinalPos3[i][2],0); + me->SetHomePosition(SaboteurFinalPos3[1][0],SaboteurFinalPos3[1][1],SaboteurFinalPos3[1][2],5.500638); + break; + case 4: + AddWaypoint(0,SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],0); + me->SetHomePosition(SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],3.991108); + break; + case 5: + AddWaypoint(0,SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],0); + me->SetHomePosition(SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],1.100841); + break; + case 6: + for(int i=0;i<5;i++) + AddWaypoint(i,SaboteurFinalPos6[i][0],SaboteurFinalPos6[i][1],SaboteurFinalPos6[i][2],0); + me->SetHomePosition(SaboteurFinalPos6[4][0],SaboteurFinalPos6[4][1],SaboteurFinalPos6[4][2],0.983031); + break; + } + + SetDespawnAtEnd(false); + Start(true,true); + } + } + + void FinishPointReached() + { + me->CastSpell(me, SABOTEUR_SHIELD_DISRUPTION, false); + me->DisappearAndDie(); + Creature* pSaboPort = Unit::GetCreature((*me),pInstance->GetData64(DATA_SABOTEUR_PORTAL)); + if (pSaboPort) + pSaboPort->DisappearAndDie(); + pInstance->SetData(DATA_START_BOSS_ENCOUNTER, 1); + } +}; + +CreatureAI* GetAI_mob_azure_saboteur(Creature* pCreature) +{ + return new mob_azure_saboteurAI (pCreature); +} + struct npc_teleportation_portalAI : public ScriptedAI { - npc_teleportation_portalAI(Creature *c) : ScriptedAI(c) + npc_teleportation_portalAI(Creature *c) : ScriptedAI(c), listOfMobs(me) { pInstance = c->GetInstanceData(); + uiTypeOfMobsPortal = urand(0,1); // 0 - elite mobs 1 - portal guardian or portal keeper with regular mobs + bPortalGuardianOrKeeperOrEliteSpawn = false; } uint32 uiSpawnTimer; - bool bPortalGuardianOrKeeperSpawn; + bool bPortalGuardianOrKeeperOrEliteSpawn; + uint8 uiTypeOfMobsPortal; + + SummonList listOfMobs; ScriptedInstance *pInstance; void Reset() { uiSpawnTimer = 10000; - bPortalGuardianOrKeeperSpawn = false; + bPortalGuardianOrKeeperOrEliteSpawn = false; } void EnterCombat(Unit * /*who*/) {} + void MoveInLineOfSight(Unit * /*who*/) {} void UpdateAI(const uint32 diff) { - if (pInstance && pInstance->GetData(DATA_REMOVE_NPC) == 1) + if (!pInstance) //Massive usage of pInstance, global check + return; + + if (pInstance->GetData(DATA_REMOVE_NPC) == 1) { me->ForcedDespawn(); pInstance->SetData(DATA_REMOVE_NPC, 0); } - if (uiSpawnTimer <= diff) + uint8 uiWaveCount = pInstance->GetData(DATA_WAVE_COUNT); + if ((uiWaveCount == 6) || (uiWaveCount == 12)) //Don't spawn mobs on boss encounters + return; + + switch(uiTypeOfMobsPortal) { - if (bPortalGuardianOrKeeperSpawn) - { - uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 2 : 3; - for (uint8 i = 0; i < k; ++i) + // spawn elite mobs and then set portals visibility to make it look like it dissapeard + case 0: + if (!bPortalGuardianOrKeeperOrEliteSpawn) { - uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR); - if (Creature* pSummon = DoSummon(entry, me, 2.0f, 30000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT)) - pSummon->GetMotionMaster()->MovePoint(0, DoorPosition); + if (uiSpawnTimer <= diff) + { + bPortalGuardianOrKeeperOrEliteSpawn = true; + uint8 k = uiWaveCount < 12 ? 2 : 3; + for (uint8 i = 0; i < k; ++i) + { + uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR); + DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN); + } + me->SetVisibility(VISIBILITY_OFF); + } else uiSpawnTimer -= diff; } - } - else - { - bPortalGuardianOrKeeperSpawn = true; - uint32 entry = RAND(CREATURE_PORTAL_GUARDIAN, CREATURE_PORTAL_KEEPER); - if (Creature *pPortalKeeper = DoSummon(entry, me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN)) - me->CastSpell(pPortalKeeper, SPELL_PORTAL_CHANNEL, false); - } - uiSpawnTimer = SPAWN_TIME; - } else uiSpawnTimer -= diff; + else + { + // if all spawned elites have died kill portal + if (listOfMobs.empty()) + { + me->Kill(me, false); + me->RemoveCorpse(); + } + } + break; + // spawn portal guardian or portal keeper with regular mobs + case 1: + if (uiSpawnTimer <= diff) + { + if (bPortalGuardianOrKeeperOrEliteSpawn) + { + uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 3 : 4; + for (uint8 i = 0; i < k; ++i) + { + uint32 entry = RAND(CREATURE_AZURE_INVADER_1,CREATURE_AZURE_INVADER_2,CREATURE_AZURE_SPELLBREAKER_1,CREATURE_AZURE_SPELLBREAKER_2,CREATURE_AZURE_MAGE_SLAYER_1,CREATURE_AZURE_MAGE_SLAYER_2,CREATURE_AZURE_BINDER_1,CREATURE_AZURE_BINDER_2); + DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN); + } + } + else + { + bPortalGuardianOrKeeperOrEliteSpawn = true; + uint32 entry = RAND(CREATURE_PORTAL_GUARDIAN, CREATURE_PORTAL_KEEPER); + if (Creature *pPortalKeeper = DoSummon(entry, me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN)) + me->CastSpell(pPortalKeeper, SPELL_PORTAL_CHANNEL, false); + } + uiSpawnTimer = SPAWN_TIME; + } else uiSpawnTimer -= diff; - if (bPortalGuardianOrKeeperSpawn && !me->IsNonMeleeSpellCasted(false)) - { - me->Kill(me, false); - me->RemoveCorpse(); - return; + if (bPortalGuardianOrKeeperOrEliteSpawn && !me->IsNonMeleeSpellCasted(false)) + { + me->Kill(me, false); + me->RemoveCorpse(); + } + break; } } @@ -249,6 +627,20 @@ struct npc_teleportation_portalAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_WAVE_COUNT,pInstance->GetData(DATA_WAVE_COUNT)+1); } + + void JustSummoned(Creature *pSummoned) + { + listOfMobs.Summon(pSummoned); + if (pSummoned) + pInstance->SetData64(DATA_ADD_TRASH_MOB,pSummoned->GetGUID()); + } + + void SummonedMobDied(Creature *pSummoned) + { + listOfMobs.Despawn(pSummoned); + if (pSummoned) + pInstance->SetData64(DATA_DEL_TRASH_MOB,pSummoned->GetGUID()); + } }; CreatureAI* GetAI_npc_teleportation_portal(Creature *pCreature) @@ -256,6 +648,596 @@ CreatureAI* GetAI_npc_teleportation_portal(Creature *pCreature) return new npc_teleportation_portalAI(pCreature); } +struct violet_hold_trashAI : public npc_escortAI +{ + violet_hold_trashAI(Creature *c):npc_escortAI(c) + { + pInstance = c->GetInstanceData(); + bHasGotMovingPoints = false; + if (pInstance) + portalLocationID = pInstance->GetData(DATA_PORTAL_LOCATION); + Reset(); + } + + public: + ScriptedInstance* pInstance; + bool bHasGotMovingPoints; + uint32 portalLocationID; + uint32 secondPortalRouteID; + + void WaypointReached(uint32 uiPointId) + { + switch(portalLocationID) + { + case 0: + if (uiPointId == 5) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 1: + if ((uiPointId == 8 && secondPortalRouteID == 0) || (uiPointId == 7 && secondPortalRouteID == 1)) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 2: + if (uiPointId == 7) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 3: + if (uiPointId == 8) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 4: + if (uiPointId == 5) + CreatureStartAttackDoor(me->GetGUID()); + break; + case 5: + if (uiPointId == 3) + CreatureStartAttackDoor(me->GetGUID()); + break; + } + } + + void UpdateAI(const uint32) + { + if (pInstance && pInstance->GetData(DATA_MAIN_EVENT_PHASE != IN_PROGRESS)) + me->CastStop(); + + if (!bHasGotMovingPoints) + { + bHasGotMovingPoints = true; + switch(portalLocationID) + { + case 0: + for(int i=0;i<6;i++) + AddWaypoint(i,FirstPortalWPs[i][0]+irand(-1,1),FirstPortalWPs[i][1]+irand(-1,1),FirstPortalWPs[i][2]+irand(-1,1),0); + me->SetHomePosition(FirstPortalWPs[5][0],FirstPortalWPs[5][1],FirstPortalWPs[5][2],3.149439); + break; + case 1: + secondPortalRouteID = urand(0,1); + switch(secondPortalRouteID) + { + case 0: + for(int i=0;i<9;i++) + AddWaypoint(i,SecondPortalFirstWPs[i][0]+irand(-1,1),SecondPortalFirstWPs[i][1]+irand(-1,1),SecondPortalFirstWPs[i][2],0); + me->SetHomePosition(SecondPortalFirstWPs[8][0]+irand(-1,1),SecondPortalFirstWPs[8][1]+irand(-1,1),SecondPortalFirstWPs[8][2]+irand(-1,1),3.149439); + break; + case 1: + for(int i=0;i<8;i++) + AddWaypoint(i,SecondPortalSecondWPs[i][0]+irand(-1,1),SecondPortalSecondWPs[i][1]+irand(-1,1),SecondPortalSecondWPs[i][2],0); + me->SetHomePosition(SecondPortalSecondWPs[7][0],SecondPortalSecondWPs[7][1],SecondPortalSecondWPs[7][2],3.149439); + break; + } + break; + case 2: + for(int i=0;i<8;i++) + AddWaypoint(i,ThirdPortalWPs[i][0]+irand(-1,1),ThirdPortalWPs[i][1]+irand(-1,1),ThirdPortalWPs[i][2],0); + me->SetHomePosition(ThirdPortalWPs[7][0],ThirdPortalWPs[7][1],ThirdPortalWPs[7][2],3.149439); + break; + case 3: + for(int i=0;i<9;i++) + AddWaypoint(i,FourthPortalWPs[i][0]+irand(-1,1),FourthPortalWPs[i][1]+irand(-1,1),FourthPortalWPs[i][2],0); + me->SetHomePosition(FourthPortalWPs[8][0],FourthPortalWPs[8][1],FourthPortalWPs[8][2],3.149439); + break; + case 4: + for(int i=0;i<6;i++) + AddWaypoint(i,FifthPortalWPs[i][0]+irand(-1,1),FifthPortalWPs[i][1]+irand(-1,1),FifthPortalWPs[i][2],0); + me->SetHomePosition(FifthPortalWPs[5][0],FifthPortalWPs[5][1],FifthPortalWPs[5][2],3.149439); + break; + case 5: + for(int i=0;i<4;i++) + AddWaypoint(i,SixthPoralWPs[i][0]+irand(-1,1),SixthPoralWPs[i][1]+irand(-1,1),SixthPoralWPs[i][2],0); + me->SetHomePosition(SixthPoralWPs[3][0],SixthPoralWPs[3][1],SixthPoralWPs[3][2],3.149439); + break; + } + SetDespawnAtEnd(false); + Start(true,true); + } + } + + void JustDied(Unit *unit) + { + if (Creature* portal = Unit::GetCreature((*me),pInstance->GetData64(DATA_TELEPORTATION_PORTAL))) + CAST_AI(npc_teleportation_portalAI,portal->AI())->SummonedMobDied(me); + if (pInstance) + pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE,1); + } + + void CreatureStartAttackDoor(uint32 creature_guid) + { + me->SetReactState(REACT_PASSIVE); + DoCast(SPELL_DESTROY_DOOR_SEAL); + if (pInstance) + pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_ADD,1); + } + +}; + +struct mob_azure_invaderAI : public violet_hold_trashAI +{ + mob_azure_invaderAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiCleaveTimer; + uint32 uiImpaleTimer; + uint32 uiBrutalStrikeTimer; + uint32 uiSunderArmorTimer; + + void Reset() + { + uiCleaveTimer = 5000; + uiImpaleTimer = 4000; + uiBrutalStrikeTimer = 5000; + uiSunderArmorTimer = 4000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (me->GetEntry() == CREATURE_AZURE_INVADER_1) + { + if (uiCleaveTimer <= diff) + { + DoCast(me->getVictim(),SPELL_CLEAVE); + uiCleaveTimer = 5000; + } else uiCleaveTimer -= diff; + + if (uiImpaleTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,SPELL_IMPALE); + uiImpaleTimer = 4000; + } else uiImpaleTimer -= diff; + } + + if (me->GetEntry() == CREATURE_AZURE_INVADER_2) + { + if (uiBrutalStrikeTimer <= diff) + { + DoCast(me->getVictim(),SPELL_BRUTAL_STRIKE); + uiBrutalStrikeTimer = 5000; + } else uiBrutalStrikeTimer -= diff; + + if (uiSunderArmorTimer <= diff) + { + DoCast(me->getVictim(),SPELL_SUNDER_ARMOR); + uiSunderArmorTimer = urand(8000,10000); + } else uiSunderArmorTimer -= diff; + + DoMeleeAttackIfReady(); + } + + DoMeleeAttackIfReady(); + } + +}; + +struct mob_azure_spellbreakerAI : public violet_hold_trashAI +{ + mob_azure_spellbreakerAI(Creature* c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneBlastTimer; + uint32 uiSlowTimer; + uint32 uiChainsOfIceTimer; + uint32 uiConeOfColdTimer; + + void Reset() + { + uiArcaneBlastTimer = 5000; + uiSlowTimer = 4000; + uiChainsOfIceTimer = 5000; + uiConeOfColdTimer = 4000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (me->GetEntry() == CREATURE_AZURE_SPELLBREAKER_1) + { + if (uiArcaneBlastTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_BLAST,H_SPELL_ARCANE_BLAST)); + uiArcaneBlastTimer = 6000; + } else uiArcaneBlastTimer -= diff; + + if (uiSlowTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,SPELL_SLOW); + uiSlowTimer = 5000; + } else uiSlowTimer -= diff; + } + + if (me->GetEntry() == CREATURE_AZURE_SPELLBREAKER_2) + { + if (uiChainsOfIceTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,SPELL_CHAINS_OF_ICE); + uiChainsOfIceTimer = 7000; + } else uiChainsOfIceTimer -= diff; + + if (uiConeOfColdTimer <= diff) + { + DoCast(DUNGEON_MODE(SPELL_CONE_OF_COLD,H_SPELL_CONE_OF_COLD)); + uiConeOfColdTimer = 5000; + } else uiConeOfColdTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_binderAI : public violet_hold_trashAI +{ + mob_azure_binderAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneExplosionTimer; + uint32 uiArcainBarrageTimer; + uint32 uiFrostNovaTimer; + uint32 uiFrostboltTimer; + + void Reset() + { + uiArcaneExplosionTimer = 5000; + uiArcainBarrageTimer = 4000; + uiFrostNovaTimer = 5000; + uiFrostboltTimer = 4000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (me->GetEntry() == CREATURE_AZURE_BINDER_1) + { + if (uiArcaneExplosionTimer <= diff) + { + DoCast(DUNGEON_MODE(SPELL_ARCANE_EXPLOSION,H_SPELL_ARCANE_EXPLOSION)); + uiArcaneExplosionTimer = 5000; + } else uiArcaneExplosionTimer -= diff; + + if (uiArcainBarrageTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_BARRAGE,H_SPELL_ARCANE_BARRAGE)); + uiArcainBarrageTimer = 6000; + } else uiArcainBarrageTimer -= diff; + } + + if (me->GetEntry() == CREATURE_AZURE_BINDER_2) + { + if (uiFrostNovaTimer <= diff) + { + DoCast(DUNGEON_MODE(SPELL_FROST_NOVA,H_SPELL_FROST_NOVA)); + uiFrostNovaTimer = 5000; + } else uiFrostNovaTimer -= diff; + + if (uiFrostboltTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_FROSTBOLT,H_SPELL_FROSTBOLT)); + uiFrostboltTimer = 6000; + } else uiFrostboltTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_mage_slayerAI : public violet_hold_trashAI +{ + mob_azure_mage_slayerAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneEmpowermentTimer; + uint32 uiSpellLockTimer; + + void Reset() + { + uiArcaneEmpowermentTimer = 5000; + uiSpellLockTimer = 5000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (me->GetEntry() == CREATURE_AZURE_MAGE_SLAYER_1) + { + if (uiArcaneEmpowermentTimer <= diff) + { + DoCast(me,SPELL_ARCANE_EMPOWERMENT); + uiArcaneEmpowermentTimer = 14000; + } else uiArcaneEmpowermentTimer -= diff; + } + + if (me->GetEntry() == CREATURE_AZURE_MAGE_SLAYER_2) + { + if (uiSpellLockTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,SPELL_SPELL_LOCK); + uiSpellLockTimer = 9000; + } else uiSpellLockTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_captainAI : public violet_hold_trashAI +{ + mob_azure_captainAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiMortalStrikeTimer; + uint32 uiWhirlwindTimer; + + void Reset() + { + uiMortalStrikeTimer = 5000; + uiWhirlwindTimer = 8000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (uiMortalStrikeTimer <= diff) + { + DoCast(me->getVictim(),SPELL_MORTAL_STRIKE); + uiMortalStrikeTimer = 5000; + } else uiMortalStrikeTimer -= diff; + + if (uiWhirlwindTimer <= diff) + { + DoCast(me,SPELL_WHIRLWIND_OF_STEEL); + uiWhirlwindTimer = 8000; + } else uiWhirlwindTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_sorcerorAI : public violet_hold_trashAI +{ + mob_azure_sorcerorAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiArcaneStreamTimer; + uint32 uiArcaneStreamTimerStartingValueHolder; + uint32 uiManaDetonationTimer; + + void Reset() + { + uiArcaneStreamTimer = 4000; + uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer; + uiManaDetonationTimer = 5000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (uiArcaneStreamTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (pTarget) + DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_STREAM,H_SPELL_ARCANE_STREAM)); + uiArcaneStreamTimer = urand(0,5000)+5000; + uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer; + } else uiArcaneStreamTimer -= diff; + + if (uiManaDetonationTimer <= diff && uiArcaneStreamTimer >=1500 && uiArcaneStreamTimer <= uiArcaneStreamTimerStartingValueHolder/2) + { + DoCast(DUNGEON_MODE(SPELL_MANA_DETONATION,H_SPELL_MANA_DETONATION)); + uiManaDetonationTimer = urand(2000,6000); + } else uiManaDetonationTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_raiderAI : public violet_hold_trashAI +{ + mob_azure_raiderAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiConcussionBlowTimer; + uint32 uiMagicReflectionTimer; + + void Reset() + { + uiConcussionBlowTimer = 5000; + uiMagicReflectionTimer = 8000; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (uiConcussionBlowTimer <= diff) + { + DoCast(me->getVictim(),SPELL_CONCUSSION_BLOW); + uiConcussionBlowTimer = 5000; + } else uiConcussionBlowTimer -= diff; + + if (uiMagicReflectionTimer <= diff) + { + DoCast(SPELL_MAGIC_REFLECTION); + uiMagicReflectionTimer = urand(10000,15000); + } else uiMagicReflectionTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct mob_azure_stalkerAI : public violet_hold_trashAI +{ + mob_azure_stalkerAI(Creature *c) : violet_hold_trashAI(c) + { + pInstance = c->GetInstanceData(); + } + uint32 uiBackstabTimer; + uint32 uiTacticalBlinkTimer; + bool TacticalBlinkCasted; + + void Reset() + { + uiBackstabTimer = 1300; + uiTacticalBlinkTimer = 8000; + TacticalBlinkCasted =false; + } + + void UpdateAI(const uint32 diff) + { + violet_hold_trashAI::UpdateAI(diff); + npc_escortAI::UpdateAI(diff); + + if (!UpdateVictim()) + return; + + if (!TacticalBlinkCasted) + { + if (uiTacticalBlinkTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true); + if (pTarget) + DoCast(pTarget,SPELL_TACTICAL_BLINK); + uiTacticalBlinkTimer = 6000; + TacticalBlinkCasted = true; + } else uiTacticalBlinkTimer -= diff; + } + + else + { + if (uiBackstabTimer <= diff) + { + Unit* pTarget = SelectTarget(SELECT_TARGET_NEAREST, 0, 10, true); + DoCast(pTarget,SPELL_BACKSTAB); + TacticalBlinkCasted = false; + uiBackstabTimer =1300; + } else uiBackstabTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_mob_azure_invader(Creature* pCreature) +{ + return new mob_azure_invaderAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_spellbreaker(Creature* pCreature) +{ + return new mob_azure_spellbreakerAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_binder(Creature* pCreature) +{ + return new mob_azure_binderAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_mage_slayer(Creature* pCreature) +{ + return new mob_azure_mage_slayerAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_captain(Creature* pCreature) +{ + return new mob_azure_captainAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_sorceror(Creature* pCreature) +{ + return new mob_azure_sorcerorAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_raider(Creature* pCreature) +{ + return new mob_azure_raiderAI (pCreature); +} + +CreatureAI* GetAI_mob_azure_stalker(Creature* pCreature) +{ + return new mob_azure_stalkerAI (pCreature); +} + void AddSC_violet_hold() { Script *newscript; @@ -271,4 +1253,49 @@ void AddSC_violet_hold() newscript->Name = "npc_teleportation_portal_vh"; newscript->GetAI = &GetAI_npc_teleportation_portal; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_invader"; + newscript->GetAI = &GetAI_mob_azure_invader; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_spellbreaker"; + newscript->GetAI = &GetAI_mob_azure_invader; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_binder"; + newscript->GetAI = &GetAI_mob_azure_binder; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_mage_slayer"; + newscript->GetAI = &GetAI_mob_azure_mage_slayer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_captain"; + newscript->GetAI = &GetAI_mob_azure_captain; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_sorceror"; + newscript->GetAI = &GetAI_mob_azure_sorceror; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_raider"; + newscript->GetAI = &GetAI_mob_azure_raider; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_stalker"; + newscript->GetAI = &GetAI_mob_azure_stalker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_azure_saboteur"; + newscript->GetAI = &GetAI_mob_azure_saboteur; + newscript->RegisterSelf(); } diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.h b/src/server/scripts/Northrend/VioletHold/violet_hold.h index 4476d5e823a..0d55b9bfae8 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.h +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + #ifndef DEF_VIOLET_HOLD_H #define DEF_VIOLET_HOLD_H @@ -14,7 +31,9 @@ enum Creatures CREATURE_EREKEM_GUARD = 29395, CREATURE_MORAGG = 29316, CREATURE_CYANIGOSA = 31134, - CREATURE_SINCLARI = 30658 + CREATURE_SINCLARI = 30658, + CREATURE_SABOTEOUR = 31079, + NPC_VIOLET_HOLD_GUARD = 30659 }; enum Data @@ -23,7 +42,17 @@ enum Data DATA_2ND_BOSS_EVENT, DATA_CYANIGOSA_EVENT, DATA_WAVE_COUNT, - DATA_REMOVE_NPC + DATA_REMOVE_NPC, + DATA_PORTAL_LOCATION, + DATA_DOOR_INTEGRITY, + DATA_NPC_PRESENCE_AT_DOOR, + DATA_NPC_PRESENCE_AT_DOOR_ADD, + DATA_NPC_PRESENCE_AT_DOOR_REMOVE, + DATA_START_BOSS_ENCOUNTER, + DATA_FIRST_BOSS, + DATA_SECOND_BOSS, + DATA_ACTIVATE_CRYSTAL, + DATA_MAIN_EVENT_PHASE }; enum Data64 @@ -46,7 +75,11 @@ enum Data64 DATA_XEVOZZ_CELL, DATA_ZURAMAT_CELL, DATA_MAIN_DOOR, - DATA_SINCLARI + DATA_SINCLARI, + DATA_TELEPORTATION_PORTAL, + DATA_SABOTEUR_PORTAL, + DATA_ADD_TRASH_MOB, + DATA_DEL_TRASH_MOB }; enum Bosses diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 19d82dc9044..b2b975f54ab 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -35,7 +37,7 @@ npc_lurgglbr npc_nexus_drake_hatchling EndContentData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" @@ -2108,7 +2110,7 @@ struct npc_warmage_coldarraAI : public Scripted_NoMovementAI m_uiTimer = 0; } - void Aggro(Unit* /*pWho*/) {} + void EnterCombat(Unit* /*pWho*/) {} void AttackStart(Unit* /*pWho*/) {} diff --git a/src/server/scripts/Northrend/crystalsong_forest.cpp b/src/server/scripts/Northrend/crystalsong_forest.cpp index 208e9dea5b5..e8743b92db4 100644 --- a/src/server/scripts/Northrend/crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/crystalsong_forest.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Script Data Start @@ -24,7 +23,7 @@ SDComment: SDCategory: CrystalsongForest Script Data End */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" /******************************************************* * npc_warmage_violetstand diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp index 7d5e76ffe35..a602b84fcf0 100644 --- a/src/server/scripts/Northrend/dalaran.cpp +++ b/src/server/scripts/Northrend/dalaran.cpp @@ -1,19 +1,18 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Script Data Start @@ -24,7 +23,7 @@ SDComment: For what is 63990+63991? Same function but don't work correct... SDCategory: Dalaran Script Data End */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" /******************************************************* * npc_mageguard_dalaran @@ -53,7 +52,7 @@ struct npc_mageguard_dalaranAI : public Scripted_NoMovementAI void Reset(){} - void Aggro(Unit* /*pWho*/){} + void EnterCombat(Unit* /*pWho*/){} void AttackStart(Unit* /*pWho*/){} diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp index 4f26ec1de1a..f79deb594b0 100644 --- a/src/server/scripts/Northrend/dragonblight.cpp +++ b/src/server/scripts/Northrend/dragonblight.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -25,7 +27,7 @@ EndScriptData */ npc_alexstrasza_wr_gate EndContentData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" enum eEnums diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index 4b6d65a9764..bb0971c8904 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -25,7 +27,7 @@ EndScriptData */ npc_orsonn_and_kodian EndContentData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" #define GOSSIP_ITEM1 "You're free to go Orsonn, but first tell me what's wrong with the furbolg." diff --git a/src/server/scripts/Northrend/howling_fjord.cpp b/src/server/scripts/Northrend/howling_fjord.cpp index 172501e2faa..7b2fb06986e 100644 --- a/src/server/scripts/Northrend/howling_fjord.cpp +++ b/src/server/scripts/Northrend/howling_fjord.cpp @@ -1,18 +1,18 @@ -/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -27,7 +27,7 @@ npc_plaguehound_tracker npc_apothecary_hanes EndContentData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index 76608bdb73d..a40d363eeb8 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * 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. +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * - * 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. + * 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. * - * 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 + * 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -25,7 +27,7 @@ EndScriptData */ npc_arete EndContentData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" /*###### ## npc_arete diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index b5df8998b4a..cae5012eb3a 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -1,18 +1,18 @@ -/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* ScriptData @@ -28,7 +28,7 @@ npc_vekjik avatar_of_freya EndContentData */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 9275e24bd2f..bcc846be1dc 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -1,21 +1,21 @@ -/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> +/* + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index a821ea4ffae..b1574b21f6b 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -1,22 +1,21 @@ /* - * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> * - * 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 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. + * 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 + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptedPch.h" +#include "ScriptPCH.h" #include "ScriptedEscortAI.h" /*#### |
