diff options
| author | Spp <none@none> | 2010-04-07 18:09:10 +0200 |
|---|---|---|
| committer | Spp <none@none> | 2010-04-07 18:09:10 +0200 |
| commit | b27ce42704c33e292bda390265bb8fd01a433505 (patch) | |
| tree | 29b2df222a2c1be3325e3d6fab75206100b578fd /src/scripts/northrend | |
| parent | f490ad5ac259712e323f0a52e608ff1383b2fc41 (diff) | |
Code Style: Remove trailing spaces
--HG--
branch : trunk
Diffstat (limited to 'src/scripts/northrend')
59 files changed, 275 insertions, 275 deletions
diff --git a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp index 757841d4877..92f9440db66 100644 --- a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp +++ b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp @@ -28,7 +28,7 @@ enum Spells SPELL_BASH = 57094, // Victim SPELL_ENTANGLING_ROOTS = 57095, // Random Victim 100Y SPELL_MINI = 57055, // Self - SPELL_VENOM_BOLT_VOLLEY = 57088, // Random Victim 100Y + SPELL_VENOM_BOLT_VOLLEY = 57088, // Random Victim 100Y SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS = 56648, // Killer 3Y SPELL_POISONOUS_MUSHROOM_POISON_CLOUD = 57061, // Self - Duration 8 Sec SPELL_POISONOUS_MUSHROOM_VISUAL_AREA = 61566, // Self diff --git a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp index 3e6f3f45a72..af2030eac1a 100644 --- a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp +++ b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp @@ -69,7 +69,7 @@ struct boss_elder_nadoxAI : public ScriptedAI uint32 uiSwarmerSpawnTimer; uint32 uiGuardSpawnTimer; uint32 uiEnragueTimer; - + bool bGuardSpawned; ScriptedInstance *pInstance; @@ -180,7 +180,7 @@ CreatureAI* GetAI_boss_elder_nadox(Creature* pCreature) enum AddSpells { SPELL_SPRINT = 56354, - SPELL_GUARDIAN_AURA = 56151 + SPELL_GUARDIAN_AURA = 56151 }; struct mob_ahnkahar_nerubianAI : public ScriptedAI @@ -212,7 +212,7 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI { if (!UpdateVictim()) return; - + if (m_creature->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY) m_creature->RemoveAurasDueToSpell(SPELL_GUARDIAN_AURA); diff --git a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp index fde2cbc800f..6f85b07ccd3 100644 --- a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp @@ -518,7 +518,7 @@ struct npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI return; if (!bRemoved && m_creature->GetPositionX() > 440.0f) - { + { if (pInstance->GetData(DATA_PRINCE_TALDARAM_EVENT) == DONE) { m_creature->InterruptNonMeleeSpells(true); diff --git a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp index 64e70435244..53a2a8473b2 100644 --- a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp +++ b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp @@ -226,7 +226,7 @@ struct boss_taldaramAI : public ScriptedAI uiPhaseTimer = 500; if (Unit* pEmbraceTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) uiEmbraceTarget = pEmbraceTarget->GetGUID(); - + } uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS); } else uiVanishTimer -= diff; diff --git a/src/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp b/src/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp index 906009c52eb..fa2f2bc1f0f 100644 --- a/src/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp +++ b/src/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp @@ -58,14 +58,14 @@ struct instance_ahnkahet : public ScriptedInstance uint8 InitiandCnt, switchtrigger, initiandkilled; - + std::string str_data; void Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); InitiandGUIDs.clear(); - + Elder_Nadox =0; Prince_Taldaram =0; Jedoga_Shadowseeker =0; @@ -256,7 +256,7 @@ struct instance_ahnkahet : public ScriptedInstance << spheres[0] << " " << spheres[1]; str_data = saveStream.str(); - + OUT_SAVE_INST_DATA_COMPLETE; return str_data; } diff --git a/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp b/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp index fc8901270cb..6a6a4cbadd1 100644 --- a/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp +++ b/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp @@ -103,7 +103,7 @@ struct boss_anub_arakAI : public ScriptedAI m_creature->RemoveAura(SPELL_SUBMERGE); lSummons.DespawnAll(); - + if (pInstance) pInstance->SetData(DATA_ANUBARAK_EVENT, NOT_STARTED); } @@ -112,7 +112,7 @@ struct boss_anub_arakAI : public ScriptedAI void EnterCombat(Unit *pWho) { DoScriptText(SAY_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_ANUBARAK_EVENT, IN_PROGRESS); } @@ -245,11 +245,11 @@ struct boss_anub_arakAI : public ScriptedAI if (uiPhase != 1) DoMeleeAttackIfReady(); } - + void JustDied(Unit *pKiller) { DoScriptText(SAY_DEATH, m_creature); - + if (pInstance) pInstance->SetData(DATA_ANUBARAK_EVENT, DONE); } @@ -258,7 +258,7 @@ struct boss_anub_arakAI : public ScriptedAI { if (pVictim == m_creature) return; - + DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature); } @@ -266,7 +266,7 @@ struct boss_anub_arakAI : public ScriptedAI { lSummons.Summon(summon); } - + }; CreatureAI* GetAI_boss_anub_arak(Creature *pCreature) diff --git a/src/scripts/northrend/borean_tundra.cpp b/src/scripts/northrend/borean_tundra.cpp index b33d8cfc27a..10481a6ecaa 100644 --- a/src/scripts/northrend/borean_tundra.cpp +++ b/src/scripts/northrend/borean_tundra.cpp @@ -2040,7 +2040,7 @@ struct npc_trapped_mammoth_calfAI : public ScriptedAI void Reset() { GameObject *pTrap; - + uiTimer = 1500; bStarted = false; @@ -2089,7 +2089,7 @@ struct npc_trapped_mammoth_calfAI : public ScriptedAI if (param == 1) bStarted = true; } - + void MovementInform(uint32 uiType, uint32 uiId) { GameObject* pTrap; @@ -2184,7 +2184,7 @@ struct npc_seaforium_depth_chargeAI : public ScriptedAI { if (uiExplosionTimer < diff) { - DoCast(SPELL_SEAFORIUM_DEPTH_CHARGE_EXPLOSION); + DoCast(SPELL_SEAFORIUM_DEPTH_CHARGE_EXPLOSION); for(uint8 i = 0; i < 4; ++i) { if(Creature* cCredit = m_creature->FindNearestCreature(25402 + i, 10.0f))//25402-25405 credit markers @@ -2194,7 +2194,7 @@ struct npc_seaforium_depth_chargeAI : public ScriptedAI Player* pOwner = uOwner->ToPlayer(); if(pOwner && pOwner->GetQuestStatus(QUEST_BURY_THOSE_COCKROACHES) == QUEST_STATUS_INCOMPLETE) pOwner->KilledMonsterCredit(cCredit->GetEntry(),cCredit->GetGUID()); - } + } } } m_creature->Kill(m_creature); @@ -2225,7 +2225,7 @@ struct npc_valiance_keep_cannoneerAI : public ScriptedAI uint32 uiTimer; void Reset() - { + { uiTimer = urand(13000,18000); } @@ -2261,7 +2261,7 @@ enum Spells SPELL_TRANSITUS_SHIELD_BEAM = 48310 }; -enum NPCs +enum NPCs { NPC_TRANSITUS_SHIELD_DUMMY = 27306, NPC_WARMAGE_HOLLISTER = 27906, @@ -2336,7 +2336,7 @@ struct npc_warmage_coldarraAI : public Scripted_NoMovementAI } break; } - } + } else m_uiTimer -= uiDiff; ScriptedAI::UpdateAI(uiDiff); @@ -2506,7 +2506,7 @@ void AddSC_borean_tundra() newscript->Name = "npc_valiance_keep_cannoneer"; newscript->GetAI = &GetAI_npc_valiance_keep_cannoneer; newscript->RegisterSelf(); - + newscript = new Script; newscript->Name = "npc_warmage_coldarra"; newscript->GetAI = &GetAI_npc_warmage_coldarra; diff --git a/src/scripts/northrend/crystalsong_forest.cpp b/src/scripts/northrend/crystalsong_forest.cpp index d60490d39b5..862b10b197a 100644 --- a/src/scripts/northrend/crystalsong_forest.cpp +++ b/src/scripts/northrend/crystalsong_forest.cpp @@ -20,7 +20,7 @@ SDName: CrystalSongForest SDAuthor: Malcrom SD%Complete: 99% -SDComment: +SDComment: SDCategory: CrystalsongForest Script Data End */ @@ -35,7 +35,7 @@ enum Spells SPELL_TRANSITUS_SHIELD_BEAM = 48310 }; -enum NPCs +enum NPCs { NPC_TRANSITUS_SHIELD_DUMMY = 27306, NPC_WARMAGE_SARINA = 32369, @@ -62,7 +62,7 @@ struct npc_warmage_violetstandAI : public Scripted_NoMovementAI { if (m_uiTimer <= uiDiff) { - m_creature->CastStop(); + m_creature->CastStop(); Creature* pTarget = GetClosestCreatureWithEntry(me,NPC_TRANSITUS_SHIELD_DUMMY,32.0f); switch(me->GetEntry()) @@ -90,7 +90,7 @@ struct npc_warmage_violetstandAI : public Scripted_NoMovementAI m_uiTimer = 90000; break; } - } + } else m_uiTimer -= uiDiff; ScriptedAI::UpdateAI(uiDiff); diff --git a/src/scripts/northrend/dalaran.cpp b/src/scripts/northrend/dalaran.cpp index f6ced101d22..26b896b473d 100644 --- a/src/scripts/northrend/dalaran.cpp +++ b/src/scripts/northrend/dalaran.cpp @@ -111,7 +111,7 @@ CreatureAI* GetAI_npc_mageguard_dalaran(Creature* pCreature) enum eHiraSnowdawn { - SPELL_COLD_WEATHER_FLYING = 54197 + SPELL_COLD_WEATHER_FLYING = 54197 }; #define GOSSIP_TEXT_TRAIN_HIRA "I seek training to ride a steed." @@ -138,7 +138,7 @@ bool GossipSelect_npc_hira_snowdawn(Player* pPlayer, Creature* pCreature, uint32 if (uiAction == GOSSIP_ACTION_TRADE) pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); - + return true; } diff --git a/src/scripts/northrend/draktharon_keep/boss_dred.cpp b/src/scripts/northrend/draktharon_keep/boss_dred.cpp index dcc3f6fea81..ac6dfd91842 100644 --- a/src/scripts/northrend/draktharon_keep/boss_dred.cpp +++ b/src/scripts/northrend/draktharon_keep/boss_dred.cpp @@ -108,7 +108,7 @@ struct boss_dredAI : public ScriptedAI DoCastVictim(SPELL_MANGLING_SLASH,false); uiManglingSlashTimer = 20*IN_MILISECONDS; } else uiManglingSlashTimer -=diff; - + if (uiFearsomeRoarTimer < diff) { DoCastAOE(DUNGEON_MODE(SPELL_FEARSOME_ROAR, H_SPELL_FEARSOME_ROAR),false); diff --git a/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp b/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp index 1e6521b1b03..dc25ea7d44c 100644 --- a/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp +++ b/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp @@ -79,7 +79,7 @@ struct boss_tharon_jaAI : public ScriptedAI uint32 uiEyeBeamTimer; uint32 uiLightningBreathTimer; uint32 uiPoisonCloudTimer; - + CombatPhase Phase; ScriptedInstance* pInstance; @@ -95,7 +95,7 @@ struct boss_tharon_jaAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_THARON_JA_EVENT, NOT_STARTED); } - + void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); @@ -103,7 +103,7 @@ struct boss_tharon_jaAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_THARON_JA_EVENT, IN_PROGRESS); } - + void UpdateAI(const uint32 diff) { //Return since we have no target @@ -119,19 +119,19 @@ struct boss_tharon_jaAI : public ScriptedAI DoCast(pTarget, DUNGEON_MODE(SPELL_CURSE_OF_LIFE, H_SPELL_CURSE_OF_LIFE)); uiCurseOfLifeTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); } else uiCurseOfLifeTimer -= diff; - + if (uiShadowVolleyTimer < diff) { DoCastVictim(DUNGEON_MODE(SPELL_SHADOW_VOLLEY,H_SPELL_SHADOW_VOLLEY)); uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS); } else uiShadowVolleyTimer -= diff; - + if (uiRainOfFireTimer < diff) { DoCastAOE(DUNGEON_MODE(SPELL_RAIN_OF_FIRE,H_SPELL_RAIN_OF_FIRE)); uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS); } else uiRainOfFireTimer -= diff; - + if (uiPhaseTimer < diff) { DoCast(SPELL_DECAY_FLESH); @@ -183,7 +183,7 @@ struct boss_tharon_jaAI : public ScriptedAI DoCastAOE(DUNGEON_MODE(SPELL_POISON_CLOUD, H_SPELL_POISON_CLOUD)); uiPoisonCloudTimer = urand(10*IN_MILISECONDS,12*IN_MILISECONDS); } else uiPoisonCloudTimer -= diff; - + if (uiPhaseTimer < diff) { DoCast(SPELL_RETURN_FLESH); diff --git a/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp index e699ca084fa..4b396904dfb 100644 --- a/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -89,7 +89,7 @@ struct boss_trollgoreAI : public ScriptedAI lSummons.DespawnAll(); m_creature->RemoveAura(DUNGEON_MODE(SPELL_CONSUME_AURA,H_SPELL_CONSUME_AURA)); - + if (pInstance) pInstance->SetData(DATA_TROLLGORE_EVENT, NOT_STARTED); } @@ -151,7 +151,7 @@ struct boss_trollgoreAI : public ScriptedAI DoMeleeAttackIfReady(); } - + void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); @@ -165,7 +165,7 @@ struct boss_trollgoreAI : public ScriptedAI pInstance->SetData(DATA_TROLLGORE_EVENT, DONE); } } - + void KilledUnit(Unit *victim) { if (victim == m_creature) diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp index fe515516a68..601125da336 100644 --- a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -45,29 +45,29 @@ struct boss_bronjahmAI : public ScriptedAI { pInstance = m_creature->GetInstanceData(); } - + uint32 uiFearTimer; uint32 uiShadowBoltTimer; uint32 uiMagicsBaneTimer; uint32 uiCorruptSoulTimer; - + CombatPhases Phase; ScriptedInstance* pInstance; - + void Reset() { Phase = PHASE_1; - + uiFearTimer = urand(8000,12000); uiShadowBoltTimer = 2000; uiMagicsBaneTimer = urand(8000,15000); uiCorruptSoulTimer = urand(15000,25000); - + if (pInstance) pInstance->SetData(DATA_BRONJAHM_EVENT, NOT_STARTED); } - + void EnterCombat(Unit* who) { //DoScriptText(SAY_AGGRO, m_creature); @@ -75,7 +75,7 @@ struct boss_bronjahmAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_BRONJAHM_EVENT, IN_PROGRESS); } - + void JustDied(Unit* killer) { //DoScriptText(SAY_DEATH, m_creature); @@ -83,13 +83,13 @@ struct boss_bronjahmAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_BRONJAHM_EVENT, DONE); } - + void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; - + switch (Phase) { case PHASE_1: @@ -111,23 +111,23 @@ struct boss_bronjahmAI : public ScriptedAI } else uiFearTimer -= diff; break; } - + if (HealthBelowPct(30)) DoCast(m_creature,SPELL_TELEPORT); - + if (uiShadowBoltTimer <= diff) { if (m_creature->IsWithinMeleeRange(m_creature->getVictim())) DoCastVictim(SPELL_SHADOW_BOLT); uiShadowBoltTimer = 2000; } else uiShadowBoltTimer -= diff; - + if (uiMagicsBaneTimer <= diff) { DoCastVictim(DUNGEON_MODE(SPELL_MAGIC_S_BANE,SPELL_MAGIC_S_BANE_H)); uiMagicsBaneTimer = urand(8000,15000); } else uiMagicsBaneTimer -= diff; - + DoMeleeAttackIfReady(); } }; @@ -143,9 +143,9 @@ struct mob_corrupted_soul_fragmentAI : public ScriptedAI { pInstance = m_creature->GetInstanceData(); } - + ScriptedInstance* pInstance; - + void Reset() { SetCombatMovement(false); @@ -154,7 +154,7 @@ struct mob_corrupted_soul_fragmentAI : public ScriptedAI m_creature->GetMotionMaster()->MoveChase(pBronjham); } - + void MovementInform(uint32 type, uint32 id) { if (pInstance) @@ -173,7 +173,7 @@ CreatureAI* GetAI_mob_corrupted_soul_fragment(Creature* pCreature) void AddSC_boss_bronjahm() { Script *newscript; - + newscript = new Script; newscript->Name = "mob_corruptel_soul_fragment"; newscript->GetAI = &GetAI_mob_corrupted_soul_fragment; diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 2f038e178ca..cfdd2a30114 100644 --- a/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -37,7 +37,7 @@ struct instance_forge_of_souls : public ScriptedInstance { uiBronjahm = 0; uiDevourer = 0; - + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) m_auiEncounter[i] = NOT_STARTED; } diff --git a/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 5caf2351843..50565d7e142 100644 --- a/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -40,7 +40,7 @@ struct instance_halls_of_reflection : public ScriptedInstance uiFalric = 0; uiMarwyn = 0; uiLichKing = 0; - + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) m_auiEncounter[i] = NOT_STARTED; } @@ -57,7 +57,7 @@ struct instance_halls_of_reflection : public ScriptedInstance break; case CREATURE_LICHKING: uiLichKing = pCreature->GetGUID(); - break; + break; } } /* @@ -80,7 +80,7 @@ struct instance_halls_of_reflection : public ScriptedInstance break; case DATA_LICHKING_EVENT: m_auiEncounter[2] = data; - break; + break; } if (data == DONE) diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index dd7a7b4c41d..a2909b4ad38 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -71,7 +71,7 @@ struct boss_garfrostAI : public ScriptedAI bool phase2; bool phase3; bool bAchievement; - + ScriptedInstance* pInstance; EventMap events; @@ -82,7 +82,7 @@ struct boss_garfrostAI : public ScriptedAI phase2 = false; phase3 = false; bAchievement = true; - + if (pInstance) pInstance->SetData(DATA_GARFROST_EVENT, NOT_STARTED); } diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp index 2ec10f7df11..c57c3e6f6f3 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp @@ -175,8 +175,8 @@ struct boss_ickAI : public ScriptedAI if (pKrick->AI()) pKrick->AI()->DoAction(ACTION_OUTRO); } - - if (pInstance) + + if (pInstance) pInstance->SetData(DATA_KRICKANDICK_EVENT, DONE); } @@ -208,7 +208,7 @@ struct boss_ickAI : public ScriptedAI DoScriptText(SAY_ICK_CHASE_1, m_creature, pTarget); DoCast(pTarget, SPELL_PURSUED); } - + DoCast(SPELL_CONFUSION); events.ScheduleEvent(EVENT_PURSUE, 30000, GCD_1); return; @@ -274,7 +274,7 @@ struct boss_krickAI : public ScriptedAI KrickPhase phase; uint64 uiNpcOutroDialog; uint64 uiTyrannus; - + void Reset() { uiNpcOutroDialog = 0; @@ -307,7 +307,7 @@ struct boss_krickAI : public ScriptedAI void DoAction(const int32 actionId) { - switch(actionId) + switch(actionId) { case ACTION_OUTRO: { @@ -324,7 +324,7 @@ struct boss_krickAI : public ScriptedAI if (pJainaOrSylvanas) { Position pos; m_creature->GetNearPosition(pos, 5.0f, 0); - pJainaOrSylvanas->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), + pJainaOrSylvanas->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY())); } else { @@ -333,7 +333,7 @@ struct boss_krickAI : public ScriptedAI else pJainaOrSylvanas = m_creature->SummonCreature(NPC_JAINA_PART1, *m_creature, TEMPSUMMON_MANUAL_DESPAWN); } - + if (pJainaOrSylvanas) { pJainaOrSylvanas->SetOrientation(pJainaOrSylvanas->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY())); @@ -406,14 +406,14 @@ struct boss_krickAI : public ScriptedAI uiTyrannus = (pInstance ? pInstance->GetData64(DATA_TYRANNUS) : 0); events.ScheduleEvent(EVENT_OUTRO_7, 1); break; - case EVENT_OUTRO_7: + case EVENT_OUTRO_7: if (Creature *pTyrannus = m_creature->GetCreature(*m_creature, uiTyrannus)) DoScriptText(SAY_TYRANNUS_OUTRO_7, pTyrannus); events.ScheduleEvent(EVENT_OUTRO_8, 7000); break; case EVENT_OUTRO_8: DoScriptText(SAY_KRICK_OUTRO_8, m_creature); - // TODO: Tyrannus starts killing Krick. + // TODO: Tyrannus starts killing Krick. // there shall be some visual spell effect events.ScheduleEvent(EVENT_OUTRO_9, 6000); break; @@ -427,7 +427,7 @@ struct boss_krickAI : public ScriptedAI events.ScheduleEvent(EVENT_OUTRO_10, 12000); break; - case EVENT_OUTRO_10: + case EVENT_OUTRO_10: { Creature* pNpcDialog = m_creature->GetCreature(*m_creature, uiNpcOutroDialog); if (pNpcDialog) @@ -447,7 +447,7 @@ struct boss_krickAI : public ScriptedAI Creature* pNpcDialog = m_creature->GetCreature(*m_creature, uiNpcOutroDialog); if (pNpcDialog) pNpcDialog->DisappearAndDie(); - + m_creature->DisappearAndDie(); break; } diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index b45a059df98..84ac04f2d54 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -18,7 +18,7 @@ #include "pit_of_saron.h" /* - * SDComment: TODO: + * SDComment: TODO: * - implement aura for spell Overlord Brand. * - Intro/Outro * - improve script of Rimefang @@ -90,14 +90,14 @@ struct boss_tyrannusAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance* pInstance; EventMap events; void Reset() { events.Reset(); - + if (pInstance) pInstance->SetData(DATA_TYRANNUS_EVENT, NOT_STARTED); } @@ -127,8 +127,8 @@ struct boss_tyrannusAI : public ScriptedAI { DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature); } - - void JustDied(Unit* killer) + + void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); @@ -183,7 +183,7 @@ struct boss_rimefangAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance* pInstance; EventMap events; @@ -193,7 +193,7 @@ struct boss_rimefangAI : public ScriptedAI m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); - events.Reset(); + events.Reset(); } void EnterCombat(Unit* who) @@ -204,7 +204,7 @@ struct boss_rimefangAI : public ScriptedAI events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, 25000); events.ScheduleEvent(EVENT_ICY_BLAST, 35000); } - + void UpdateAI(const uint32 diff) { //Return since we have no target diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 8353af43608..45422f54bcd 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -55,7 +55,7 @@ struct instance_pit_of_saron : public ScriptedInstance bool IsEncounterInProgress() const { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (uiEncounter[i] == IN_PROGRESS) + if (uiEncounter[i] == IN_PROGRESS) return true; return false; @@ -73,24 +73,24 @@ struct instance_pit_of_saron : public ScriptedInstance switch(pCreature->GetEntry()) { - case CREATURE_KRICK: - uiKrick = pCreature->GetGUID(); + case CREATURE_KRICK: + uiKrick = pCreature->GetGUID(); break; case CREATURE_ICK: uiIck = pCreature->GetGUID(); break; - case CREATURE_GARFROST: - uiGarfrost = pCreature->GetGUID(); + case CREATURE_GARFROST: + uiGarfrost = pCreature->GetGUID(); break; - case CREATURE_TYRANNUS: - uiTyrannus = pCreature->GetGUID(); + case CREATURE_TYRANNUS: + uiTyrannus = pCreature->GetGUID(); break; case CREATURE_RIMEFANG: - uiRimefang = pCreature->GetGUID(); + uiRimefang = pCreature->GetGUID(); break; case NPC_SYLVANAS_PART1: @@ -120,7 +120,7 @@ struct instance_pit_of_saron : public ScriptedInstance pCreature->UpdateEntry(NPC_CHAMPION_2_ALLIANCE, ALLIANCE); break; case NPC_CHAMPION_3_HORDE: // No 3rd set for Alliance? - if (uiTeamInInstance == ALLIANCE) + if (uiTeamInInstance == ALLIANCE) pCreature->UpdateEntry(NPC_CHAMPION_2_ALLIANCE, ALLIANCE); break; } @@ -148,13 +148,13 @@ struct instance_pit_of_saron : public ScriptedInstance switch(type) { case DATA_GARFROST_EVENT: - uiEncounter[0] = data; + uiEncounter[0] = data; break; case DATA_TYRANNUS_EVENT: - uiEncounter[1] = data; + uiEncounter[1] = data; break; case DATA_KRICKANDICK_EVENT: - uiEncounter[2] = data; + uiEncounter[2] = data; break; } diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp index f6af85b1c89..102c95d82f6 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -446,7 +446,7 @@ struct mob_wrathbone_coldwraithAI: public ScriptedAI return; } } - + DoMeleeAttackIfReady(); } }; @@ -788,7 +788,7 @@ struct mob_deathwhisper_shadowcasterAI: public ScriptedAI return; } } - + DoMeleeAttackIfReady(); } }; @@ -839,7 +839,7 @@ struct mob_deathwhisper_necrolyteAI: public ScriptedAI return; } } - + DoMeleeAttackIfReady(); } }; @@ -931,7 +931,7 @@ struct mob_geist_ambusherAI: public ScriptedAI return; } } - + DoMeleeAttackIfReady(); } }; diff --git a/src/scripts/northrend/grizzly_hills.cpp b/src/scripts/northrend/grizzly_hills.cpp index 3a2466eacdb..3aea48e6c31 100644 --- a/src/scripts/northrend/grizzly_hills.cpp +++ b/src/scripts/northrend/grizzly_hills.cpp @@ -126,11 +126,11 @@ enum eFloppy NPC_HUNGRY_WORG = 26586, NPC_RAVENOUS_WORG = 26590, //RWORG NPC_EMILY = 26588, - + QUEST_PERILOUS_ADVENTURE = 12027, - + SPELL_MRFLOPPY = 47184, //vehicle aura - + SAY_WORGHAGGRO1 = -1800001, //Um... I think one of those wolves is back... SAY_WORGHAGGRO2 = -1800002, //He's going for Mr. Floppy! SAY_WORGRAGGRO3 = -1800003, //Oh, no! Look, it's another wolf, and it's a biiiiiig one! @@ -304,7 +304,7 @@ bool QuestAccept_npc_emily(Player* pPlayer, Creature* pCreature, Quest const* qu { Mrfloppy->GetMotionMaster()->MoveFollow(pCreature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); } - + if (npc_escortAI* pEscortAI = CAST_AI(npc_emilyAI, (pCreature->AI()))) pEscortAI->Start(true, false, pPlayer->GetGUID()); } @@ -394,7 +394,7 @@ struct npc_outhouse_bunnyAI : public ScriptedAI if (uiType == 1) m_gender = uiData; } - + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { if (pSpell->Id == SPELL_OUTHOUSE_GROANS) @@ -475,10 +475,10 @@ struct npc_amberpine_woodsmanAI : public ScriptedAI { m_uiTimer = 0; m_uiPhase = 1; - } - + } + void UpdateAI(const uint32 uiDiff) - { + { // call this each update tick? if (Creature* stag = me->FindNearestCreature(TALLHORN_STAG, 0.2f)) { @@ -495,7 +495,7 @@ struct npc_amberpine_woodsmanAI : public ScriptedAI me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_LOOT); m_uiTimer = 3000; m_uiPhase = 2; - break; + break; case 2: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H); m_uiTimer = 4000; @@ -506,8 +506,8 @@ struct npc_amberpine_woodsmanAI : public ScriptedAI else m_uiTimer -= uiDiff; } - ScriptedAI::UpdateAI(uiDiff); - + ScriptedAI::UpdateAI(uiDiff); + UpdateVictim(); } }; @@ -532,7 +532,7 @@ void AddSC_grizzly_hills() newscript->GetAI = &GetAI_npc_emily; newscript->pQuestAccept = &QuestAccept_npc_emily; newscript->RegisterSelf(); - + newscript = new Script; newscript->Name = "npc_mrfloppy"; newscript->GetAI = &GetAI_npc_mrfloppy; diff --git a/src/scripts/northrend/gundrak/boss_gal_darah.cpp b/src/scripts/northrend/gundrak/boss_gal_darah.cpp index 828769fcd76..48a814f7212 100644 --- a/src/scripts/northrend/gundrak/boss_gal_darah.cpp +++ b/src/scripts/northrend/gundrak/boss_gal_darah.cpp @@ -192,7 +192,7 @@ struct boss_gal_darahAI : public ScriptedAI else { uiTransformationTimer -= diff; - + if (bStartOfTransformation) { bStartOfTransformation = false; @@ -258,7 +258,7 @@ struct boss_gal_darahAI : public ScriptedAI itr->getSource()->CompletedAchievement(achievWhatTheEck); } } - + pInstance->SetData(DATA_GAL_DARAH_EVENT, DONE); } } diff --git a/src/scripts/northrend/gundrak/boss_slad_ran.cpp b/src/scripts/northrend/gundrak/boss_slad_ran.cpp index 143d1f095f6..143a5b76f96 100644 --- a/src/scripts/northrend/gundrak/boss_slad_ran.cpp +++ b/src/scripts/northrend/gundrak/boss_slad_ran.cpp @@ -149,7 +149,7 @@ struct boss_slad_ranAI : public ScriptedAI DoScriptText(SAY_SUMMON_SNAKES,m_creature); uiPhase = 1; } - + if (uiPhase == 1 && HealthBelowPct(25)) { DoScriptText(SAY_SUMMON_CONSTRICTORS,m_creature); diff --git a/src/scripts/northrend/gundrak/instance_gundrak.cpp b/src/scripts/northrend/gundrak/instance_gundrak.cpp index 2d7cf27cc38..c04901bd27b 100644 --- a/src/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/src/scripts/northrend/gundrak/instance_gundrak.cpp @@ -294,7 +294,7 @@ struct instance_gundrak : public ScriptedInstance if (data == DONE) SaveToDB(); } - + void SetData64(uint32 type, uint64 data) { if (type == DATA_RUIN_DWELLER_DIED) diff --git a/src/scripts/northrend/icecrown.cpp b/src/scripts/northrend/icecrown.cpp index 15f50e74fb7..362075ee1ee 100644 --- a/src/scripts/northrend/icecrown.cpp +++ b/src/scripts/northrend/icecrown.cpp @@ -191,7 +191,7 @@ struct npc_argent_valiantAI : public ScriptedAI pCreature->GetMotionMaster()->MovePoint(0,8599.258,963.951,547.553); pCreature->setFaction(35); //wrong faction in db? } - + uint32 uiChargeTimer; uint32 uiShieldBreakerTimer; @@ -200,7 +200,7 @@ struct npc_argent_valiantAI : public ScriptedAI uiChargeTimer = 7000; uiShieldBreakerTimer = 10000; } - + void MovementInform(uint32 uiType, uint32 uiId) { if (uiType != POINT_MOTION_TYPE) @@ -220,7 +220,7 @@ struct npc_argent_valiantAI : public ScriptedAI m_creature->SetHomePosition(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation()); EnterEvadeMode(); } - } + } void UpdateAI(const uint32 uiDiff) { @@ -238,7 +238,7 @@ struct npc_argent_valiantAI : public ScriptedAI DoCastVictim(SPELL_SHIELD_BREAKER); uiShieldBreakerTimer = 10000; } else uiShieldBreakerTimer -= uiDiff; - + DoMeleeAttackIfReady(); } }; diff --git a/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp index c2aabf775ab..5dba116b0f5 100644 --- a/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -41,7 +41,7 @@ enum Spells SPELL_LOCUST_SWARM_10 = 28785, SPELL_LOCUST_SWARM_25 = 54021, SPELL_SUMMON_CORPSE_SCARABS_PLR = 29105, // This spawns 5 corpse scarabs on top of player - SPELL_SUMMON_CORPSE_SCARABS_MOB = 28864, // This spawns 10 corpse scarabs on top of dead guards + SPELL_SUMMON_CORPSE_SCARABS_MOB = 28864, // This spawns 10 corpse scarabs on top of dead guards SPELL_BERSERK = 27680, }; @@ -61,7 +61,7 @@ struct boss_anubrekhanAI : public BossAI { Position pos; - // respawn guard using home position, + // respawn guard using home position, // otherwise, after a wipe, they respawn where boss was at wipe moment. pos = m_creature->GetHomePosition(); pos.m_positionY -= 10.0f; diff --git a/src/scripts/northrend/naxxramas/boss_faerlina.cpp b/src/scripts/northrend/naxxramas/boss_faerlina.cpp index 183e5bf1272..bdb00f40699 100644 --- a/src/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/src/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -151,7 +151,7 @@ struct boss_faerlinaAI : public BossAI DoMeleeAttackIfReady(); } - + void SpellHit(Unit* caster, const SpellEntry *spell) { if (spell->Id == SPELL_WIDOWS_EMBRACE || spell->Id == H_SPELL_WIDOWS_EMBRACE) @@ -193,7 +193,7 @@ struct mob_faerlina_addAI : public ScriptedAI if (Creature *pFaerlina = pInstance->instance->GetCreature(pInstance->GetData64(DATA_FAERLINA))) DoCast(pFaerlina, SPELL_WIDOWS_EMBRACE); } - } + } }; CreatureAI* GetAI_mob_faerlina_add(Creature* pCreature) diff --git a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 3152fa7e621..13b49e17f5c 100644 --- a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -105,7 +105,7 @@ struct boss_four_horsemenAI : public BossAI DoEncounterAction(NULL, false, true, false); if (instance) - instance->SetData(DATA_HORSEMEN0 + id, NOT_STARTED); + instance->SetData(DATA_HORSEMEN0 + id, NOT_STARTED); me->SetReactState(REACT_AGGRESSIVE); uiEventStarterGUID = 0; @@ -279,7 +279,7 @@ struct boss_four_horsemenAI : public BossAI summons.DespawnAll(); if (instance) - instance->SetData(DATA_HORSEMEN0 + id, DONE); + instance->SetData(DATA_HORSEMEN0 + id, DONE); if (instance && DoEncounterAction(NULL, false, false, true)) { diff --git a/src/scripts/northrend/naxxramas/boss_gothik.cpp b/src/scripts/northrend/naxxramas/boss_gothik.cpp index 7af552454b9..ad890a41c21 100644 --- a/src/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/src/scripts/northrend/naxxramas/boss_gothik.cpp @@ -49,7 +49,7 @@ enum Creatures }; struct Waves { uint32 entry, time, mode; }; -// wave setups are not the same in heroic and normal difficulty, +// wave setups are not the same in heroic and normal difficulty, // mode is 0 only normal, 1 both and 2 only heroic // but this is handled in DoGothikSummon function const Waves waves[] = @@ -358,15 +358,15 @@ struct boss_gothikAI : public BossAI switch(spell->Id) { - case SPELL_INFORM_DEAD_TRAINEE: - DoSummon(MOB_DEAD_TRAINEE, pTarget, 0); + case SPELL_INFORM_DEAD_TRAINEE: + DoSummon(MOB_DEAD_TRAINEE, pTarget, 0); break; - case SPELL_INFORM_DEAD_KNIGHT: - DoSummon(MOB_DEAD_KNIGHT, pTarget, 0); + case SPELL_INFORM_DEAD_KNIGHT: + DoSummon(MOB_DEAD_KNIGHT, pTarget, 0); break; - case SPELL_INFORM_DEAD_RIDER: + case SPELL_INFORM_DEAD_RIDER: DoSummon(MOB_DEAD_RIDER, pTarget, 1.0f); - DoSummon(MOB_DEAD_HORSE, pTarget, 1.0f); + DoSummon(MOB_DEAD_HORSE, pTarget, 1.0f); break; } } @@ -488,7 +488,7 @@ struct mob_gothik_minionAI : public CombatAI bool liveSide; bool gateClose; - bool isOnSameSide(const Unit *pWho) + bool isOnSameSide(const Unit *pWho) { return (liveSide == IN_LIVE_SIDE(pWho)); } diff --git a/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp index c6354a8e0ba..a95eddc607d 100644 --- a/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -89,7 +89,7 @@ enum Spells SPELL_BERSERK = 28498, //spells for chained - //warlock + //warlock SPELL_CURSE_OF_AGONY = 47864, SPELL_SHADOW_BOLT = 47809, //shaman @@ -148,7 +148,7 @@ const Position Pos[12] = //creatures in corners //Unstoppable Abominations #define MAX_ABOMINATIONS 21 -const Position PosAbominations[MAX_ABOMINATIONS] = +const Position PosAbominations[MAX_ABOMINATIONS] = { {3755.52, -5155.22, 143.480, 2.0}, {3744.35, -5164.03, 143.590, 2.00}, @@ -175,7 +175,7 @@ const Position PosAbominations[MAX_ABOMINATIONS] = //Soldiers of the Frozen Wastes #define MAX_WASTES 49 -const Position PosWastes[MAX_WASTES] = +const Position PosWastes[MAX_WASTES] = { {3754.41, -5147.24, 143.204, 2.0}, {3754.68, -5156.17, 143.418, 2.0}, @@ -230,7 +230,7 @@ const Position PosWastes[MAX_WASTES] = //Soul Weavers #define MAX_WEAVERS 7 -const Position PosWeavers[MAX_WEAVERS] = +const Position PosWeavers[MAX_WEAVERS] = { {3752.45, -5168.35, 143.562, 1.6094}, {3772.2, -5070.04, 143.329, 1.93686}, @@ -252,9 +252,9 @@ struct NotCharmedTargetSelector : public std::unary_function<Unit *, bool> { struct boss_kelthuzadAI : public BossAI { - boss_kelthuzadAI(Creature* c) : BossAI(c, BOSS_KELTHUZAD), spawns(c) + boss_kelthuzadAI(Creature* c) : BossAI(c, BOSS_KELTHUZAD), spawns(c) { - uiFaction = m_creature->getFaction(); + uiFaction = m_creature->getFaction(); } uint32 Phase; @@ -287,7 +287,7 @@ struct boss_kelthuzadAI : public BossAI if (Player* charmed = Unit::GetPlayer((*itr).first)) charmed->SetFloatValue(OBJECT_FIELD_SCALE_X, (*itr).second); } - + chained.clear(); spawns.DespawnAll(); @@ -406,7 +406,7 @@ struct boss_kelthuzadAI : public BossAI events.PopEvent(); break; case EVENT_TRIGGER: - if (GameObject *pKTTrigger = m_creature->GetMap()->GetGameObject(KTTriggerGUID)) + if (GameObject *pKTTrigger = m_creature->GetMap()->GetGameObject(KTTriggerGUID)) pKTTrigger->SetPhaseMask(2, true); events.PopEvent(); break; @@ -657,7 +657,7 @@ bool AreaTrigger_at_kelthuzad_center(Player* pPlayer, const AreaTriggerEntry *at if (trigger->getLootState() == GO_READY) trigger->UseDoorOrButton(); - // Note: summon must be done by trigger and not by KT. + // Note: summon must be done by trigger and not by KT. // Otherwise, they attack immediately as KT is in combat. for (uint8 i = 0; i <= MAX_ABOMINATIONS; ++i) { diff --git a/src/scripts/northrend/naxxramas/boss_maexxna.cpp b/src/scripts/northrend/naxxramas/boss_maexxna.cpp index 3dd35a93181..fb667186c7f 100644 --- a/src/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/src/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -19,7 +19,7 @@ #include "ScriptedPch.h" #include "naxxramas.h" -enum Spells +enum Spells { SPELL_WEB_WRAP = 28622, SPELL_WEB_SPRAY_10 = 29484, diff --git a/src/scripts/northrend/naxxramas/boss_patchwerk.cpp b/src/scripts/northrend/naxxramas/boss_patchwerk.cpp index 86b05e30505..9caa79c36c7 100644 --- a/src/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/src/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -43,7 +43,7 @@ enum Events EVENT_HATEFUL, EVENT_SLIME }; - + #define ACHIEVEMENT_MAKE_QUICK_WERK_OF_HIM RAID_MODE(1856, 1857) #define MAX_ENCOUNTER_TIME 3 * 60 * 1000 diff --git a/src/scripts/northrend/naxxramas/boss_thaddius.cpp b/src/scripts/northrend/naxxramas/boss_thaddius.cpp index a7ad8368d9f..09ba28f760c 100644 --- a/src/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/src/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -212,7 +212,7 @@ struct boss_thaddiusAI : public BossAI if (!UpdateVictim()) return; - + events.Update(diff); if (me->hasUnitState(UNIT_STAT_CASTING)) @@ -250,7 +250,7 @@ CreatureAI* GetAI_boss_thaddius(Creature* pCreature) struct mob_stalaggAI : public ScriptedAI { - mob_stalaggAI(Creature *c) : ScriptedAI(c) + mob_stalaggAI(Creature *c) : ScriptedAI(c) { pInstance = c->GetInstanceData(); } @@ -301,7 +301,7 @@ struct mob_stalaggAI : public ScriptedAI // reset aggro to be sure that feugen will not follow the jump pFeugen->getThreatManager().modifyThreatPercent(pFeugenVictim, -100); - pFeugenVictim->JumpTo(m_creature, 0.3f); + pFeugenVictim->JumpTo(m_creature, 0.3f); m_creature->getThreatManager().modifyThreatPercent(pStalaggVictim, -100); pStalaggVictim->JumpTo(pFeugen, 0.3f); @@ -329,7 +329,7 @@ CreatureAI* GetAI_mob_stalagg(Creature* pCreature) struct mob_feugenAI : public ScriptedAI { - mob_feugenAI(Creature *c) : ScriptedAI(c) + mob_feugenAI(Creature *c) : ScriptedAI(c) { pInstance = c->GetInstanceData(); } diff --git a/src/scripts/northrend/naxxramas/instance_naxxramas.cpp b/src/scripts/northrend/naxxramas/instance_naxxramas.cpp index 0b21a12e05c..15b3aecace0 100644 --- a/src/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/src/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -126,7 +126,7 @@ struct instance_naxxramas : public InstanceData uint64 uiKelthuzad; uint64 uiKelthuzadTrigger; - uint64 uiPortals[4]; + uint64 uiPortals[4]; time_t minHorsemenDiedTime; time_t maxHorsemenDiedTime; @@ -176,9 +176,9 @@ struct instance_naxxramas : public InstanceData case GO_HORSEMEN_CHEST_HERO: HorsemenChestGUID = add ? pGo->GetGUID() : 0; break; case GO_KELTHUZAD_PORTAL01: uiPortals[0] = pGo->GetGUID(); break; case GO_KELTHUZAD_PORTAL02: uiPortals[1] = pGo->GetGUID(); break; - case GO_KELTHUZAD_PORTAL03: uiPortals[2] = pGo->GetGUID(); break; - case GO_KELTHUZAD_PORTAL04: uiPortals[3] = pGo->GetGUID(); break; - case GO_KELTHUZAD_TRIGGER: uiKelthuzadTrigger = pGo->GetGUID(); break; + case GO_KELTHUZAD_PORTAL03: uiPortals[2] = pGo->GetGUID(); break; + case GO_KELTHUZAD_PORTAL04: uiPortals[3] = pGo->GetGUID(); break; + case GO_KELTHUZAD_TRIGGER: uiKelthuzadTrigger = pGo->GetGUID(); break; } AddDoor(pGo, add); @@ -211,7 +211,7 @@ struct instance_naxxramas : public InstanceData if (minHorsemenDiedTime == 0) minHorsemenDiedTime = now; - + maxHorsemenDiedTime = now; } break; @@ -297,7 +297,7 @@ struct instance_naxxramas : public InstanceData case 7601: // Criteria for achievement 2177: And They Would All Go Down Together 15sec of each other 25-man if (Difficulty(instance->GetSpawnMode()) == RAID_DIFFICULTY_25MAN_NORMAL && (maxHorsemenDiedTime - minHorsemenDiedTime) < 15) return true; - return false; + return false; case 13233: // Criteria for achievement 2186: The Immortal (25-man) // TODO. break; diff --git a/src/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp b/src/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp index c5632f6c181..6728c01b3c0 100644 --- a/src/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp +++ b/src/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp @@ -66,7 +66,7 @@ struct boss_magus_telestraAI : public ScriptedAI uint64 uiFireMagusGUID; uint64 uiFrostMagusGUID; uint64 uiArcaneMagusGUID; - + bool bFireMagusDead; bool bFrostMagusDead; bool bArcaneMagusDead; @@ -98,7 +98,7 @@ struct boss_magus_telestraAI : public ScriptedAI uiAchievementProgress = 0; uiAchievementTimer = 0; - + bIsAchievementTimerRunning = false; bIsWaitingToAppear = false; diff --git a/src/scripts/northrend/nexus/oculus/boss_drakos.cpp b/src/scripts/northrend/nexus/oculus/boss_drakos.cpp index bd98fc43bc0..c19a0468897 100644 --- a/src/scripts/northrend/nexus/oculus/boss_drakos.cpp +++ b/src/scripts/northrend/nexus/oculus/boss_drakos.cpp @@ -52,7 +52,7 @@ struct boss_drakosAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + uint32 uiMagicPullTimer ; uint32 uiStompTimer ; uint32 uiBombSummonTimer ; @@ -73,11 +73,11 @@ struct boss_drakosAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_DRAKOS_EVENT, NOT_STARTED); } - + void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_DRAKOS_EVENT, IN_PROGRESS); } @@ -147,7 +147,7 @@ struct boss_drakosAI : public ScriptedAI void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); - + if (pInstance) pInstance->SetData(DATA_DRAKOS_EVENT, DONE); } diff --git a/src/scripts/northrend/nexus/oculus/boss_eregos.cpp b/src/scripts/northrend/nexus/oculus/boss_eregos.cpp index 2d1a969edce..3f8e920b23f 100644 --- a/src/scripts/northrend/nexus/oculus/boss_eregos.cpp +++ b/src/scripts/northrend/nexus/oculus/boss_eregos.cpp @@ -88,13 +88,13 @@ struct boss_eregosAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_EREGOS_EVENT, NOT_STARTED); } - + void EnterCombat(Unit* who) { if (pInstance) pInstance->SetData(DATA_EREGOS_EVENT, IN_PROGRESS); } - + void AttackStart(Unit* who) {} void MoveInLineOfSight(Unit* who) {} void UpdateAI(const uint32 diff) @@ -105,7 +105,7 @@ struct boss_eregosAI : public ScriptedAI DoMeleeAttackIfReady(); } - + void JustDied(Unit* killer) { if (pInstance) diff --git a/src/scripts/northrend/nexus/oculus/boss_urom.cpp b/src/scripts/northrend/nexus/oculus/boss_urom.cpp index 479fc685f73..6b312232bc9 100644 --- a/src/scripts/northrend/nexus/oculus/boss_urom.cpp +++ b/src/scripts/northrend/nexus/oculus/boss_urom.cpp @@ -51,7 +51,7 @@ struct boss_uromAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance* pInstance; void Reset() @@ -62,11 +62,11 @@ struct boss_uromAI : public ScriptedAI void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_UROM_EVENT, IN_PROGRESS); } - + void AttackStart(Unit* who) {} void MoveInLineOfSight(Unit* who) {} void UpdateAI(const uint32 diff) @@ -80,7 +80,7 @@ struct boss_uromAI : public ScriptedAI void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); - + if (pInstance) pInstance->SetData(DATA_UROM_EVENT, DONE); } diff --git a/src/scripts/northrend/nexus/oculus/boss_varos.cpp b/src/scripts/northrend/nexus/oculus/boss_varos.cpp index e3ef3a477dc..fb640040d43 100644 --- a/src/scripts/northrend/nexus/oculus/boss_varos.cpp +++ b/src/scripts/northrend/nexus/oculus/boss_varos.cpp @@ -49,7 +49,7 @@ struct boss_varosAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance* pInstance; void Reset() @@ -60,7 +60,7 @@ struct boss_varosAI : public ScriptedAI void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_VAROS_EVENT, IN_PROGRESS); } @@ -77,7 +77,7 @@ struct boss_varosAI : public ScriptedAI void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); - + if (pInstance) pInstance->SetData(DATA_VAROS_EVENT, DONE); } diff --git a/src/scripts/northrend/nexus/oculus/instance_oculus.cpp b/src/scripts/northrend/nexus/oculus/instance_oculus.cpp index e5328538b3b..c19e8c509c3 100644 --- a/src/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/src/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -28,15 +28,15 @@ struct instance_oculus : public ScriptedInstance { instance_oculus(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - + uint64 uiDrakos; uint64 uiVaros; uint64 uiUrom; uint64 uiEregos; - + uint8 m_auiEncounter[MAX_ENCOUNTER]; std::string str_data; - + void OnCreatureCreate(Creature* pCreature, bool add) { switch(pCreature->GetEntry()) @@ -55,7 +55,7 @@ struct instance_oculus : public ScriptedInstance break; } } - + void SetData(uint32 type, uint32 data) { switch(type) @@ -77,7 +77,7 @@ struct instance_oculus : public ScriptedInstance if (data == DONE) SaveToDB(); } - + uint32 GetData(uint32 type) { switch(type) @@ -90,7 +90,7 @@ struct instance_oculus : public ScriptedInstance return 0; } - + uint64 GetData64(uint32 identifier) { switch(identifier) @@ -104,7 +104,7 @@ struct instance_oculus : public ScriptedInstance return 0; } - + std::string GetSaveData() { OUT_SAVE_INST_DATA; diff --git a/src/scripts/northrend/nexus/oculus/oculus.cpp b/src/scripts/northrend/nexus/oculus/oculus.cpp index b64c509c54e..e3ac9365daa 100644 --- a/src/scripts/northrend/nexus/oculus/oculus.cpp +++ b/src/scripts/northrend/nexus/oculus/oculus.cpp @@ -165,7 +165,7 @@ bool GossipSelect_npc_oculus_drake(Player* pPlayer, Creature* pCreature, uint32 void AddSC_oculus() { Script *newscript; - + newscript = new Script; newscript->Name = "npc_oculus_drake"; newscript->pGossipHello = &GossipHello_npc_oculus_drake; diff --git a/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index c87687ab721..05eb57afe12 100644 --- a/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -296,7 +296,7 @@ struct boss_sartharionAI : public ScriptedAI 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->SetData(TYPE_SARTHARION_EVENT, DONE); } } @@ -695,20 +695,20 @@ 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 = m_creature->FindNearestGameObject(GO_TWILIGHT_PORTAL,50.0f); - if (GameObject* TwilightPortal = GameObject::GetGameObject((*m_creature), pInstance->GetData64(GO_TWILIGHT_PORTAL))) - TwilightPortal->SetGoState(GO_STATE_ACTIVE); + if (GameObject* TwilightPortal = GameObject::GetGameObject((*m_creature), pInstance->GetData64(GO_TWILIGHT_PORTAL))) + TwilightPortal->SetGoState(GO_STATE_ACTIVE); switch(m_creature->GetEntry()) { case NPC_TENEBRON: { iTextId = WHISPER_HATCH_EGGS; - if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) m_creature->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[0].x, TwilightEggs[0].y, TwilightEggs[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); else m_creature->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggsSarth[0].x, TwilightEggsSarth[0].y, TwilightEggsSarth[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); break; - } + } case NPC_SHADRON: { iTextId = WHISPER_OPEN_PORTAL; @@ -721,7 +721,7 @@ struct dummy_dragonAI : public ScriptedAI } case NPC_VESPERON: { - if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) Creature* Acolyte = m_creature->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); else Creature* Acolyte = m_creature->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); @@ -858,7 +858,7 @@ struct mob_tenebronAI : public dummy_dragonAI OpenPortal(); m_uiHatchEggTimer = 30000; } - else + else m_uiHatchEggTimer -= uiDiff; // shadow breath @@ -1027,7 +1027,7 @@ struct mob_vesperonAI : public dummy_dragonAI if (m_uiAcolyteVesperonTimer <= uiDiff) { OpenPortal(); - DoCast(m_creature->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); + DoCast(m_creature->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); m_uiAcolyteVesperonTimer = urand(60000,70000); } else @@ -1080,10 +1080,10 @@ struct mob_acolyte_of_shadronAI : public ScriptedAI pSartharion->CastSpell(m_creature, SPELL_GIFT_OF_TWILIGTH_SAR, true); else { - pShadron->CastSpell(m_creature, SPELL_GIFT_OF_TWILIGTH_SHA,true); + pShadron->CastSpell(m_creature, SPELL_GIFT_OF_TWILIGTH_SHA,true); pShadron->AddThreat(pTarget, 100.0f); AttackStart(pShadron->getVictim()); - } + } } m_creature->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,m_creature); } @@ -1161,7 +1161,7 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI { if (pInstance) { - m_creature->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,m_creature); + m_creature->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,m_creature); } DoCast(m_creature, SPELL_TWILIGHT_TORMENT_VESP_ACO); } @@ -1175,7 +1175,7 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); - + Map *map = m_creature->GetMap(); if (map->IsDungeon()) { @@ -1194,7 +1194,7 @@ 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_SHIFT); } } @@ -1221,8 +1221,8 @@ CreatureAI* GetAI_mob_acolyte_of_vesperon(Creature* pCreature) struct mob_twilight_eggsAI : public Scripted_NoMovementAI { - mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) - { + mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { pInstance = pCreature->GetInstanceData(); } uint32 m_uiFadeArmorTimer; @@ -1239,7 +1239,7 @@ struct mob_twilight_eggsAI : public Scripted_NoMovementAI { if (!pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) m_creature->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - else + else m_creature->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); m_creature->DealDamage(m_creature, m_creature->GetHealth()); } @@ -1248,9 +1248,9 @@ struct mob_twilight_eggsAI : public Scripted_NoMovementAI if (m_uiHatchEggTimer <= uiDiff) { SpawnWhelps(); - } + } else - m_uiHatchEggTimer -= uiDiff; + m_uiHatchEggTimer -= uiDiff; } void AttackStart(Unit* pWho) {} void MoveInLineOfSight(Unit* pWho) {} diff --git a/src/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/src/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 75395aaa751..a534dbf0340 100644 --- a/src/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/src/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -28,11 +28,11 @@ enum Spells H_SPELL_BALL_LIGHTNING = 59800, SPELL_STATIC_OVERLOAD = 52658, H_SPELL_STATIC_OVERLOAD = 59795, - + SPELL_DISPERSE = 52770, SPELL_SUMMON_SPARK = 52746, SPELL_SPARK_DESPAWN = 52776, - + //Spark of Ionar SPELL_SPARK_VISUAL_TRIGGER = 52667, H_SPELL_SPARK_VISUAL_TRIGGER = 59833 @@ -78,7 +78,7 @@ struct boss_ionarAI : public ScriptedAI bool bIsSplitPhase; bool bHasDispersed; - + uint32 uiSplitTimer; uint32 uiStaticOverloadTimer; @@ -92,7 +92,7 @@ struct boss_ionarAI : public ScriptedAI bIsSplitPhase = true; bHasDispersed = false; - + uiSplitTimer = 25*IN_MILISECONDS; uiStaticOverloadTimer = urand(5*IN_MILISECONDS, 6*IN_MILISECONDS); diff --git a/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index f62f8f9b499..bd655c1ec1a 100644 --- a/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -152,7 +152,7 @@ struct mob_tribuna_controllerAI : public ScriptedAI pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),false); pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),false); } - + KaddrakGUIDList.clear(); } @@ -538,7 +538,7 @@ struct npc_brann_hosAI : public npc_escortAI if (!bHasBeenDamaged) pInstance->DoCompleteAchievement(ACHIEV_BRANN_SPANKIN_NEW); } - + JumpToNextStep(5500); break; case 30: @@ -663,7 +663,7 @@ struct npc_brann_hosAI : public npc_escortAI { DoScriptText(SAY_LOW_HEALTH, m_creature); bIsLowHP = true; - } + } else if (bIsLowHP && !HealthBelowPct(30)) bIsLowHP = false; diff --git a/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 842c4599f69..674500584a7 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -234,24 +234,24 @@ struct boss_algalonAI : public ScriptedAI { switch(uiStep) { - case 1: - DoScriptText(SAY_SUMMON_1, m_creature); + case 1: + DoScriptText(SAY_SUMMON_1, m_creature); JumpToNextStep(3000); - break; - case 2: - DoScriptText(SAY_SUMMON_2, m_creature); + break; + case 2: + DoScriptText(SAY_SUMMON_2, m_creature); JumpToNextStep(3000); - break; - case 3: - DoScriptText(SAY_SUMMON_3, m_creature); + break; + case 3: + DoScriptText(SAY_SUMMON_3, m_creature); JumpToNextStep(3000); - break; - case 4: - DoScriptText(SAY_ENGADED_FOR_FIRTS_TIME, m_creature); + break; + case 4: + DoScriptText(SAY_ENGADED_FOR_FIRTS_TIME, m_creature); JumpToNextStep(3000); - break; - case 5: - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + break; + case 5: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetReactState(REACT_AGGRESSIVE); Summon = true; break; diff --git a/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index d78916564e7..3ffa8f9118b 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -114,7 +114,7 @@ struct boss_kologarnAI : public BossAI // TODO: because we are using hack, he is stunned and cannot cast, so we use triggered for every spell switch(events.GetEvent()) { - case EVENT_NONE: + case EVENT_NONE: break; case EVENT_SMASH: if(left && right) diff --git a/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 34893d2dd41..0ac8f444fa3 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -267,7 +267,7 @@ struct boss_razorscaleAI : public BossAI const float y = -174.92; const float GroundLevel = m_creature->GetBaseMap()->GetHeight(x, y, MAX_HEIGHT); const float FlightHeight = GroundLevel + 4.0f; // TODO: Fly out of range of attacks (442 is sufficient height for this), minus ~(10*number of harpoon gun chains attached to Razorscale) - + if (Phase == 1) // Always flying during Phase 1 IsFlying = true; diff --git a/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp b/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp index a112108389a..21dbe4bf6cd 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp @@ -134,7 +134,7 @@ enum Yells //#define VOID_ZONE_DMG_10 5000 //#define VOID_ZONE_DMG_25 7500 -//#define VOID_ZONE_RADIUS +//#define VOID_ZONE_RADIUS /************************************************ @@ -174,7 +174,7 @@ struct boss_xt002_AI : public BossAI uint32 uiHeartPhaseTimer; uint32 uiSpawnAddTimer; uint32 uiEnrageTimer; - + bool searing_light_active; uint64 uiSearingLightTarget; @@ -360,7 +360,7 @@ struct boss_xt002_AI : public BossAI case 3: m_creature->SummonCreature(NPC_XS013_SCRAPBOT, irand(UL_X - 3, UL_X + 3), irand(UL_Y - 3, UL_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; } } - + //Spawn 5 Scrapbots switch (rand() % 4) { @@ -399,7 +399,7 @@ struct boss_xt002_AI : public BossAI DoMeleeAttackIfReady(); } - + if (gravity_bomb_active) { if (uiGravityBombAuraTimer <= diff) @@ -437,7 +437,7 @@ struct boss_xt002_AI : public BossAI //Summon the heart npc m_creature->SummonCreature(NPC_XT002_HEART, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 7, 0, TEMPSUMMON_TIMED_DESPAWN, TIMER_HEART_PHASE); - + // Start "end of phase 2 timer" uiHeartPhaseTimer = TIMER_HEART_PHASE; @@ -620,7 +620,7 @@ struct mob_pummellerAI : public ScriptedAI { if (!UpdateVictim()) return; - + if (m_creature->IsWithinMeleeRange(m_creature->getVictim())) { if (uiArcingSmashTimer <= diff) diff --git a/src/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/src/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index ea84ecb6670..7e7d176f0a5 100644 --- a/src/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/src/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -320,7 +320,7 @@ struct instance_ulduar : public ScriptedInstance for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { loadStream >> m_auiEncounter[i]; - + if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; } diff --git a/src/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp b/src/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp index 5f0bd54b983..4f4320fc5b0 100644 --- a/src/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp +++ b/src/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp @@ -169,9 +169,9 @@ struct boss_ingvar_the_plundererAI : public ScriptedAI void KilledUnit(Unit *victim) { - if (bIsUndead) + if (bIsUndead) DoScriptText(YELL_KILL_1,m_creature); - else + else DoScriptText(YELL_KILL_2,m_creature); } @@ -351,7 +351,7 @@ struct mob_annhylde_the_callerAI : public ScriptedAI } uiResurectTimer = 3000; uiResurectPhase = 2; - } + } else if (uiResurectPhase == 2) { if (Creature* ingvar = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_INGVAR) : 0)) diff --git a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp index 36a0f237787..c792b03179b 100644 --- a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp +++ b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp @@ -47,7 +47,7 @@ struct Locations { float x, y, z; }; - + struct Locations moveLocs[]= { {261.6,-449.3,109.5}, @@ -57,7 +57,7 @@ struct Locations moveLocs[]= {310.0,-453.4,109.5}, {238.6,-460.7,109.5} }; - + enum Phase { PHASE_FRENZIED_WORGEN, @@ -92,11 +92,11 @@ struct boss_palehoofAI : public ScriptedAI uiWhiteringRoarTimer = 10000; m_creature->GetMotionMaster()->MoveTargetedHome(); - + for(uint32 i=0;i<4;i++) DoneAdds[i]=false; AddCount=0; - + currentPhase=PHASE_NONE; if (pInstance) @@ -125,15 +125,15 @@ struct boss_palehoofAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); } - + void AttackStart(Unit* who) { if (!who) return; - + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; - + if (m_creature->Attack(who, true)) { m_creature->AddThreat(who, 0.0f); @@ -150,30 +150,30 @@ struct boss_palehoofAI : public ScriptedAI //Return since we have no target if (!UpdateVictim()) return; - + Creature* pTemp = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_MOB_ORB) : 0); if (pTemp && pTemp->isAlive()) pTemp->DisappearAndDie(); - + if (uiArcingSmashTimer <= diff) { DoCast(m_creature, SPELL_ARCING_SMASH); uiArcingSmashTimer = urand(13000,17000); } else uiArcingSmashTimer -= diff; - + if (uiImpaleTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, DUNGEON_MODE(SPELL_IMPALE, H_SPELL_IMPALE)); uiImpaleTimer = urand(8000,12000); } else uiImpaleTimer -= diff; - + if (uiWhiteringRoarTimer <= diff) { DoCast(m_creature, DUNGEON_MODE(SPELL_WITHERING_ROAR, H_SPELL_WITHERING_ROAR)); uiWhiteringRoarTimer = urand(8000,12000); } else uiWhiteringRoarTimer -= diff; - + DoMeleeAttackIfReady(); } @@ -229,7 +229,7 @@ struct boss_palehoofAI : public ScriptedAI } currentPhase = move; } - + void JustReachedHome() { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); @@ -272,7 +272,7 @@ struct mob_ravenous_furbolgAI : public ScriptedAI uiTerrifyingRoarTimer = 15000; m_creature->GetMotionMaster()->MoveTargetedHome(); - + if (pInstance) if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) { @@ -335,7 +335,7 @@ struct mob_ravenous_furbolgAI : public ScriptedAI CAST_AI(boss_palehoofAI, pPalehoof->AI())->NextPhase(); } } - + void JustReachedHome() { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); @@ -378,7 +378,7 @@ struct mob_frenzied_worgenAI : public ScriptedAI uint32 uiEnrage2Timer = 10000; m_creature->GetMotionMaster()->MoveTargetedHome(); - + if (pInstance) if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) { @@ -443,7 +443,7 @@ struct mob_frenzied_worgenAI : public ScriptedAI CAST_AI(boss_palehoofAI, pPalehoof->AI())->NextPhase(); } } - + void JustReachedHome() { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); @@ -487,7 +487,7 @@ struct mob_ferocious_rhinoAI : public ScriptedAI uiGrievousWoundTimer = 20000; m_creature->GetMotionMaster()->MoveTargetedHome(); - + if (pInstance) if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) { @@ -551,7 +551,7 @@ struct mob_ferocious_rhinoAI : public ScriptedAI CAST_AI(boss_palehoofAI, pPalehoof->AI())->NextPhase(); } } - + void JustReachedHome() { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); @@ -600,7 +600,7 @@ struct mob_massive_jormungarAI : public ScriptedAI uiPoisonBreathTimer = 10000; m_creature->GetMotionMaster()->MoveTargetedHome(); - + if (pInstance) if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS) { @@ -665,7 +665,7 @@ struct mob_massive_jormungarAI : public ScriptedAI CAST_AI(boss_palehoofAI,pPalehoof->AI())->NextPhase(); } } - + void JustReachedHome() { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); @@ -726,7 +726,7 @@ struct mob_palehoof_orbAI : public ScriptedAI pNext->SetStandState(UNIT_STAND_STATE_STAND); pNext->SetInCombatWithZone(); pNext->Attack(pNext->SelectNearestTarget(100),true); - + } currentPhase=PHASE_NONE; } @@ -809,12 +809,12 @@ void AddSC_boss_palehoof() newscript->GetAI = &GetAI_mob_massive_jormungar; newscript->RegisterSelf(); - + newscript = new Script; newscript->Name = "mob_palehoof_orb"; newscript->GetAI = &GetAI_mob_palehoof_orb; newscript->RegisterSelf(); - + newscript = new Script; newscript->Name = "go_palehoof_sphere"; diff --git a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index f90711c3858..204998ee3b7 100644 --- a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -186,7 +186,7 @@ struct boss_svalaAI : public ScriptedAI uiArthasGUID = 0; Phase = FINISHED; } - else + else Reset(); break; } @@ -247,7 +247,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI uiCallFlamesTimer = 10*IN_MILISECONDS; uiRitualOfSwordTimer = 20*IN_MILISECONDS; uiSacrificeTimer = 8*IN_MILISECONDS; - + bSacrificed = false; Phase = NORMAL; @@ -320,7 +320,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI if (pInstance) { pInstance->SetData64(DATA_SACRIFICED_PLAYER,pSacrificeTarget->GetGUID()); - + for (uint8 i = 0; i < 3; ++i) if (Creature* pSummon = m_creature->SummonCreature(CREATURE_RITUAL_CHANNELER, RitualChannelerPos[i], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000)) pSummon->AI()->DoAction(0); diff --git a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp index b5b7ccc8a32..69e608a8f3c 100644 --- a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp +++ b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp @@ -52,17 +52,17 @@ struct instance_pinnacle : public ScriptedInstance uiGortokPalehoof = 0; uiSkadiTheRuthless = 0; uiKingYmiron = 0; - + uiSkadiTheRuthlessDoor = 0; uiKingYmironDoor = 0; uiGortokPalehoofSphere = 0; - + uiFrenziedWorgen = 0; uiRavenousFurbolg = 0; uiFerociousRhino = 0; uiMassiveJormungar = 0; uiPalehoofOrb = 0; - + uiSvala = 0; uiSacrificedPlayer = 0; } diff --git a/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp index e4479bf5692..52de285ac76 100644 --- a/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -24,7 +24,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_flame_warder' WHERE `entry`='35 #include "ScriptedPch.h" #include "vault_of_archavon.h" -enum Events +enum Events { EVENT_NONE, diff --git a/src/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/src/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp index 3738dc4db22..b37da980936 100644 --- a/src/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp +++ b/src/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -35,7 +35,7 @@ struct instance_archavon : public ScriptedInstance bool IsEncounterInProgress() const { for (uint8 i = 0; i < ENCOUNTERS; i++) - if (uiEncounters[i] == IN_PROGRESS) + if (uiEncounters[i] == IN_PROGRESS) return true; return false; @@ -123,7 +123,7 @@ struct instance_archavon : public ScriptedInstance for (uint8 i = 0; i < ENCOUNTERS; ++i) if (uiEncounters[i] == IN_PROGRESS) uiEncounters[i] = NOT_STARTED; - + OUT_LOAD_INST_DATA_COMPLETE; } }; diff --git a/src/scripts/northrend/violet_hold/boss_ichoron.cpp b/src/scripts/northrend/violet_hold/boss_ichoron.cpp index 196a71d82f6..7cc4f983020 100644 --- a/src/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/src/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -304,7 +304,7 @@ struct boss_ichoronAI : public ScriptedAI } - void SummonedCreatureDespawn(Creature *pSummoned) + void SummonedCreatureDespawn(Creature *pSummoned) { m_waterElements.remove(pSummoned->GetGUID()); } diff --git a/src/scripts/northrend/violet_hold/instance_violet_hold.cpp b/src/scripts/northrend/violet_hold/instance_violet_hold.cpp index fb0a96942a6..3f1676d6594 100644 --- a/src/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/src/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -349,7 +349,7 @@ struct instance_violet_hold : public ScriptedInstance break; case 12: if (uiSecondBoss == 0) - do + do { uiSecondBoss = urand(1,6); } while (uiSecondBoss == uiFirstBoss); @@ -408,7 +408,7 @@ struct instance_violet_hold : public ScriptedInstance OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << "V H " << (uint16)m_auiEncounter[0] + saveStream << "V H " << (uint16)m_auiEncounter[0] << " " << (uint16)m_auiEncounter[1] << " " << (uint16)m_auiEncounter[2] << " " << (uint16)uiFirstBoss diff --git a/src/scripts/northrend/violet_hold/violet_hold.cpp b/src/scripts/northrend/violet_hold/violet_hold.cpp index 16c53b937e9..42a9e11aec2 100644 --- a/src/scripts/northrend/violet_hold/violet_hold.cpp +++ b/src/scripts/northrend/violet_hold/violet_hold.cpp @@ -226,7 +226,7 @@ struct npc_teleportation_portalAI : public ScriptedAI pSummon->GetMotionMaster()->MovePoint(0, DoorPosition); } } - else + else { bPortalGuardianOrKeeperSpawn = true; uint32 entry = RAND(CREATURE_PORTAL_GUARDIAN, CREATURE_PORTAL_KEEPER); diff --git a/src/scripts/northrend/zuldrak.cpp b/src/scripts/northrend/zuldrak.cpp index d5b35b3ed5f..db57b4674e0 100644 --- a/src/scripts/northrend/zuldrak.cpp +++ b/src/scripts/northrend/zuldrak.cpp @@ -527,7 +527,7 @@ struct npc_orinoko_tuskbreakerAI : public ScriptedAI { DoScriptText(SAY_CALL_FOR_HELP ,m_creature); //DoCast(m_creature->getVictim(), SPELL_SUMMON_WHISKER); petai is not working correctly??? - + if (Creature *pWhisker = m_creature->SummonCreature(NPC_WHISKER, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0)) uiWhisker = pWhisker->GetGUID(); bSummoned = true; @@ -929,16 +929,16 @@ struct npc_crusade_recruitAI : public ScriptedAI uint8 m_uiPhase; //The current phase we are in uint32 m_uiTimer; //Timer until phase transition float m_heading; //Store creature heading - + void Reset() { m_uiTimer = 0; m_uiPhase = 0; m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER); - m_heading = m_creature->GetOrientation(); + m_heading = m_creature->GetOrientation(); } - + void UpdateAI(const uint32 uiDiff) { if (m_uiPhase) @@ -950,11 +950,11 @@ struct npc_crusade_recruitAI : public ScriptedAI case 1: // say random text m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); - DoScriptText(RAND(SAY_RECRUIT_1,SAY_RECRUIT_2,SAY_RECRUIT_3), m_creature); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); + DoScriptText(RAND(SAY_RECRUIT_1,SAY_RECRUIT_2,SAY_RECRUIT_3), m_creature); m_uiTimer = 3000; m_uiPhase = 2; - break; + break; case 2: // walk forward m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); @@ -973,8 +973,8 @@ struct npc_crusade_recruitAI : public ScriptedAI else m_uiTimer -= uiDiff; } - ScriptedAI::UpdateAI(uiDiff); - + ScriptedAI::UpdateAI(uiDiff); + if (!UpdateVictim()) return; } @@ -986,7 +986,7 @@ CreatureAI* GetAI_npc_crusade_recruit(Creature* pCreature) } bool GossipHello_npc_crusade_recruit(Player* pPlayer, Creature* pCreature) -{ +{ if (pPlayer->GetQuestStatus(QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); |
