diff options
Diffstat (limited to 'src/scripts/northrend')
32 files changed, 123 insertions, 123 deletions
diff --git a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp index 934450ea370..b5c4981878a 100644 --- a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp +++ b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp @@ -207,7 +207,7 @@ struct boss_volazjAI : public ScriptedAI // Check if all summons in this phase killed for (SummonList::const_iterator iter = Summons.begin(); iter!=Summons.end(); ++iter) { - if(Creature *visage = Unit::GetCreature(*m_creature, *iter)) + if (Creature *visage = Unit::GetCreature(*m_creature, *iter)) { // Not all are dead if (phase == visage->GetPhaseMask()) 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 53a2a8473b2..74561cd5865 100644 --- a/src/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp +++ b/src/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp @@ -279,7 +279,7 @@ struct boss_taldaramAI : public ScriptedAI bool CheckSpheres() { - if(!pInstance) + if (!pInstance) return false; uint64 uiSphereGuids[2]; @@ -308,7 +308,7 @@ struct boss_taldaramAI : public ScriptedAI void RemovePrison() { - if(!pInstance) + if (!pInstance) return; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 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 6a6a4cbadd1..bd7430d6958 100644 --- a/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp +++ b/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp @@ -153,7 +153,7 @@ struct boss_anub_arakAI : public ScriptedAI bGuardianSummoned = true; } - if(!bVenomancerSummoned) + if (!bVenomancerSummoned) { if (uiVenomancerTimer <= diff) { @@ -172,7 +172,7 @@ struct boss_anub_arakAI : public ScriptedAI } else uiVenomancerTimer -= diff; } - if(!bDatterSummoned) + if (!bDatterSummoned) { if (uiDatterTimer <= diff) { diff --git a/src/scripts/northrend/borean_tundra.cpp b/src/scripts/northrend/borean_tundra.cpp index f6075c7404d..bbebd070998 100644 --- a/src/scripts/northrend/borean_tundra.cpp +++ b/src/scripts/northrend/borean_tundra.cpp @@ -283,7 +283,7 @@ struct npc_sinkhole_kill_creditAI : public ScriptedAI break; case 7: DoCast(m_creature, SPELL_EXPLODE_CART, true); - if(Player *caster = Unit::GetPlayer(casterGuid)) + if (Player *caster = Unit::GetPlayer(casterGuid)) caster->KilledMonster(m_creature->GetCreatureInfo(),m_creature->GetGUID()); uiPhaseTimer = 5000; Phase = 8; @@ -539,7 +539,7 @@ struct npc_jennyAI : public ScriptedAI void Reset() { - if(!setCrateNumber) + if (!setCrateNumber) setCrateNumber = true; m_creature->SetReactState(REACT_PASSIVE); @@ -563,7 +563,7 @@ struct npc_jennyAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(setCrateNumber) + if (setCrateNumber) { m_creature->AddAura(SPELL_CRATES_CARRIED,m_creature); setCrateNumber = false; @@ -877,7 +877,7 @@ bool QuestAccept_npc_lurgglbr(Player* pPlayer, Creature* pCreature, Quest const { if (pQuest->GetQuestId() == QUEST_ESCAPE_WINTERFIN_CAVERNS) { - if(GameObject* pGo = pCreature->FindNearestGameObject(GO_CAGE, 5.0f)) + if (GameObject* pGo = pCreature->FindNearestGameObject(GO_CAGE, 5.0f)) { pGo->SetRespawnTime(0); pGo->SetGoType(GAMEOBJECT_TYPE_BUTTON); @@ -1432,7 +1432,7 @@ struct npc_counselor_talbotAI : public ScriptedAI } void MovementInform(uint32 uiType, uint32 uiId) { - if(uiType != POINT_MOTION_TYPE) + if (uiType != POINT_MOTION_TYPE) return; if (m_creature->isSummon()) @@ -1485,7 +1485,7 @@ struct npc_counselor_talbotAI : public ScriptedAI Creature *pLeryssa = Unit::GetCreature(*m_creature, LeryssaGUID); Creature *pArlos = Unit::GetCreature(*m_creature, ArlosGUID); - if(!pLeryssa || !pArlos) + if (!pLeryssa || !pArlos) return; DoScriptText(SAY_ARLOS_1, pArlos); @@ -1529,7 +1529,7 @@ struct npc_leryssaAI : public ScriptedAI void MovementInform(uint32 uiType, uint32 uiId) { - if(uiType != POINT_MOTION_TYPE) + if (uiType != POINT_MOTION_TYPE) return; if (!bDone) @@ -1967,7 +1967,7 @@ struct npc_bonker_togglevoltAI : public npc_escortAI { if (GetAttack() && UpdateVictim()) { - if(Bonker_agro==0) + if (Bonker_agro==0) { DoScriptText(SAY_bonker_1,m_creature); Bonker_agro++; @@ -2187,12 +2187,12 @@ struct npc_seaforium_depth_chargeAI : public ScriptedAI 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 + if (Creature* cCredit = m_creature->FindNearestCreature(25402 + i, 10.0f))//25402-25405 credit markers { - if(Unit* uOwner = m_creature->GetOwner(true)) + if (Unit* uOwner = m_creature->GetOwner(true)) { Player* pOwner = uOwner->ToPlayer(); - if(pOwner && pOwner->GetQuestStatus(QUEST_BURY_THOSE_COCKROACHES) == QUEST_STATUS_INCOMPLETE) + if (pOwner && pOwner->GetQuestStatus(QUEST_BURY_THOSE_COCKROACHES) == QUEST_STATUS_INCOMPLETE) pOwner->KilledMonsterCredit(cCredit->GetEntry(),cCredit->GetGUID()); } } diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index f337eac0c81..06d47789f57 100644 --- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -92,17 +92,17 @@ void AggroAllPlayers(Creature* pTemp) { Map::PlayerList const &PlList = pTemp->GetMap()->GetPlayers(); - if(PlList.isEmpty()) + if (PlList.isEmpty()) return; for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) { - if(Player* pPlayer = i->getSource()) + if (Player* pPlayer = i->getSource()) { - if(pPlayer->isGameMaster()) + if (pPlayer->isGameMaster()) continue; - if(pPlayer->isAlive()) + if (pPlayer->isAlive()) { pTemp->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE); pTemp->SetReactState(REACT_AGGRESSIVE); diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 9ef8d15a509..030257a0605 100644 --- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -373,17 +373,17 @@ struct npc_announcer_toc5AI : public ScriptedAI { Map::PlayerList const &PlList = m_creature->GetMap()->GetPlayers(); - if(PlList.isEmpty()) + if (PlList.isEmpty()) return; for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) { - if(Player* pPlayer = i->getSource()) + if (Player* pPlayer = i->getSource()) { - if(pPlayer->isGameMaster()) + if (pPlayer->isGameMaster()) continue; - if(pPlayer->isAlive()) + if (pPlayer->isAlive()) { pTemp->SetHomePosition(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation()); pTemp->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE); diff --git a/src/scripts/northrend/draktharon_keep/boss_novos.cpp b/src/scripts/northrend/draktharon_keep/boss_novos.cpp index 0188228ee61..d327d0f6c9d 100644 --- a/src/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/src/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -281,7 +281,7 @@ struct mob_novos_minionAI : public ScriptedAI void MovementInform(uint32 type, uint32 id) { - if(type != POINT_MOTION_TYPE || id !=0) + if (type != POINT_MOTION_TYPE || id !=0) return; if (Creature* pNovos = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_NOVOS) : 0)) { diff --git a/src/scripts/northrend/gundrak/boss_drakkari_colossus.cpp b/src/scripts/northrend/gundrak/boss_drakkari_colossus.cpp index 25493d708a4..80c91012db2 100644 --- a/src/scripts/northrend/gundrak/boss_drakkari_colossus.cpp +++ b/src/scripts/northrend/gundrak/boss_drakkari_colossus.cpp @@ -54,7 +54,7 @@ struct boss_drakkari_colossusAI : public ScriptedAI { if (pInstance) pInstance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, NOT_STARTED); - if(!m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + if (!m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->clearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT); @@ -177,10 +177,10 @@ struct boss_drakkari_elementalAI : public ScriptedAI void UpdateAI(const uint32 diff) { //Return since we have no target - if(!UpdateVictim()) + if (!UpdateVictim()) return; - if(!bGoToColossus && HealthBelowPct(50)) + if (!bGoToColossus && HealthBelowPct(50)) { if (Creature *pColossus = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_DRAKKARI_COLOSSUS) : 0)) { diff --git a/src/scripts/northrend/gundrak/boss_eck.cpp b/src/scripts/northrend/gundrak/boss_eck.cpp index 383b93126c2..45aa8e84720 100644 --- a/src/scripts/northrend/gundrak/boss_eck.cpp +++ b/src/scripts/northrend/gundrak/boss_eck.cpp @@ -86,7 +86,7 @@ struct boss_eckAI : public ScriptedAI if (uiSpringTimer <= diff) { Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1); - if(pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + 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); @@ -138,7 +138,7 @@ struct npc_ruins_dwellerAI : public ScriptedAI void JustDied(Unit *who) { - if(pInstance) + if (pInstance) { pInstance->SetData64(DATA_RUIN_DWELLER_DIED,m_creature->GetGUID()); if (pInstance->GetData(DATA_ALIVE_RUIN_DWELLERS) == 0) diff --git a/src/scripts/northrend/gundrak/boss_moorabi.cpp b/src/scripts/northrend/gundrak/boss_moorabi.cpp index f0f972fe078..f10fd2091f1 100644 --- a/src/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/src/scripts/northrend/gundrak/boss_moorabi.cpp @@ -92,7 +92,7 @@ struct boss_moorabiAI : public ScriptedAI if (!UpdateVictim()) return; - if(!bPhase && m_creature->HasAura(SPELL_TRANSFORMATION)) + if (!bPhase && m_creature->HasAura(SPELL_TRANSFORMATION)) { bPhase = true; m_creature->RemoveAura(SPELL_MOJO_FRENZY); diff --git a/src/scripts/northrend/howling_fjord.cpp b/src/scripts/northrend/howling_fjord.cpp index cb534aeb6f1..0e9821c5e70 100644 --- a/src/scripts/northrend/howling_fjord.cpp +++ b/src/scripts/northrend/howling_fjord.cpp @@ -80,7 +80,7 @@ struct npc_Apothecary_HanesAI : public npc_escortAI void UpdateEscortAI(const uint32 diff) { - if(HealthBelowPct(75)) + if (HealthBelowPct(75)) { if (PotTimer <= diff) { @@ -166,9 +166,9 @@ struct npc_plaguehound_trackerAI : public npc_escortAI void InitScriptData() { Player* pPlayer = NULL; - if(me->isSummon()) - if(Unit* summoner = CAST_SUM(me)->GetSummoner()) - if(summoner->GetTypeId() == TYPEID_PLAYER) + if (me->isSummon()) + if (Unit* summoner = CAST_SUM(me)->GetSummoner()) + if (summoner->GetTypeId() == TYPEID_PLAYER) pPlayer = CAST_PLR(summoner); if (!pPlayer) @@ -181,9 +181,9 @@ struct npc_plaguehound_trackerAI : public npc_escortAI void WaypointReached(uint32 i) { Player* pPlayer = NULL; - if(me->isSummon()) - if(Unit* summoner = CAST_SUM(me)->GetSummoner()) - if(summoner->GetTypeId() == TYPEID_PLAYER) + if (me->isSummon()) + if (Unit* summoner = CAST_SUM(me)->GetSummoner()) + if (summoner->GetTypeId() == TYPEID_PLAYER) pPlayer = CAST_PLR(summoner); if (!pPlayer) @@ -285,7 +285,7 @@ enum eMcGoyver bool GossipHello_npc_mcgoyver(Player* pPlayer, Creature* pCreature) { - if(pPlayer->GetQuestStatus(QUEST_WE_CAN_REBUILD_IT) == QUEST_STATUS_INCOMPLETE) + if (pPlayer->GetQuestStatus(QUEST_WE_CAN_REBUILD_IT) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MG_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); diff --git a/src/scripts/northrend/naxxramas/boss_patchwerk.cpp b/src/scripts/northrend/naxxramas/boss_patchwerk.cpp index dad2ed5f4ff..436af04438d 100644 --- a/src/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/src/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -66,13 +66,13 @@ struct boss_patchwerkAI : public BossAI _JustDied(); DoScriptText(SAY_DEATH, me); - if(EncounterTime <= MAX_ENCOUNTER_TIME) + if (EncounterTime <= MAX_ENCOUNTER_TIME) { AchievementEntry const *AchievMakeQuickWerkOfHim = GetAchievementStore()->LookupEntry(ACHIEVEMENT_MAKE_QUICK_WERK_OF_HIM); - if(AchievMakeQuickWerkOfHim) + if (AchievMakeQuickWerkOfHim) { Map *pMap = m_creature->GetMap(); - if(pMap && pMap->IsDungeon()) + if (pMap && pMap->IsDungeon()) { Map::PlayerList const &players = pMap->GetPlayers(); for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) diff --git a/src/scripts/northrend/naxxramas/boss_razuvious.cpp b/src/scripts/northrend/naxxramas/boss_razuvious.cpp index 2575457aeac..8c82ab82726 100644 --- a/src/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/src/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -66,7 +66,7 @@ struct boss_razuviousAI : public BossAI void DamageTaken(Unit* pDone_by, uint32& uiDamage) { // Damage done by the controlled Death Knight understudies should also count toward damage done by players - if(pDone_by->GetTypeId() == TYPEID_UNIT && (pDone_by->GetEntry() == 16803 || pDone_by->GetEntry() == 29941)) + if (pDone_by->GetTypeId() == TYPEID_UNIT && (pDone_by->GetEntry() == 16803 || pDone_by->GetEntry() == 29941)) { me->LowerPlayerDamageReq(uiDamage); } diff --git a/src/scripts/northrend/naxxramas/boss_sapphiron.cpp b/src/scripts/northrend/naxxramas/boss_sapphiron.cpp index 964810b340d..eba60190492 100644 --- a/src/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/src/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -142,12 +142,12 @@ struct boss_sapphironAI : public BossAI me->CastSpell(me, SPELL_DIES, true); CheckPlayersFrostResist(); - if(CanTheHundredClub) + if (CanTheHundredClub) { AchievementEntry const *AchievTheHundredClub = GetAchievementStore()->LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB); - if(AchievTheHundredClub) + if (AchievTheHundredClub) { - if(pMap && pMap->IsDungeon()) + if (pMap && pMap->IsDungeon()) { Map::PlayerList const &players = pMap->GetPlayers(); for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) @@ -174,12 +174,12 @@ struct boss_sapphironAI : public BossAI void CheckPlayersFrostResist() { - if(CanTheHundredClub && pMap && pMap->IsDungeon()) + if (CanTheHundredClub && pMap && pMap->IsDungeon()) { Map::PlayerList const &players = pMap->GetPlayers(); for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { - if(itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE) + if (itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE) { CanTheHundredClub = false; break; @@ -222,7 +222,7 @@ struct boss_sapphironAI : public BossAI if (phase != PHASE_BIRTH && !UpdateCombatState() || !CheckInRoom()) return; - if(CanTheHundredClub) + if (CanTheHundredClub) { if (CheckFrostResistTimer <= diff) { diff --git a/src/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/src/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 541466fc238..a3b48aff667 100644 --- a/src/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/src/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -114,7 +114,7 @@ struct boss_keristraszaAI : public ScriptedAI bool CheckContainmentSpheres(bool remove_prison = false) { - if(!pInstance) + if (!pInstance) return false; auiContainmentSphereGUIDs[0] = pInstance->GetData64(ANOMALUS_CONTAINMET_SPHERE); diff --git a/src/scripts/northrend/nexus/oculus/boss_drakos.cpp b/src/scripts/northrend/nexus/oculus/boss_drakos.cpp index c19a0468897..7003bcc58d7 100644 --- a/src/scripts/northrend/nexus/oculus/boss_drakos.cpp +++ b/src/scripts/northrend/nexus/oculus/boss_drakos.cpp @@ -92,9 +92,9 @@ struct boss_drakosAI : public ScriptedAI if (!UpdateVictim()) return; - if(uiBombSummonTimer < diff) + if (uiBombSummonTimer < diff) { - if(bPostPull) + if (bPostPull) { m_creature->SummonCreature(NPC_UNSTABLE_SPHERE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); m_creature->SummonCreature(NPC_UNSTABLE_SPHERE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); @@ -104,9 +104,9 @@ struct boss_drakosAI : public ScriptedAI uiBombSummonTimer = 2*IN_MILISECONDS; } else uiBombSummonTimer -= diff; - if(uiMagicPullTimer < diff) + if (uiMagicPullTimer < diff) { - if(bIsPulling) + if (bIsPulling) { if (pInstance) { @@ -128,14 +128,14 @@ struct boss_drakosAI : public ScriptedAI } } else uiMagicPullTimer -= diff; - if(bPostPull) + if (bPostPull) { if (uiPostPullTimer < diff) bPostPull = false; else uiPostPullTimer -= diff; } - if(uiStompTimer < diff) + if (uiStompTimer < diff) { DoScriptText(RAND(SAY_STOMP_1,SAY_STOMP_2,SAY_STOMP_3), m_creature); DoCast(DUNGEON_MODE(SPELL_THUNDERING_STOMP, SPELL_THUNDERING_STOMP_H)); @@ -183,13 +183,13 @@ struct npc_unstable_sphereAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(uiPulseTimer < diff) + if (uiPulseTimer < diff) { DoCast(SPELL_UNSTABLE_SPHERE_PULSE); uiPulseTimer = 3*IN_MILISECONDS; } else uiPulseTimer -= diff; - if(uiDeathTimer < diff) + if (uiDeathTimer < diff) m_creature->DisappearAndDie(); else uiDeathTimer -= diff; } diff --git a/src/scripts/northrend/nexus/oculus/oculus.cpp b/src/scripts/northrend/nexus/oculus/oculus.cpp index e3ac9365daa..27ea4ec1218 100644 --- a/src/scripts/northrend/nexus/oculus/oculus.cpp +++ b/src/scripts/northrend/nexus/oculus/oculus.cpp @@ -54,7 +54,7 @@ bool GossipHello_npc_oculus_drake(Player* pPlayer, Creature* pCreature) if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - if(pCreature->GetInstanceData()->GetData(DATA_DRAKOS_EVENT) == DONE) + if (pCreature->GetInstanceData()->GetData(DATA_DRAKOS_EVENT) == DONE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DRAKES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DRAKES, pCreature->GetGUID()); @@ -71,7 +71,7 @@ bool GossipSelect_npc_oculus_drake(Player* pPlayer, Creature* pCreature, uint32 switch(uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: - if(!HAS_ESSENCE(pPlayer)) + if (!HAS_ESSENCE(pPlayer)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); @@ -101,7 +101,7 @@ bool GossipSelect_npc_oculus_drake(Player* pPlayer, Creature* pCreature, uint32 switch(uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: - if(!HAS_ESSENCE(pPlayer)) + if (!HAS_ESSENCE(pPlayer)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); @@ -131,7 +131,7 @@ bool GossipSelect_npc_oculus_drake(Player* pPlayer, Creature* pCreature, uint32 switch(uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: - if(!HAS_ESSENCE(pPlayer)) + if (!HAS_ESSENCE(pPlayer)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); diff --git a/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 05eb57afe12..fc469ea0f95 100644 --- a/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/src/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -320,7 +320,7 @@ struct boss_sartharionAI : public ScriptedAI void FetchDragons() { - if(!pInstance) + if (!pInstance) return; Creature* pFetchTene = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_TENEBRON)); Creature* pFetchShad = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_SHADRON)); @@ -517,7 +517,7 @@ struct boss_sartharionAI : public ScriptedAI { DoCast(pTarget, SPELL_LAVA_STRIKE); - if(urand(0,4) == 4) + if (urand(0,4) == 4) DoScriptText(RAND(SAY_SARTHARION_SPECIAL_1,SAY_SARTHARION_SPECIAL_2,SAY_SARTHARION_SPECIAL_3), m_creature); } m_uiLavaStrikeTimer = urand(5000,20000); @@ -712,7 +712,7 @@ struct dummy_dragonAI : public ScriptedAI case NPC_SHADRON: { iTextId = WHISPER_OPEN_PORTAL; - if(pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) m_creature->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); else m_creature->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); @@ -786,7 +786,7 @@ struct dummy_dragonAI : public ScriptedAI { if (m_uiMoveNextTimer <= uiDiff) { - if(m_uiWaypointId < MAX_WAYPOINT) + if (m_uiWaypointId < MAX_WAYPOINT) m_creature->GetMotionMaster()->MovePoint(m_uiWaypointId, m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ); diff --git a/src/scripts/northrend/storm_peaks.cpp b/src/scripts/northrend/storm_peaks.cpp index 18c02d96777..6d5440dba25 100644 --- a/src/scripts/northrend/storm_peaks.cpp +++ b/src/scripts/northrend/storm_peaks.cpp @@ -186,9 +186,9 @@ struct npc_goblin_prisonerAI : public ScriptedAI { m_creature->SetReactState(REACT_PASSIVE); - if(GameObject* pGO = m_creature->FindNearestGameObject(GO_RUSTY_CAGE,5.0f)) + if (GameObject* pGO = m_creature->FindNearestGameObject(GO_RUSTY_CAGE,5.0f)) { - if(pGO->GetGoState() == GO_STATE_ACTIVE) + if (pGO->GetGoState() == GO_STATE_ACTIVE) pGO->SetGoState(GO_STATE_READY); } } @@ -236,13 +236,13 @@ struct npc_victorious_challengerAI : public ScriptedAI if (!UpdateVictim()) return; - if(RendTimer < diff) + if (RendTimer < diff) { DoCast(m_creature->getVictim(), SPELL_REND_VC, true); RendTimer = 15000; }else RendTimer -= diff; - if(SunderArmorTimer < diff) + if (SunderArmorTimer < diff) { DoCast(m_creature->getVictim(), SPELL_SUNDER_ARMOR, true); SunderArmorTimer = 10000; @@ -260,7 +260,7 @@ struct npc_victorious_challengerAI : public ScriptedAI bool GossipHello_npc_victorious_challenger(Player* pPlayer, Creature* pCreature) { - if(pCreature->isQuestGiver()) + if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); if (pPlayer->GetQuestStatus(QUEST_TAKING_ALL_CHALLENGERS) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_DEFENDING_YOUR_TITLE) == QUEST_STATUS_INCOMPLETE) diff --git a/src/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/src/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index e97ede02101..4b098b5f288 100644 --- a/src/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/src/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -100,7 +100,7 @@ struct boss_maiden_of_griefAI : public ScriptedAI { Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(pTarget) + if (pTarget) DoCast(pTarget, SPELL_PARTING_SORROW); PartingSorrowTimer = 30000 + rand()%10000; diff --git a/src/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/src/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 6e099371f3d..f45ddf1d007 100644 --- a/src/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/src/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -269,7 +269,7 @@ struct mob_iron_sludgeAI : public ScriptedAI void JustDied(Unit* pKiller) { if (pInstance) - if(Creature* pSjonnir = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_SJONNIR))) + if (Creature* pSjonnir = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_SJONNIR))) CAST_AI(boss_sjonnirAI, pSjonnir->AI())->KilledIronSludge(); } }; 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 bd655c1ec1a..1725c32fdf3 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 @@ -184,7 +184,7 @@ struct mob_tribuna_controllerAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(bKaddrakActivated) + if (bKaddrakActivated) { if (uiKaddrakEncounterTimer <= diff) { diff --git a/src/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/src/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index b167156f2d9..31c03816c6f 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -133,9 +133,9 @@ struct boss_flame_leviathanAI : public BossAI void SpellHit(Unit *caster, const SpellEntry *spell) { - if(spell->Id == 62472) + if (spell->Id == 62472) vehicle->InstallAllAccessories(); - else if(spell->Id == SPELL_ELECTROSHOCK) + else if (spell->Id == SPELL_ELECTROSHOCK) m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); } @@ -166,7 +166,7 @@ struct boss_flame_leviathanAI : public BossAI DoCastAOE(SPELL_PURSUED, true); //events.RepeatEvent(35000); // this should not be used because eventId may be overriden events.RescheduleEvent(EVENT_PURSUE, 35000); - if(!m_creature->getVictim()) // all siege engines and demolishers are dead + if (!m_creature->getVictim()) // all siege engines and demolishers are dead UpdateVictim(); // begin to kill other things return; case EVENT_MISSILE: @@ -183,8 +183,8 @@ struct boss_flame_leviathanAI : public BossAI events.RepeatEvent(15000); return; case EVENT_SUMMON: - if(summons.size() < 15) // 4seat+1turret+10lift - if(Creature *lift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0)) + if (summons.size() < 15) // 4seat+1turret+10lift + if (Creature *lift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0)) lift->GetMotionMaster()->MoveRandom(100); events.RepeatEvent(2000); return; @@ -222,7 +222,7 @@ struct boss_flame_leviathan_seatAI : public PassiveAI #ifdef BOSS_DEBUG void MoveInLineOfSight(Unit *who) { - if(who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->isGameMaster() + if (who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->isGameMaster() && !who->GetVehicle() && vehicle->GetPassenger(SEAT_TURRET)) who->EnterVehicle(vehicle, SEAT_PLAYER); } @@ -235,16 +235,16 @@ struct boss_flame_leviathan_seatAI : public PassiveAI if (seatId == SEAT_PLAYER) { - if(!apply) + if (!apply) return; - if(Creature *turret = CAST_CRE(vehicle->GetPassenger(SEAT_TURRET))) + if (Creature *turret = CAST_CRE(vehicle->GetPassenger(SEAT_TURRET))) { turret->setFaction(m_creature->GetVehicleBase()->getFaction()); turret->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable turret->AI()->AttackStart(who); } - if(Unit *device = vehicle->GetPassenger(SEAT_DEVICE)) + if (Unit *device = vehicle->GetPassenger(SEAT_DEVICE)) { device->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); device->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -288,17 +288,17 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI void DoAction(const int32 param) { - if(param == EVENT_SPELLCLICK) + if (param == EVENT_SPELLCLICK) { m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if(m_creature->GetVehicle()) + if (m_creature->GetVehicle()) { - if(Unit *player = m_creature->GetVehicle()->GetPassenger(SEAT_PLAYER)) + if (Unit *player = m_creature->GetVehicle()->GetPassenger(SEAT_PLAYER)) { player->ExitVehicle(); m_creature->GetVehicleBase()->CastSpell(player, SPELL_SMOKE_TRAIL, true); - if(Unit *leviathan = m_creature->GetVehicleBase()->GetVehicleBase()) + if (Unit *leviathan = m_creature->GetVehicleBase()->GetVehicleBase()) player->GetMotionMaster()->MoveKnockbackFrom(leviathan->GetPositionX(), leviathan->GetPositionY(), 30, 30); } } @@ -312,9 +312,9 @@ struct boss_flame_leviathan_safety_containerAI : public PassiveAI void MovementInform(uint32 type, uint32 id) { - if(id == m_creature->GetEntry()) + if (id == m_creature->GetEntry()) { - if(Creature *liquid = DoSummon(MOB_LIQUID, me, 0)) + if (Creature *liquid = DoSummon(MOB_LIQUID, me, 0)) liquid->CastSpell(liquid, 62494, true); m_creature->DisappearAndDie(); // this will relocate creature to sky } @@ -322,7 +322,7 @@ struct boss_flame_leviathan_safety_containerAI : public PassiveAI void UpdateAI(const uint32 diff) { - if(!m_creature->GetVehicle() && m_creature->isSummon() && m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) + if (!m_creature->GetVehicle() && m_creature->isSummon() && m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) m_creature->GetMotionMaster()->MoveFall(409.8f, m_creature->GetEntry()); } }; @@ -341,7 +341,7 @@ struct spell_pool_of_tarAI : public TriggerAI void SpellHit(Unit* caster, const SpellEntry *spell) { - if(spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !m_creature->HasAura(SPELL_BLAZE)) + if (spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !m_creature->HasAura(SPELL_BLAZE)) m_creature->CastSpell(me, SPELL_BLAZE, true); } }; diff --git a/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 3ffa8f9118b..dd2518fb783 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -117,19 +117,19 @@ struct boss_kologarnAI : public BossAI case EVENT_NONE: break; case EVENT_SMASH: - if(left && right) + if (left && right) DoCastVictim(SPELL_TWO_ARM_SMASH, true); - else if(left || right) + else if (left || right) DoCastVictim(SPELL_ONE_ARM_SMASH, true); events.RepeatEvent(15000); break; case EVENT_SWEEP: - if(left) + if (left) DoCastAOE(SPELL_ARM_SWEEP, true); events.RepeatEvent(15000); break; case EVENT_GRIP: - if(right) + if (right) DoCastAOE(SPELL_STONE_GRIP, true); events.RepeatEvent(15000); break; diff --git a/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 0ac8f444fa3..7dba5317d57 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -110,7 +110,7 @@ struct boss_razorscaleAI : public BossAI if (!UpdateVictim()) return; - if(m_creature->GetPositionY() > -60 || m_creature->GetPositionX() < 450) // Not Blizzlike, anti-exploit to prevent players from pulling bosses to vehicles. + if (m_creature->GetPositionY() > -60 || m_creature->GetPositionX() < 450) // Not Blizzlike, anti-exploit to prevent players from pulling bosses to vehicles. { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); diff --git a/src/scripts/northrend/ulduar/ulduar/ulduar_teleporter.cpp b/src/scripts/northrend/ulduar/ulduar/ulduar_teleporter.cpp index 9330de94e6e..469271bd5f7 100644 --- a/src/scripts/northrend/ulduar/ulduar/ulduar_teleporter.cpp +++ b/src/scripts/northrend/ulduar/ulduar/ulduar_teleporter.cpp @@ -24,21 +24,21 @@ The teleporter appears to be active and stable. bool GoHello_ulduar_teleporter( Player *pPlayer, GameObject *pGO ) { ScriptedInstance *pInstance = pGO->GetInstanceData(); - if(!pInstance) return true; + if (!pInstance) return true; pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP); pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS); - if(pInstance->GetData(TYPE_LEVIATHAN) == DONE) + if (pInstance->GetData(TYPE_LEVIATHAN) == DONE) { pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE); - if(pInstance->GetData(TYPE_XT002) == DONE) + if (pInstance->GetData(TYPE_XT002) == DONE) { pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD); pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER); - if(pInstance->GetData(TYPE_KOLOGARN) == DONE) + if (pInstance->GetData(TYPE_KOLOGARN) == DONE) { pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY); - if(pInstance->GetData(TYPE_AURIAYA) == DONE) + if (pInstance->GetData(TYPE_AURIAYA) == DONE) pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY); } } @@ -50,8 +50,8 @@ bool GoHello_ulduar_teleporter( Player *pPlayer, GameObject *pGO ) bool GOSelect_ulduar_teleporter( Player *pPlayer, GameObject *pGO, uint32 sender, uint32 action ) { - if(sender != GOSSIP_SENDER_MAIN) return true; - if(!pPlayer->getAttackers().empty()) return true; + if (sender != GOSSIP_SENDER_MAIN) return true; + if (!pPlayer->getAttackers().empty()) return true; switch(action) { 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 889bc93050f..9124b8dffc3 100644 --- a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp +++ b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp @@ -145,7 +145,7 @@ struct boss_palehoofAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(currentPhase!=PHASE_GORTOK_PALEHOOF) + if (currentPhase!=PHASE_GORTOK_PALEHOOF) return; //Return since we have no target if (!UpdateVictim()) @@ -194,7 +194,7 @@ struct boss_palehoofAI : public ScriptedAI void NextPhase() { - if(currentPhase == PHASE_NONE) + if (currentPhase == PHASE_NONE) { pInstance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS); m_creature->SummonCreature(MOB_STASIS_CONTROLLER,moveLocs[5].x,moveLocs[5].y,moveLocs[5].z,0,TEMPSUMMON_CORPSE_DESPAWN); @@ -208,7 +208,7 @@ struct boss_palehoofAI : public ScriptedAI uint8 next = urand(0,3); for (uint8 i=0; i < 16; i++) { - if(!DoneAdds[i%4] && next == 0) + if (!DoneAdds[i%4] && next == 0) { move = (Phase)(i%4); break; @@ -223,7 +223,7 @@ struct boss_palehoofAI : public ScriptedAI Creature *pOrb = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_MOB_ORB) : 0); if (pOrb && pOrb->isAlive()) { - if(currentPhase == PHASE_NONE) + if (currentPhase == PHASE_NONE) pOrb->CastSpell(m_creature,SPELL_ORB_VISUAL,true); pOrb->GetMotionMaster()->MovePoint(move,moveLocs[move].x,moveLocs[move].y,moveLocs[move].z); } @@ -274,7 +274,7 @@ struct mob_ravenous_furbolgAI : public ScriptedAI m_creature->GetMotionMaster()->MoveTargetedHome(); if (pInstance) - if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) + if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) { Creature *pPalehoof = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); if (pPalehoof && pPalehoof->isAlive()) @@ -380,7 +380,7 @@ struct mob_frenzied_worgenAI : public ScriptedAI m_creature->GetMotionMaster()->MoveTargetedHome(); if (pInstance) - if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) + if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) { Creature *pPalehoof = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); if (pPalehoof && pPalehoof->isAlive()) @@ -489,7 +489,7 @@ struct mob_ferocious_rhinoAI : public ScriptedAI m_creature->GetMotionMaster()->MoveTargetedHome(); if (pInstance) - if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) + if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS) { Creature *pPalehoof = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); if (pPalehoof && pPalehoof->isAlive()) @@ -602,7 +602,7 @@ struct mob_massive_jormungarAI : public ScriptedAI m_creature->GetMotionMaster()->MoveTargetedHome(); if (pInstance) - if(pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS) + if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS) { Creature *pPalehoof = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); if (pPalehoof && pPalehoof->isAlive()) @@ -702,12 +702,12 @@ struct mob_palehoof_orbAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(currentPhase==PHASE_NONE) + if (currentPhase==PHASE_NONE) return; - if(SummonTimer<=diff) + if (SummonTimer<=diff) { - if(currentPhase<5&¤tPhase>=0) + if (currentPhase<5&¤tPhase>=0) { Creature *pNext; switch(currentPhase) @@ -737,7 +737,7 @@ struct mob_palehoof_orbAI : public ScriptedAI { if (type != POINT_MOTION_TYPE) return; - if(id<0 || id>4) + if (id<0 || id>4) return; Creature *pNext; switch(id) @@ -748,7 +748,7 @@ struct mob_palehoof_orbAI : public ScriptedAI case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_MOB_FEROCIOUS_RHINO) : 0); break; case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break; } - if(pNext) + if (pNext) DoCast(pNext, SPELL_ORB_CHANNEL, false); currentPhase=(Phase)id; SummonTimer=5000; diff --git a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index cf965bdb331..766d0699c5d 100644 --- a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -186,7 +186,7 @@ struct boss_skadiAI : public ScriptedAI void MovementInform(uint32 type, uint32 id) { - if(type != POINT_MOTION_TYPE) + if (type != POINT_MOTION_TYPE) return; if (uiSpawnCounter >= DUNGEON_MODE(4, 5)) diff --git a/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp index 3916b6d71c6..71c9047604e 100644 --- a/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -116,7 +116,7 @@ struct boss_emalonAI : public BossAI switch(eventId) { case EVENT_CHAIN_LIGHTNING: - if(Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_CHAIN_LIGHTNING); events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 25000); break; @@ -175,7 +175,7 @@ struct mob_tempest_minionAI : public ScriptedAI void JustDied(Unit* Killer) { - if(Creature *pEmalon = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_EMALON) : 0)) + if (Creature *pEmalon = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_EMALON) : 0)) { if (pEmalon->isAlive()) { @@ -190,7 +190,7 @@ struct mob_tempest_minionAI : public ScriptedAI DoZoneInCombat(); events.ScheduleEvent(EVENT_SHOCK, 20000); - if(Creature *pEmalon = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_EMALON) : 0)) + if (Creature *pEmalon = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_EMALON) : 0)) { if (!pEmalon->getVictim() && pEmalon->AI()) pEmalon->AI()->AttackStart(who); diff --git a/src/scripts/northrend/violet_hold/boss_erekem.cpp b/src/scripts/northrend/violet_hold/boss_erekem.cpp index 3b1454714cc..67c7632b94b 100644 --- a/src/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/src/scripts/northrend/violet_hold/boss_erekem.cpp @@ -158,7 +158,7 @@ struct boss_erekemAI : public ScriptedAI { if (uint64 TargetGUID = GetChainHealTargetGUID()) { - if(Creature *pTarget = Unit::GetCreature(*m_creature, TargetGUID)) + if (Creature *pTarget = Unit::GetCreature(*m_creature, TargetGUID)) DoCast(pTarget, DUNGEON_MODE(SPELL_CHAIN_HEAL, H_SPELL_CHAIN_HEAL)); //If one of the adds is dead spawn heals faster diff --git a/src/scripts/northrend/violet_hold/boss_moragg.cpp b/src/scripts/northrend/violet_hold/boss_moragg.cpp index d543aae9d55..47d479ff23c 100644 --- a/src/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/src/scripts/northrend/violet_hold/boss_moragg.cpp @@ -50,7 +50,7 @@ struct boss_moraggAI : public ScriptedAI if (pInstance) { if (GameObject *pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MORAGG_CELL))) - if(pDoor->GetGoState() == GO_STATE_READY) + if (pDoor->GetGoState() == GO_STATE_READY) { EnterEvadeMode(); return; diff --git a/src/scripts/northrend/zuldrak.cpp b/src/scripts/northrend/zuldrak.cpp index a944330b955..6550a3ce979 100644 --- a/src/scripts/northrend/zuldrak.cpp +++ b/src/scripts/northrend/zuldrak.cpp @@ -544,7 +544,7 @@ struct npc_orinoko_tuskbreakerAI : public ScriptedAI pSummon->AI()->AttackStart(m_creature->getVictim()); break; case NPC_HUNGRY_PENGUIN: - if(Unit *pAffected = Unit::GetUnit(*m_creature, AffectedGUID)) + if (Unit *pAffected = Unit::GetUnit(*m_creature, AffectedGUID)) { if (pAffected->isAlive()) pSummon->AI()->AttackStart(pAffected); |