diff options
153 files changed, 773 insertions, 773 deletions
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp index 1e910521457..bbf034e0ac4 100644 --- a/src/game/ArenaTeam.cpp +++ b/src/game/ArenaTeam.cpp @@ -199,7 +199,7 @@ bool ArenaTeam::LoadArenaTeamFromDB(QueryResult_AutoPtr arenaTeamDataResult) m_stats.games_season = fields[12].GetUInt32(); m_stats.wins_season = fields[13].GetUInt32(); m_stats.rank = fields[14].GetUInt32(); - + return true; } @@ -322,7 +322,7 @@ void ArenaTeam::Disband(WorldSession *session) // Removing from members is done in DelMember. DelMember(m_members.front().guid); } - + if (session) { if(Player *player = session->GetPlayer()) diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp index 4a97ca0d0f7..78a9409764c 100644 --- a/src/game/BattleGroundHandler.cpp +++ b/src/game/BattleGroundHandler.cpp @@ -615,7 +615,7 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data ) return; } - //check if any arena enabled + //check if any arena enabled if (!sBattleGroundMgr.isAnyArenaEnabled()) { SendBattleGroundOrArenaJoinError(BG_JOIN_ERR_ARENA_DISABLED); diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 0b75155e1d0..93cd6ed4277 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1394,9 +1394,9 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg) case BATTLEGROUND_RL: case BATTLEGROUND_SA: *data << uint32(2); - *data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed); - *data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed); - break; + *data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed); + *data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed); + break; case BATTLEGROUND_DS: // wotlk case BATTLEGROUND_RV: // wotlk case BATTLEGROUND_IC: // wotlk @@ -1534,7 +1534,7 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI { if (!isAnyArenaEnabled()) // it's checked in handler but just to be sure return NULL; - uint8 size = m_EnabledArenas.size() - 1; + uint8 size = m_EnabledArenas.size() - 1; bgTypeId = m_EnabledArenas[urand(0,size)]; bg_template = GetBattleGroundTemplate(bgTypeId); if (!bg_template) @@ -1781,7 +1781,7 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution() { sLog.outDebug("Initializing Automatic Arena Point Distribution"); uint64 wstime = sWorld.getWorldState(WS_ARENA_DISTRIBUTION_TIME); - + if (!wstime) { sLog.outDebug("Battleground: Next arena point distribution time not found, reseting it now."); diff --git a/src/game/BattleGroundSA.cpp b/src/game/BattleGroundSA.cpp index ec39710a2c6..33630f340df 100644 --- a/src/game/BattleGroundSA.cpp +++ b/src/game/BattleGroundSA.cpp @@ -52,7 +52,7 @@ void BattleGroundSA::Reset() bool BattleGroundSA::SetupBattleGround() { - return ResetObjs(); + return ResetObjs(); } bool BattleGroundSA::ResetObjs() @@ -66,7 +66,7 @@ bool BattleGroundSA::ResetObjs() for(uint8 i = 0; i < BG_SA_MAXNPC; i++) DelCreature(i); - + for(uint8 i = BG_SA_MAXNPC; i < BG_SA_MAXNPC + BG_SA_MAX_GY; i++) DelCreature(i); @@ -93,7 +93,7 @@ bool BattleGroundSA::ResetObjs() } OverrideGunFaction(); - + for(uint8 i = 0; i <= BG_SA_TITAN_RELIC; i++) { SpawnBGObject(i, RESPAWN_IMMEDIATELY); @@ -125,7 +125,7 @@ bool BattleGroundSA::ResetObjs() { sLog.outError("SOTA: Can't find GY entry %u",BG_SA_GYEntries[i]); return false; - } + } if(i == BG_SA_BEACH_GY) { @@ -143,7 +143,7 @@ bool BattleGroundSA::ResetObjs() //GY capture points for(uint8 i = BG_SA_CENTRAL_FLAG; i < BG_SA_MAXOBJ; i++) { - AddObject(i, BG_SA_ObjEntries[i] - (attackers == TEAM_ALLIANCE ? 1:0), + AddObject(i, BG_SA_ObjEntries[i] - (attackers == TEAM_ALLIANCE ? 1:0), BG_SA_ObjSpawnlocs[i][0], BG_SA_ObjSpawnlocs[i][1], BG_SA_ObjSpawnlocs[i][2], BG_SA_ObjSpawnlocs[i][3], 0,0,0,0,RESPAWN_ONE_DAY); @@ -154,21 +154,21 @@ bool BattleGroundSA::ResetObjs() UpdateWorldState(BG_SA_RIGHT_GY_HORDE , GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE?1:0 ); UpdateWorldState(BG_SA_LEFT_GY_HORDE , GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE?1:0 ); UpdateWorldState(BG_SA_CENTER_GY_HORDE , GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE?1:0 ); - + UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE , GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0 ); UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE , GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0 ); UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE , GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0 ); - + if(attackers == TEAM_ALLIANCE) { UpdateWorldState(BG_SA_ALLY_ATTACKS, 1); UpdateWorldState(BG_SA_HORDE_ATTACKS, 0); - + UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_ALL, 1); UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_ALL, 1); UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_HRD, 0); UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_HRD, 0); - + UpdateWorldState(BG_SA_HORDE_DEFENCE_TOKEN,1); UpdateWorldState(BG_SA_ALLIANCE_DEFENCE_TOKEN,0); } @@ -176,7 +176,7 @@ bool BattleGroundSA::ResetObjs() { UpdateWorldState(BG_SA_HORDE_ATTACKS, 1); UpdateWorldState(BG_SA_ALLY_ATTACKS, 0); - + UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_ALL, 0); UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_ALL, 0); UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_HRD, 1); @@ -192,7 +192,7 @@ bool BattleGroundSA::ResetObjs() UpdateWorldState(BG_SA_GREEN_GATEWS, 1); UpdateWorldState(BG_SA_YELLOW_GATEWS, 1); UpdateWorldState(BG_SA_ANCIENT_GATEWS, 1); - + TeleportPlayers(); return true; } @@ -265,7 +265,7 @@ void BattleGroundSA::Update(uint32 diff) { RoundScores[1].time = TotalTime; RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE; - + if (RoundScores[0].time == RoundScores[1].time) EndBattleGround(NULL); else if(RoundScores[0].time < RoundScores[1].time) @@ -339,12 +339,12 @@ void BattleGroundSA::AddPlayer(Player *plr) if(plr->GetTeamId() == attackers) { plr->CastSpell(plr,12438,true);//Without this player falls before boat loads... - + if(urand(0,1)) plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0); else plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0); - + } else plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0); @@ -408,11 +408,11 @@ void BattleGroundSA::TeleportPlayers() if(plr->GetTeamId() == attackers) { plr->CastSpell(plr,12438,true); //Without this player falls before boat loads... - + if(urand(0,1)) plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0); else - plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0); + plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0); } else plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0); @@ -464,13 +464,13 @@ void BattleGroundSA::OverrideGunFaction() { if(!m_BgCreatures[0]) return; - + for(uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10;i++) { if(Creature* gun = GetBGCreature(i)) gun->setFaction(BG_SA_Factions[attackers? TEAM_ALLIANCE : TEAM_HORDE]); } - + for(uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4;i++) { if(Creature* dem = GetBGCreature(i)) @@ -513,7 +513,7 @@ void BattleGroundSA::DestroyGate(uint32 i, Player* pl) ASSERT(false); break; } - + if(i < 5) DelObject(i+9); UpdateWorldState(uws, GateStatus[i]); @@ -598,7 +598,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i) case BG_SA_LEFT_CAPTURABLE_GY: SpawnBGObject(BG_SA_LEFT_FLAG,RESPAWN_ONE_DAY); npc = BG_SA_NPC_RIGSPARK; - AddCreature(BG_SA_NpcEntries[npc], npc, attackers, + AddCreature(BG_SA_NpcEntries[npc], npc, attackers, BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1], BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]); UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0)); @@ -607,7 +607,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i) case BG_SA_RIGHT_CAPTURABLE_GY: SpawnBGObject(BG_SA_RIGHT_FLAG, RESPAWN_ONE_DAY); npc = BG_SA_NPC_SPARKLIGHT; - AddCreature(BG_SA_NpcEntries[npc], npc, attackers, + AddCreature(BG_SA_NpcEntries[npc], npc, attackers, BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1], BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]); UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0)); @@ -668,7 +668,7 @@ void BattleGroundSA::EndBattleGround(uint32 winner) RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE); else if (winner == HORDE) RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE); - + //complete map_end rewards (even if no team wins) RewardHonorToTeam(GetBonusHonorFromKill(2), ALLIANCE); RewardHonorToTeam(GetBonusHonorFromKill(2), HORDE); diff --git a/src/game/BattleGroundSA.h b/src/game/BattleGroundSA.h index e695b75dab5..01a76ab7a1a 100644 --- a/src/game/BattleGroundSA.h +++ b/src/game/BattleGroundSA.h @@ -61,14 +61,14 @@ enum BG_SA_WorldStates BG_SA_TIMER_SEC_DECS = 3561, BG_SA_ALLY_ATTACKS = 4352, BG_SA_HORDE_ATTACKS = 4353, - + BG_SA_PURPLE_GATEWS = 3614, BG_SA_RED_GATEWS = 3617, BG_SA_BLUE_GATEWS = 3620, BG_SA_GREEN_GATEWS = 3623, BG_SA_YELLOW_GATEWS = 3638, BG_SA_ANCIENT_GATEWS = 3849, - + BG_SA_LEFT_GY_ALLIANCE = 3635, BG_SA_RIGHT_GY_ALLIANCE = 3636, @@ -112,7 +112,7 @@ enum BG_SA_NPCs BG_SA_MAXNPC }; -const uint32 BG_SA_NpcEntries[BG_SA_MAXNPC] = +const uint32 BG_SA_NpcEntries[BG_SA_MAXNPC] = { 27894, 27894, @@ -134,18 +134,18 @@ const uint32 BG_SA_NpcEntries[BG_SA_MAXNPC] = 29262, }; -const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC][4] = +const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC][4] = { //Cannons - { 1436.429f, 110.05f, 41.407f, 5.4f }, + { 1436.429f, 110.05f, 41.407f, 5.4f }, { 1404.9023f, 84.758f, 41.183f, 5.46f }, - { 1068.693f, -86.951f, 93.81f, 0.02f }, + { 1068.693f, -86.951f, 93.81f, 0.02f }, { 1068.83f, -127.56f, 96.45f, 0.0912f }, - { 1422.115f, -196.433f, 42.1825f, 1.0222f }, + { 1422.115f, -196.433f, 42.1825f, 1.0222f }, { 1454.887f, -220.454f, 41.956f, 0.9627f }, - { 1232.345f, -187.517f, 66.945f, 0.45f }, + { 1232.345f, -187.517f, 66.945f, 0.45f }, { 1249.634f, -224.189f, 66.72f, 0.635f }, - { 1236.213f, 92.287f, 64.965f, 5.751f }, + { 1236.213f, 92.287f, 64.965f, 5.751f }, { 1215.11f, 57.772f, 64.739f, 5.78f } , //Demolishers { 1611.597656,-117.270073,8.719355,2.513274}, @@ -182,7 +182,7 @@ enum BG_SA_Objects BG_SA_MAXOBJ }; -const float BG_SA_ObjSpawnlocs[BG_SA_MAXOBJ][4] = +const float BG_SA_ObjSpawnlocs[BG_SA_MAXOBJ][4] = { { 1411.57f, 108.163f, 28.692f, 5.441f }, { 1055.452f, -108.1f, 82.134f, 0.034f }, @@ -234,17 +234,17 @@ const uint32 BG_SA_ObjEntries[BG_SA_MAXOBJ] = 192834, 193182, 193185, - 192687, - 192685, - 192689, - 192690, + 192687, + 192685, + 192689, + 192690, 192691, 191311, 191311, 191311, 191310, 191306, - 191308, + 191308, }; const uint32 BG_SA_Factions[2] = @@ -333,7 +333,7 @@ class BattleGroundSA : public BattleGround BG_SA_GateState GateStatus[6]; BG_SA_Status status; TeamId GraveyardStatus[BG_SA_MAX_GY]; - BG_SA_RoundScore RoundScores[2]; + BG_SA_RoundScore RoundScores[2]; bool TimerEnabled; }; #endif diff --git a/src/game/CombatAI.cpp b/src/game/CombatAI.cpp index 625fb1adcba..0f330b216bb 100644 --- a/src/game/CombatAI.cpp +++ b/src/game/CombatAI.cpp @@ -258,7 +258,7 @@ void TurretAI::UpdateAI(const uint32 diff) AOEAI::AOEAI(Creature *c) : CreatureAI(c) { - ASSERT(me->m_spells[0]); + ASSERT(me->m_spells[0]); me->SetVisibility(VISIBILITY_ON);//visible to see all spell anims me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);//can't be targeted me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_1);//can't be damaged diff --git a/src/game/Creature.h b/src/game/Creature.h index 4d74e03d60f..737da768302 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -529,7 +529,7 @@ class Creature : public Unit, public GridObject<Creature> bool lootForPickPocketed; bool lootForBody; Player *GetLootRecipient() const; - bool hasLootRecipient() const { return m_lootRecipient != 0; } + bool hasLootRecipient() const { return m_lootRecipient != 0; } bool isTappedBy(Player *player) const; // return true if the creature is tapped by the player or a member of his party. void SetLootRecipient (Unit* unit); @@ -638,7 +638,7 @@ class Creature : public Unit, public GridObject<Creature> void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; } bool IsReputationGainDisabled() { return DisableReputationGain; } - bool IsDamageEnoughForLootingAndReward() const { return m_PlayerDamageReq == 0; } + bool IsDamageEnoughForLootingAndReward() const { return m_PlayerDamageReq == 0; } void LowerPlayerDamageReq(uint32 unDamage) { if(m_PlayerDamageReq) diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp index 503c7ce033d..1451cf46d6f 100644 --- a/src/game/CreatureAI.cpp +++ b/src/game/CreatureAI.cpp @@ -107,7 +107,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature) // scripts does not take care about MoveInLineOfSight loops // MoveInLineOfSight can be called inside another MoveInLineOfSight and cause stack overflow void CreatureAI::MoveInLineOfSight_Safe(Unit *who) -{ +{ if(m_MoveInLineOfSight_locked == true) return; m_MoveInLineOfSight_locked = true; diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index 6ae5472b8d0..e1203ef35cc 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -582,13 +582,13 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 { m_creature->addUnitState(UNIT_STAT_MELEE_ATTACKING); m_creature->SendMeleeAttackStart(victim); - } + } if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) m_creature->GetMotionMaster()->MoveChase(victim, AttackDistance, AttackAngle); // Targeted movement generator will start melee automatically, no need to send it explicitly } } else - { + { if (m_creature->isInCombat()) { Unit* victim = m_creature->getVictim(); @@ -596,7 +596,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 { m_creature->clearUnitState(UNIT_STAT_MELEE_ATTACKING); m_creature->SendMeleeAttackStop(victim); - } + } if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) m_creature->GetMotionMaster()->MoveIdle(); } diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index f0cfec6e40b..38192d92ee8 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -337,7 +337,7 @@ void LoadDBCStores(const std::string& dataPath) if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS) assert(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data"); - LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestXPStore, dbcPath,"QuestXP.dbc"); + LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestXPStore, dbcPath,"QuestXP.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestFactionRewardStore, dbcPath,"QuestFactionReward.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatDistributionStore, dbcPath,"ScalingStatDistribution.dbc"); diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index 4b1598a211c..7c3c7c9fca4 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -1487,7 +1487,7 @@ struct SpellEntry //float unk_320_4[3]; // 235-237 3.2.0 //uint32 spellDescriptionVariableID; // 238 3.2.0 //uint32 SpellDifficultyId; // 239 3.3.0 - /* + /* flag96 EffectSpellClassMask[MAX_SPELL_EFFECTS]; // 127-136 uint32 SpellVisual[2]; // 137-138 m_spellVisualID uint32 SpellIconID; // 139 m_spellIconID diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index 1e71eb7159d..ac2c4b8ada4 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -92,7 +92,7 @@ bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, const P // The lower word of DYNAMICOBJECT_BYTES must be 0x0001. This value means that the visual radius will be overriden // by client for most of the "ground patch" visual effect spells and a few "skyfall" ones like Hurricane. // If any other value is used, the client will _always_ use the radius provided in DYNAMICOBJECT_RADIUS, but - // precompensation is necessary (eg radius *= 2) for many spells. Anyway, blizz sends 0x0001 for all the spells + // precompensation is necessary (eg radius *= 2) for many spells. Anyway, blizz sends 0x0001 for all the spells // I saw sniffed... SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 ); SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId ); @@ -166,7 +166,7 @@ int32 DynamicObject::GetDuration() const if (!m_aura) return m_duration; else - return m_aura->GetDuration(); + return m_aura->GetDuration(); } void DynamicObject::SetDuration(int32 newDuration) diff --git a/src/game/Group.cpp b/src/game/Group.cpp index e53e65ee6d0..62ace59bffa 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -565,10 +565,10 @@ void Group::SendLooter(Creature *pCreature, Player *pLooter) { assert(pCreature); - WorldPacket data(SMSG_LOOT_LIST, (8+8)); + WorldPacket data(SMSG_LOOT_LIST, (8+8)); data << uint64(pCreature->GetGUID()); data << uint8(0); // unk1 - + if (pLooter) data.append(pLooter->GetPackGUID()); else @@ -628,12 +628,12 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject) RollId.push_back(r); - if (Creature* creature = dynamic_cast<Creature *>(pLootedObject)) + if (Creature* creature = dynamic_cast<Creature *>(pLootedObject)) { creature->m_groupLootTimer = 60000; creature->lootingGroupLeaderGUID = GetLeaderGUID(); } - else if (GameObject* go = dynamic_cast<GameObject *>(pLootedObject)) + else if (GameObject* go = dynamic_cast<GameObject *>(pLootedObject)) { go->m_groupLootTimer = 60000; go->lootingGroupLeaderGUID = GetLeaderGUID(); @@ -693,7 +693,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject) RollId.push_back(r); - if (Creature* creature = dynamic_cast<Creature *>(pLootedObject)) + if (Creature* creature = dynamic_cast<Creature *>(pLootedObject)) { creature->m_groupLootTimer = 60000; creature->lootingGroupLeaderGUID = GetLeaderGUID(); @@ -924,7 +924,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers) // remove is_blocked so that the item is lootable by all players LootItem *item = &(roll->getLoot()->items[roll->itemSlot]); - if (item) + if (item) item->is_blocked = false; } RollId.erase(rollI); @@ -1022,7 +1022,7 @@ void Group::SendUpdate() if (citr->guid == citr2->guid) continue; Player* member = objmgr.GetPlayer(citr2->guid); - + uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE; onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0); @@ -1334,7 +1334,7 @@ bool Group::_setMainTank(const uint64 &guid, const bool &apply) RemoveUniqueGroupMemberFlag(MEMBER_FLAG_MAINTANK); // Remove main tank flag from current if any. ToggleGroupMemberFlag(slot, MEMBER_FLAG_MAINTANK, apply); // And apply main tank flag on new main tank. - + if(!isBGGroup()) CharacterDatabase.PExecute("UPDATE group_member SET memberFlags='%u' WHERE memberGuid='%u'", slot->flags, GUID_LOPART(guid)); return true; @@ -1412,7 +1412,7 @@ void Group::ChangeMembersGroup(Player *player, const uint8 &group) // If the RR player is not yet set for the group, the first group member becomes the round-robin player. // If the RR player is set, the next player in group becomes the round-robin player. // -// If ifneed is true, +// If ifneed is true, // the current RR player is checked to be near the looted object. // if yes, no update done. // if not, he looses his turn. diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index 3cf0b99906e..188fbf9cebc 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -234,7 +234,7 @@ bool Guild::LoadGuildFromDB(QueryResult_AutoPtr guildDataResult) } bool Guild::CheckGuildStructure() -{ +{ // Repair the structure of guild // If the guildmaster doesn't exist or isn't the member of guild // attempt to promote another member @@ -359,7 +359,7 @@ bool Guild::LoadMembersFromDB(QueryResult_AutoPtr guildMembersResult) if (guildId > m_Id) //we loaded all members for this guild already, break cycle break; - + MemberSlot newmember; uint64 guid = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_PLAYER); newmember.RankId = fields[2].GetUInt32(); diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index a56ff683378..e5d846b6130 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -675,7 +675,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b SetResetTimeFor(mapid, difficulty, next_reset); ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, -1)); - + // update it in the DB CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty); } diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 4a70e9340ce..f2971b98dc6 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -248,7 +248,7 @@ Item::Item( ) m_lootGenerated = false; mb_in_trade = false; m_lastPlayedTimeUpdate = time(NULL); - + m_refundRecipient = 0; m_paidMoney = 0; m_paidExtendedCost = 0; @@ -277,7 +277,7 @@ bool Item::Create( uint32 guidlow, uint32 itemid, Player const* owner) SetUInt32Value(ITEM_FIELD_FLAGS, itemProto->Flags); SetUInt32Value(ITEM_FIELD_DURATION, abs(itemProto->Duration)); - + SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, 0); return true; @@ -418,7 +418,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult_AutoPtr result SetOwnerGUID(owner_guid); need_save = true; } - + if (need_save) // normal item changed state set not work at loading { std::ostringstream ss; @@ -638,7 +638,7 @@ void Item::SetState(ItemUpdateState state, Player *forplayer) // new items must stay in new state until saved if (uState != ITEM_NEW) uState = state; - + AddToUpdateQueueOf(forplayer); } else @@ -748,8 +748,8 @@ uint32 Item::GetEnchantRequiredLevel() const if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id)) if (enchantEntry->requiredLevel > level) level = enchantEntry->requiredLevel; - - return level; + + return level; } bool Item::IsBoundByEnchant() const @@ -834,7 +834,7 @@ void Item::SetEnchantmentDuration(EnchantmentSlot slot, uint32 duration, Player* return; SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1 + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_DURATION_OFFSET,duration); - SetState(ITEM_CHANGED, owner); + SetState(ITEM_CHANGED, owner); // Cannot use GetOwner() here, has to be passed as an argument to avoid freeze due to hashtable locking } @@ -1061,7 +1061,7 @@ void Item::SaveRefundDataToDB() ss << GetPaidMoney() << ","; ss << GetPaidExtendedCost(); ss << ")"; - + CharacterDatabase.Execute(ss.str().c_str()); } @@ -1079,12 +1079,12 @@ void Item::SetNotRefundable(Player *owner, bool changestate) // Following is not applicable in the trading procedure if (changestate) SetState(ITEM_CHANGED, owner); - + SetRefundRecipient(0); SetPaidMoney(0); SetPaidExtendedCost(0); - DeleteRefundDataFromDB(); - + DeleteRefundDataFromDB(); + owner->DeleteRefundReference(GetGUID()); } diff --git a/src/game/Item.h b/src/game/Item.h index f1fd798d1e8..33018faefb8 100644 --- a/src/game/Item.h +++ b/src/game/Item.h @@ -330,11 +330,11 @@ class Item : public Object uint32 GetRefundRecipient() { return m_refundRecipient; } uint32 GetPaidMoney() { return m_paidMoney; } uint32 GetPaidExtendedCost() { return m_paidExtendedCost; } - + void UpdatePlayedTime(Player *owner); uint32 GetPlayedTime(); bool IsRefundExpired(); - + void BuildUpdate(UpdateDataMapType& ); private: diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index 5c577c87afa..8d7b06227c3 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -1361,13 +1361,13 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data) // This function call unsets ITEM_FLAGS_REFUNDABLE if played time is over 2 hours. item->UpdatePlayedTime(GetPlayer()); - + if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE)) { sLog.outDebug("Item refund: item not refundable!"); return; } - + if (GetPlayer()->GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded { sLog.outDebug("Item refund: item was traded!"); @@ -1381,7 +1381,7 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data) sLog.outDebug("Item refund: cannot find extendedcost data."); return; } - + WorldPacket data(SMSG_ITEM_REFUND_INFO_RESPONSE, 8+4+4+4+4*4+4*4+4+4); data << uint64(guid); // item guid data << uint32(item->GetPaidMoney()); // money cost @@ -1432,14 +1432,14 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data) item->SetNotRefundable(GetPlayer()); return; } - + ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost()); if (!iece) { sLog.outDebug("Item refund: cannot find extendedcost data."); return; } - + uint32 moneyRefund = item->GetPaidMoney(); bool store_error = false; @@ -1447,7 +1447,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data) { uint32 count = iece->reqitemcount[i]; uint32 itemid = iece->reqitem[i]; - + if (count && itemid) { ItemPosCountVec dest; @@ -1457,9 +1457,9 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data) store_error = true; break; } - } + } } - + if (store_error) { WorldPacket data(SMSG_ITEM_REFUND_RESULT, 8+4); @@ -1487,7 +1487,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data) // Destroy item _player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true); - + // Grant back extendedcost items for (uint8 i = 0; i < 5; ++i) { @@ -1502,7 +1502,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data) _player->SendNewItem(it, count, true, false, true); } } - + // Grant back money if (moneyRefund) _player->ModifyMoney(moneyRefund); diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 5a86f6082d6..d1293c710ae 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -1461,7 +1461,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char *args) SetSentErrorMessage(true); return false; } - + // Check and abort if the target gm has a higher rank on one of the realms and the new realm is -1 if (gmRealmID == -1) { @@ -1487,7 +1487,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char *args) loginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u'", targetAccountId); else loginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u' AND (RealmID = '%d' OR RealmID = '-1')", targetAccountId, realmID); - + if (gm != 0) loginDatabase.PExecute("INSERT INTO account_access VALUES ('%u','%d','%d')", targetAccountId, gm, realmID); PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm); @@ -5361,7 +5361,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args) } CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'",atLogin,atLogin); - + ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock()); HashMapHolder<Player>::MapType const& plist = ObjectAccessor::Instance().GetPlayers(); for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr) @@ -6867,7 +6867,7 @@ bool ChatHandler::HandleInstanceSaveDataCommand(const char * /*args*/) bool ChatHandler::HandleGMListFullCommand(const char* /*args*/) { ///- Get the accounts with GM Level >0 - QueryResult_AutoPtr result = loginDatabase.Query("SELECT a.username,aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel > 0"); + QueryResult_AutoPtr result = loginDatabase.Query("SELECT a.username,aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel > 0"); if(result) { SendSysMessage(LANG_GMLIST); diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index 57c233ffe72..1b7ee1940c8 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -445,7 +445,7 @@ void WorldSession::DoLootRelease(uint64 lguid) pCreature->SetLootRecipient(NULL); loot->clear(); } - else + else { // if the round robin player release, reset it. if (player->GetGUID() == loot->roundRobinPlayer) diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 7c4bb2d219c..755d3c06a6f 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -784,7 +784,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) slot_type = LOOT_SLOT_TYPE_ROLL_ONGOING; else if (l.roundRobinPlayer == 0 || !l.items[i].is_underthreshold || lv.viewer->GetGUID() == l.roundRobinPlayer) { - // no round robin owner or he has released the loot + // no round robin owner or he has released the loot // or it IS the round robin group owner // => item is lootable slot_type = LOOT_SLOT_TYPE_ALLOW_LOOT; diff --git a/src/game/Map.cpp b/src/game/Map.cpp index dc20e33047c..dae351d5eff 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -360,7 +360,7 @@ void Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player) { EnsureGridLoaded(cell); - NGridType *grid = getNGrid(cell.GridX(), cell.GridY()); + NGridType *grid = getNGrid(cell.GridX(), cell.GridY()); assert( grid != NULL ); if (player) diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index f138b42c486..13dc0a39fa2 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -564,7 +564,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data) _player->m_movementInfo = mi; - /* + /* ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);*/ _player->ExitVehicle(); } @@ -574,7 +574,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data) sLog.outDebug("WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE"); recv_data.hexlike(); - Unit* vehicle_base = GetPlayer()->GetVehicleBase(); + Unit* vehicle_base = GetPlayer()->GetVehicleBase(); if(!vehicle_base) return; diff --git a/src/game/Object.h b/src/game/Object.h index a780898b499..c7a1ca76bf7 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -397,9 +397,9 @@ struct Position void GetPosition(float &x, float &y, float &z, float &o) const { x = m_positionX; y = m_positionY; z = m_positionZ; o = m_orientation; } void GetPosition(Position *pos) const - { - if (pos) - pos->Relocate(m_positionX, m_positionY, m_positionZ, m_orientation); + { + if (pos) + pos->Relocate(m_positionX, m_positionY, m_positionZ, m_orientation); } bool IsPositionValid() const; @@ -423,7 +423,7 @@ struct Position float GetAngle(const Position *pos) const; float GetAngle(float x, float y) const; - float GetRelativeAngle(const Position *pos) const + float GetRelativeAngle(const Position *pos) const { return GetAngle(pos) - m_orientation; } float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; } void GetSinCos(float x, float y, float &vsin, float &vcos) const; @@ -532,27 +532,27 @@ class WorldObject : public Object, public WorldLocation virtual const char* GetNameForLocaleIdx(int32 /*locale_idx*/) const { return GetName(); } float GetDistance(const WorldObject *obj) const - { + { float d = GetExactDist(obj) - GetObjectSize() - obj->GetObjectSize(); return d > 0.0f ? d : 0.0f; } float GetDistance(const Position &pos) const - { + { float d = GetExactDist(&pos) - GetObjectSize(); return d > 0.0f ? d : 0.0f; } float GetDistance(float x, float y, float z) const - { + { float d = GetExactDist(x, y, z) - GetObjectSize(); return d > 0.0f ? d : 0.0f; } float GetDistance2d(const WorldObject* obj) const - { + { float d = GetExactDist2d(obj) - GetObjectSize() - obj->GetObjectSize(); return d > 0.0f ? d : 0.0f; } float GetDistance2d(float x, float y) const - { + { float d = GetExactDist2d(x, y) - GetObjectSize(); return d > 0.0f ? d : 0.0f; } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index b0429804f44..d237e044395 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3285,7 +3285,7 @@ void ObjectMgr::LoadGuilds() { Guild *newGuild; uint32 count = 0; - + // 0 1 2 3 4 5 6 QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT guild.guildid,guild.name,leaderguid,EmblemStyle,EmblemColor,BorderStyle,BorderColor," // 7 8 9 10 11 12 @@ -4083,8 +4083,8 @@ void ObjectMgr::LoadQuests() sLog.outErrorDb("Quest %u has `RewRepFaction%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(),j+1,qinfo->RewRepFaction[j] ,qinfo->RewRepFaction[j] ); qinfo->RewRepFaction[j] = 0; // quest will not reward this } - } - + } + else if(qinfo->RewRepValue[j]!=0) { @@ -6745,28 +6745,28 @@ void ObjectMgr::LoadPointsOfInterest() void ObjectMgr::LoadQuestPOI() { uint32 count = 0; - + // 0 1 2 3 QueryResult_AutoPtr result = WorldDatabase.Query("SELECT questId, id, objIndex, mapid, WorldMapAreaId, FloorId, unk3, unk4 FROM quest_poi order by questId"); - + if(!result) { barGoLink bar(1); - + bar.step(); - + sLog.outString(); sLog.outErrorDb(">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty."); return; } - + barGoLink bar(result->GetRowCount()); - + do { Field *fields = result->Fetch(); bar.step(); - + uint32 questId = fields[0].GetUInt32(); uint32 id = fields[1].GetUInt32(); int32 objIndex = fields[2].GetInt32(); @@ -6777,9 +6777,9 @@ void ObjectMgr::LoadQuestPOI() uint32 unk4 = fields[7].GetUInt32(); QuestPOI POI(id, objIndex, mapId, WorldMapAreaId, FloorId, unk3, unk4); - + QueryResult_AutoPtr points = WorldDatabase.PQuery("SELECT x, y FROM quest_poi_points WHERE questId='%u' AND id='%i'", questId, id); - + if(points) { do @@ -6791,12 +6791,12 @@ void ObjectMgr::LoadQuestPOI() POI.points.push_back(point); } while (points->NextRow()); } - + mQuestPOIMap[questId].push_back(POI); - + ++count; } while (result->NextRow()); - + sLog.outString(); sLog.outString(">> Loaded %u quest POI definitions", count); } @@ -8209,7 +8209,7 @@ bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std:: if (trainerSpell.learnedSpell[0] == spell) trainerSpell.learnedSpell[0] = 0; // player must be able to cast spell on himself - if (spellinfo->EffectImplicitTargetA[i] != 0 && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ALLY + if (spellinfo->EffectImplicitTargetA[i] != 0 && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ALLY && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ANY && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_CASTER) { sLog.outErrorDb("Table `npc_trainer` has spell %u for trainer entry %u with learn effect which has incorrect target type, ignoring learn effect!", spell, entry); diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 0657040e9fd..72271a75d7b 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -712,12 +712,12 @@ void Pet::GivePetXP(uint32 xp) // Subtract newXP from amount needed for nextlevel newXP -= nextLvlXP; GivePetLevel(level+1); - SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)*PET_XP_FACTOR); + SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)*PET_XP_FACTOR); // Make sure we're working with the upgraded levels for the pet XP-levels level = getLevel(); nextLvlXP = GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP); - + // Hitting the pet/playerlevel combolimitation, set UNIT_FIELD_PETEXPERIENCE (current XP) to 0 if ( level >= GetOwner()->getLevel() ) { newXP = 0; diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 38cfd65fa83..227c8ee2331 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -58,7 +58,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName() ); return; } - + if (!pet->isAlive()) return; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 1e629a9fb1a..390d94e861f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7956,7 +7956,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) bool groupRules = (group && go->GetGOInfo()->type == GAMEOBJECT_TYPE_CHEST && go->GetGOInfo()->chest.groupLootRules); // check current RR player and get next if necessary - if (groupRules) + if (groupRules) group->UpdateLooterGuid(go, true); loot->FillLoot(lootid, LootTemplates_Gameobject, this, !groupRules, false, go->GetLootMode()); @@ -8012,7 +8012,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) break; } } - else + else permission = ALL_PERMISSION; } } @@ -11597,7 +11597,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) RemoveEnchantmentDurations(pItem); RemoveItemDurations(pItem); - + pItem->SetNotRefundable(this); ItemRemovedQuestCheck( pItem->GetEntry(), pItem->GetCount() ); @@ -14088,7 +14088,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver if (pQuest->GetRewArenaPoints()) ModifyArenaPoints(pQuest->GetRewArenaPoints()); - + // Send reward mail if (uint32 mail_template_id = pQuest->GetRewMailTemplateId()) MailDraft(mail_template_id).SendMailTo(this, questGiver, MAIL_CHECK_MASK_NONE, pQuest->GetRewMailDelaySecs()); @@ -15540,11 +15540,11 @@ float Player::GetFloatValueFromDB(uint16 index, uint64 guid) bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) { - //// 0 1 2 3 4 5 6 7 8 9 10 11 12 + //// 0 1 2 3 4 5 6 7 8 9 10 11 12 //QueryResult *result = CharacterDatabase.PQuery("SELECT guid, account, data, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags," - // 13 14 15 16 17 18 19 20 21 22 23 24 25 + // 13 14 15 16 17 18 19 20 21 22 23 24 25 //"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost," - // 26 27 28 29 30 31 32 33 34 35 36 37 38 39 + // 26 27 28 29 30 31 32 33 34 35 36 37 38 39 //"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty," // 40 41 42 43 44 45 46 47 48 49 50 //"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk," @@ -15600,7 +15600,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) SetUInt32Value(UNIT_FIELD_LEVEL, fields[7].GetUInt8()); SetUInt32Value(PLAYER_XP, fields[8].GetUInt32()); - + uint32 money = fields[9].GetUInt32(); if (money > MAX_MONEY_AMOUNT) money = MAX_MONEY_AMOUNT; @@ -16189,7 +16189,7 @@ bool Player::isAllowedToLoot(const Creature* creature) // or if there are free/quest/conditional item for the player if (loot->roundRobinPlayer == 0 || loot->roundRobinPlayer == GetGUID()) return true; - + return loot->hasItemFor(this); case GROUP_LOOT: case NEED_BEFORE_GREED: @@ -16429,13 +16429,13 @@ void Player::_LoadInventory(QueryResult_AutoPtr result, uint32 timediff) item->GetGUIDLow(), GetGUIDLow()); if (!result2) { - sLog.outDebug("Item::LoadFromDB, " + sLog.outDebug("Item::LoadFromDB, " "Item GUID: %u has field flags & ITEM_FLAGS_REFUNDABLE but has no data in item_refund_instance, removing flag.", item->GetGUIDLow()); RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE); } else - { + { fields = result2->Fetch(); item->SetRefundRecipient(fields[0].GetUInt32()); item->SetPaidMoney(fields[1].GetUInt32()); @@ -16444,7 +16444,7 @@ void Player::_LoadInventory(QueryResult_AutoPtr result, uint32 timediff) } } } - + bool success = true; if (!bag_guid) @@ -17363,7 +17363,7 @@ void Player::SaveToDB() ss << (uint64)m_deathExpireTime << ", '"; ss << m_taxi.SaveTaxiDestinationsToString() << "', "; - + ss << GetArenaPoints() << ", "; ss << GetHonorPoints() << ", "; @@ -17539,11 +17539,11 @@ void Player::_SaveInventory() { iPtr->UpdatePlayedTime(this); continue; - } + } else { sLog.outError("Can't find item guid " UI64FMTD " but is in refundable storage for player %u ! Removing.", (*itr), GetGUIDLow()); - m_refundableItems.erase(itr); + m_refundableItems.erase(itr); } } @@ -19368,7 +19368,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint } ModifyMoney( -(int32)price ); - + if (crItem->ExtendedCost) // case for new honor system { ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); @@ -19396,7 +19396,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint data << uint32(count); GetSession()->SendPacket(&data); SendNewItem(it, pProto->BuyCount*count, true, false, false); - + if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->ExtendedCost) { it->SetRefundRecipient(GetGUIDLow()); diff --git a/src/game/Player.h b/src/game/Player.h index 29e279ec7bd..460de713491 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1189,7 +1189,7 @@ class Player : public Unit, public GridObject<Player> uint8 _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const; uint8 _CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL ) const; - + void AddRefundReference(uint64 it); void DeleteRefundReference(uint64 it); diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp index 6a148b58d66..6a63102ccce 100644 --- a/src/game/PoolHandler.cpp +++ b/src/game/PoolHandler.cpp @@ -255,7 +255,7 @@ void PoolGroup<T>::SpawnObject(SpawnedPoolData& spawns, uint32 limit, uint32 tri int count = limit - spawns.GetSpawnedObjects(poolId); // If triggered from some object respawn this object is still marked as spawned - // and also counted into m_SpawnedPoolAmount so we need increase count to be + // and also counted into m_SpawnedPoolAmount so we need increase count to be // spawned by 1 if (triggerFrom) ++count; diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp index e6647fce9ac..b23b77a8be2 100644 --- a/src/game/QueryHandler.cpp +++ b/src/game/QueryHandler.cpp @@ -476,29 +476,29 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) { uint32 count; recv_data >> count; // quest count, max=25 - + if(count >= MAX_QUEST_LOG_SIZE) return; - + WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count); data << uint32(count); // count - + for(int i = 0; i < count; ++i) { uint32 questId; recv_data >> questId; // quest id - + bool questOk = false; - + uint16 questSlot = _player->FindQuestSlot(questId); - + if(questSlot != MAX_QUEST_LOG_SIZE) questOk =_player->GetQuestSlotQuestId(questSlot) == questId; - + if(questOk) { QuestPOIVector const *POI = objmgr.GetQuestPOIVector(questId); - + if(POI) { data << uint32(questId); // quest ID @@ -514,7 +514,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) data << uint32(itr->Unk3); // unknown data << uint32(itr->Unk4); // unknown data << uint32(itr->points.size()); // POI points count - + for(std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2) { data << int32(itr2->x); // POI point x @@ -534,6 +534,6 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) data << uint32(0); // POI count } } - + SendPacket(&data); }
\ No newline at end of file diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp index 95e54e18ec8..97ff3024bb5 100644 --- a/src/game/QuestDef.cpp +++ b/src/game/QuestDef.cpp @@ -65,52 +65,52 @@ Quest::Quest(Field * questRecord) RequestItemsText = questRecord[38].GetCppString(); EndText = questRecord[39].GetCppString(); CompletedText = questRecord[40].GetCppString(); - + for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) ObjectiveText[i] = questRecord[41+i].GetCppString(); - + for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) ReqItemId[i] = questRecord[45+i].GetUInt32(); - + for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) ReqItemCount[i] = questRecord[51+i].GetUInt32(); - + for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) ReqSourceId[i] = questRecord[57+i].GetUInt32(); - + for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) ReqSourceCount[i] = questRecord[61+i].GetUInt32(); - + for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) ReqCreatureOrGOId[i] = questRecord[65+i].GetInt32(); - + for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) ReqCreatureOrGOCount[i] = questRecord[69+i].GetUInt32(); - + for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) ReqSpell[i] = questRecord[73+i].GetUInt32(); - + for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) RewChoiceItemId[i] = questRecord[77+i].GetUInt32(); - + for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) RewChoiceItemCount[i] = questRecord[83+i].GetUInt32(); - + for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) RewItemId[i] = questRecord[89+i].GetUInt32(); - + for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) RewItemCount[i] = questRecord[93+i].GetUInt32(); - + for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) RewRepFaction[i] = questRecord[97+i].GetUInt32(); - + for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) RewRepValueId[i] = questRecord[102+i].GetInt32(); - + for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) RewRepValue[i] = questRecord[107+i].GetInt32(); - + RewHonorableKills = questRecord[112].GetUInt32(); RewHonorMultiplier = questRecord[113].GetFloat(); RewOrReqMoney = questRecord[114].GetInt32(); @@ -123,22 +123,22 @@ Quest::Quest(Field * questRecord) PointX = questRecord[121].GetFloat(); PointY = questRecord[122].GetFloat(); PointOpt = questRecord[123].GetUInt32(); - + for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) DetailsEmote[i] = questRecord[124+i].GetUInt32(); - + for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) DetailsEmoteDelay[i] = questRecord[128+i].GetUInt32(); - + IncompleteEmote = questRecord[132].GetUInt32(); CompleteEmote = questRecord[133].GetUInt32(); - + for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) OfferRewardEmote[i] = questRecord[134+i].GetInt32(); - + for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) OfferRewardEmoteDelay[i] = questRecord[138+i].GetInt32(); - + QuestStartScript = questRecord[142].GetUInt32(); QuestCompleteScript = questRecord[143].GetUInt32(); @@ -184,7 +184,7 @@ uint32 Quest::XPValue( Player *pPlayer ) const xpentry = sQuestXPStore.LookupEntry(quest_level); if(!xpentry) return 0; - + int diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20; if (diffFactor < 1) diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index 0f2836c161e..ae412f61b5d 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -35,11 +35,11 @@ struct TSpellSummary { ScriptMgr::ScriptMgr() { - + } ScriptMgr::~ScriptMgr() { - + } void ScriptMgr::ScriptsInit() diff --git a/src/game/ScriptMgr.h b/src/game/ScriptMgr.h index 056dd712fdb..a9965b2766a 100644 --- a/src/game/ScriptMgr.h +++ b/src/game/ScriptMgr.h @@ -37,7 +37,7 @@ struct Script pOnGetMoney(NULL), pOnPlayerChat(NULL), pOnServerStartup(NULL), pOnServerShutdown(NULL), pOnAreaChange(NULL), pOnItemClick(NULL), pOnItemOpen(NULL), pOnGoClick(NULL), pOnCreatureKill(NULL), pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), - pGOSelect(NULL), pGOSelectWithCode(NULL), + pGOSelect(NULL), pGOSelectWithCode(NULL), pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL), pGOChooseReward(NULL),pItemUse(NULL), pItemExpire(NULL), @@ -96,10 +96,10 @@ class ScriptMgr public: ScriptMgr(); ~ScriptMgr(); - + void ScriptsInit(); void LoadDatabase(); - char const* ScriptsVersion(); + char const* ScriptsVersion(); //event handlers void OnLogin(Player *pPlayer); diff --git a/src/game/ScriptedCreature.h b/src/game/ScriptedCreature.h index 9174db84435..ff7495c9bd6 100644 --- a/src/game/ScriptedCreature.h +++ b/src/game/ScriptedCreature.h @@ -170,8 +170,8 @@ struct ScriptedAI : public CreatureAI bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff); // return true for heroic mode. i.e. - // - for dungeon in mode 10-heroic, - // - for raid in mode 10-Heroic + // - for dungeon in mode 10-heroic, + // - for raid in mode 10-Heroic // - for raid in mode 25-heroic // DO NOT USE to check raid in mode 25-normal. bool IsHeroic() { return m_heroicMode; } @@ -228,7 +228,7 @@ struct ScriptedAI : public CreatureAI private: bool m_bCombatMovement; uint32 m_uiEvadeCheckCooldown; - + bool m_heroicMode; Difficulty m_difficulty; }; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 5b170092cd2..f0d3992fa73 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -815,11 +815,11 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const * triggeredByAura) m_procEx= PROC_EX_NONE; // Hunter trap spells - activation proc for Lock and Load, Entrapment and Misdirection - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && + if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && (m_spellInfo->SpellFamilyFlags[0] & 0x18 || // Freezing and Frost Trap, Freezing Arrow m_spellInfo->Id == 57879 || // Snake Trap - done this way to avoid double proc m_spellInfo->SpellFamilyFlags[2] & 0x00024000)) // Explosive and Immolation Trap - + m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION; /* @@ -1210,7 +1210,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell); // Failed Pickpocket, reveal rogue - if (missInfo == SPELL_MISS_RESIST + if (missInfo == SPELL_MISS_RESIST && m_customAttr & SPELL_ATTR_CU_PICKPOCKET && unitTarget->GetTypeId() == TYPEID_UNIT) { @@ -1371,7 +1371,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool if(m_originalCaster) { - if (m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit, + if (m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit, m_originalCaster,(aurSpellInfo == m_spellInfo)? &m_currentBasePoints[0] : &basePoints[0], m_CastItem)) { // Now Reduce spell duration using data received at spell hit @@ -2981,7 +2981,7 @@ void Spell::cast(bool skipCheck) } // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()... - SendSpellGo(); + SendSpellGo(); // Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells if (m_spellInfo->speed > 0.0f && !IsChanneledSpell(m_spellInfo) || m_spellInfo->Id == 14157) @@ -3609,9 +3609,9 @@ void Spell::SendSpellGo() && m_spellInfo->powerType != POWER_HEALTH ) castFlags |= CAST_FLAG_POWER_LEFT_SELF; // should only be sent to self, but the current messaging doesn't make that possible - if((m_caster->GetTypeId() == TYPEID_PLAYER) - && (m_caster->getClass() == CLASS_DEATH_KNIGHT) - && m_spellInfo->runeCostID + if((m_caster->GetTypeId() == TYPEID_PLAYER) + && (m_caster->getClass() == CLASS_DEATH_KNIGHT) + && m_spellInfo->runeCostID && m_spellInfo->powerType == POWER_RUNE) { castFlags |= CAST_FLAG_UNKNOWN_19; // same as in SMSG_SPELL_START @@ -3640,7 +3640,7 @@ void Spell::SendSpellGo() if ((m_spellInfo->Targets & TARGET_FLAG_SOURCE_LOCATION) && m_targets.HasSrc()) m_targets.setTargetMask(m_targets.getTargetMask() | TARGET_FLAG_SOURCE_LOCATION); - else + else m_targets.setTargetMask(m_targets.getTargetMask() & ~TARGET_FLAG_SOURCE_LOCATION); if ((m_spellInfo->Targets & TARGET_FLAG_DEST_LOCATION) && m_targets.HasDst()) @@ -4588,7 +4588,7 @@ SpellCastResult Spell::CheckCast(bool strict) // Lay on Hands - cannot be self-cast on paladin with Forbearance or after using Avenging Wrath if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags[0] & 0x0008000) if (target->HasAura(61988)) // Immunity shield marker - return SPELL_FAILED_TARGET_AURASTATE; + return SPELL_FAILED_TARGET_AURASTATE; } } @@ -4644,7 +4644,7 @@ SpellCastResult Spell::CheckCast(bool strict) } */ - if(target) + if(target) if(IsPositiveSpell(m_spellInfo->Id)) if(target->IsImmunedToSpell(m_spellInfo)) return SPELL_FAILED_TARGET_AURASTATE; @@ -5216,11 +5216,11 @@ SpellCastResult Spell::CheckCast(bool strict) { if (m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_DONT_REPORT; - + Unit* target = m_targets.getUnitTarget(); if (!target || target->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_BAD_TARGETS; - + if (!m_caster->ToPlayer()->IsInSameRaidWith(target->ToPlayer())) return SPELL_FAILED_TARGET_NOT_IN_RAID; @@ -6106,7 +6106,7 @@ SpellCastResult Spell::CheckItems() if (pProto->Spells[x].SpellCharges != 0 && pitem->GetSpellCharges(x) == pProto->Spells[x].SpellCharges) return SPELL_FAILED_ITEM_AT_MAX_CHARGES; } - break; + break; } default: break; diff --git a/src/game/Spell.h b/src/game/Spell.h index d615f224f8c..71815d4eef4 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -61,7 +61,7 @@ enum SpellCastTargetFlags TARGET_FLAG_CORPSE = 0x00008000, // pguid, resurrection spells TARGET_FLAG_UNK2 = 0x00010000, // pguid, not used in any spells as of 3.2.2a (can be set dynamically) TARGET_FLAG_GLYPH = 0x00020000, // used in glyph spells - TARGET_FLAG_UNK3 = 0x00040000, // + TARGET_FLAG_UNK3 = 0x00040000, // TARGET_FLAG_UNK4 = 0x00080000 // uint32, loop { vec3, guid -> if guid == 0 break } }; @@ -161,7 +161,7 @@ class SpellCastTargets uint32 getTargetMask() const { return m_targetMask; } void setTargetMask(uint32 newMask) { m_targetMask = newMask; } uint32 getIntTargetFlags() const { return m_intTargetFlags; } - + uint64 getUnitTargetGUID() const { return m_unitTargetGUID; } Unit *getUnitTarget() const { return m_unitTarget; } void setUnitTarget(Unit *target); @@ -460,7 +460,7 @@ class Spell void HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i); void HandleThreatSpells(uint32 spellId); - + const SpellEntry * const m_spellInfo; int32 m_currentBasePoints[3]; // cache SpellEntry::EffectBasePoints and use for set custom base points Item* m_CastItem; diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index 7d107203c94..02a25fd3f6e 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -41,7 +41,7 @@ class Aura; // // EFFECT HANDLER NOTES -// +// // in aura handler there should be check for modes: // AURA_EFFECT_HANDLE_REAL set - aura mod is just applied/removed on the target // AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK set - aura is just applied/removed, or aura packet request is made @@ -504,8 +504,8 @@ int32 AuraEffect::CalculateAmount(Unit * caster) // Borrowed Time if (AuraEffect const * aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 2899, 1)) bonus += aurEff->GetAmount() / 100; - - DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(GetSpellProto())) * bonus; + + DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(GetSpellProto())) * bonus; } break; case SPELLFAMILY_PALADIN: @@ -1119,7 +1119,7 @@ void AuraEffect::UpdatePeriodic(Unit * caster) break; } break; - case SPELLFAMILY_MAGE: + case SPELLFAMILY_MAGE: if (GetId() == 55342)// Mirror Image m_isPeriodic = false; break; @@ -1859,7 +1859,7 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const target->RemoveAurasDueToSpell(31665); break; // Killing Spree - case 51690: + case 51690: { // TODO: this should use effect[1] of 51690 UnitList targets; @@ -4119,7 +4119,7 @@ void AuraEffect::HandleModMechanicImmunity(AuraApplication const * aurApp, uint8 target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, GetMiscValue(), apply); break; } - + if (apply && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY) target->RemoveAurasWithMechanic(mechanic, AURA_REMOVE_BY_DEFAULT, GetId()); } @@ -5508,7 +5508,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo { float currentGroundLevel = target->GetBaseMap()->GetHeight(target->GetPositionX(), target->GetPositionY(), MAX_HEIGHT); if (target->GetPositionZ() > currentGroundLevel) - target->GetMotionMaster()->MoveFall(currentGroundLevel); + target->GetMotionMaster()->MoveFall(currentGroundLevel); } break; case 46699: // Requires No Ammo @@ -5864,7 +5864,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo { if (target->m_form != FORM_CAT) break; - + target->CastSpell(target, spellId, true, NULL, NULL, GetCasterGUID()); break; } @@ -6006,7 +6006,7 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const * aurApp, uint8 mo //Adding items uint32 noSpaceForCount = 0; uint32 count = m_amount; - + ItemPosCountVec dest; uint8 msg = plCaster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, GetSpellProto()->EffectItemType[m_effIndex], count, &noSpaceForCount); if( msg != EQUIP_ERR_OK ) @@ -6152,7 +6152,7 @@ void AuraEffect::HandleAuraConvertRune(AuraApplication const * aurApp, uint8 mod continue; if(!plr->GetRuneCooldown(i)) { - // ConvertRune(i, + // ConvertRune(i, plr->AddRuneByAuraEffect(i, RuneType(GetMiscValueB()), this); --runes; } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e98a904bd3b..fe4732035f3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -35,7 +35,7 @@ #include "GridNotifiersImpl.h" #include "CellImpl.h" -AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint8 effMask) +AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint8 effMask) : m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE), m_needClientUpdate(false) , m_removeMode(AURA_REMOVE_NONE), m_effectsToApply(effMask) { @@ -445,7 +445,7 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply) targetsToRemove.push_back(appIter->second->GetTarget()); else { - // needs readding - remove now, will be applied in next update cycle + // needs readding - remove now, will be applied in next update cycle // (dbcs do not have auras which apply on same type of targets but have different radius, so this is not really needed) if (appIter->second->GetEffectMask() != existing->second) targetsToRemove.push_back(appIter->second->GetTarget()); @@ -527,7 +527,7 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply) // targets have to be registered and not have effect applied yet to use this function void Aura::_ApplyEffectForTargets(uint8 effIndex) { - Unit * caster = GetCaster(); + Unit * caster = GetCaster(); // prepare list of aura targets UnitList targetList; for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter) @@ -617,7 +617,7 @@ void Aura::Update(uint32 diff, Unit * caster) else { Remove(); - return; + return; } } } @@ -715,9 +715,9 @@ bool Aura::IsPassive() const return IsPassiveSpell(GetSpellProto()); } -bool Aura::IsDeathPersistent() const +bool Aura::IsDeathPersistent() const { - return IsDeathPersistentSpell(GetSpellProto()); + return IsDeathPersistentSpell(GetSpellProto()); } bool Aura::CanBeSaved() const @@ -768,7 +768,7 @@ bool Aura::IsVisible() const // Is this blizzlike? show totem passive auras if (GetOwner()->GetTypeId() == TYPEID_UNIT && m_owner->ToCreature()->isTotem() && IsPassive()) return true; - return !IsPassive() || HasEffectType(SPELL_AURA_ABILITY_IGNORE_AURASTATE); + return !IsPassive() || HasEffectType(SPELL_AURA_ABILITY_IGNORE_AURASTATE); } void Aura::UnregisterSingleTarget() @@ -899,7 +899,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, { case 31571: spellId = 57529; break; case 31572: spellId = 57531; break; - default: + default: sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId()); } if(spellId) @@ -1251,7 +1251,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, target->CastSpell(target, GetEffect(0)->GetAmount(), true, NULL, GetEffect(0)); break; } - break; + break; } } @@ -1457,7 +1457,7 @@ void Aura::_DeleteRemovedApplications() } UnitAura::UnitAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID) - : Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID) + : Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID) { m_AuraDRGroup = DIMINISHING_NONE; GetUnitOwner()->_AddAura(this, caster); @@ -1567,7 +1567,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster) } DynObjAura::DynObjAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID) - : Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID) + : Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID) { GetDynobjOwner()->SetAura(this); } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f0f24b9a2e6..71067e8f5d9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1514,7 +1514,7 @@ void Spell::EffectDummy(uint32 i) // Glyph of Eternal Water if (unitTarget->HasAura(70937)) unitTarget->CastSpell(unitTarget, 70908, true); - else + else unitTarget->CastSpell(unitTarget, 70907, true); } } @@ -2198,7 +2198,7 @@ void Spell::EffectTriggerSpellWithValue(uint32 i) int32 bp = damage; Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget); - + caster->CastCustomSpell(unitTarget,triggered_spell_id,&bp,&bp,&bp,true); } @@ -2240,7 +2240,7 @@ void Spell::EffectForceCast(uint32 i) { case 52588: // Skeletal Gryphon Escape case 48598: // Ride Flamebringer Cue - unitTarget->RemoveAura(damage); + unitTarget->RemoveAura(damage); break; case 52463: // Hide In Mine Car case 52349: // Overtake @@ -5720,10 +5720,10 @@ void Spell::EffectScriptEffect(uint32 effIndex) { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT) return; - + if (roll_chance_i(50)) // chance unknown, using 50 return; - + static uint32 const spellPlayer[5] = { 45674, // Bigger! @@ -5732,7 +5732,7 @@ void Spell::EffectScriptEffect(uint32 effIndex) 45682, // Ghost 45684 // Polymorph }; - + static uint32 const spellTarget[5] = { 45673, // Bigger! 45672, // Shrunk @@ -5740,7 +5740,7 @@ void Spell::EffectScriptEffect(uint32 effIndex) 45681, // Ghost 45683 // Polymorph }; - + m_caster->CastSpell(m_caster, spellPlayer[urand(0,4)], true); unitTarget->CastSpell(unitTarget, spellTarget[urand(0,4)], true); break; diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 08234a3547c..c952ef0763b 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -877,7 +877,7 @@ class SpellMgr bool IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const; - SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const + SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const { spell_id = GetFirstSpellInChain(spell_id); return SpellSpellGroupMapBounds(mSpellSpellGroup.lower_bound(spell_id),mSpellSpellGroup.upper_bound(spell_id)); @@ -893,16 +893,16 @@ class SpellMgr return false; } - SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const + SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const { return SpellGroupSpellMapBounds(mSpellGroupSpell.lower_bound(group_id),mSpellGroupSpell.upper_bound(group_id)); } - void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const + void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const { std::set<SpellGroup> usedGroups; GetSetOfSpellsInSpellGroup(group_id, foundSpells, usedGroups); } - void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const + void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const { if (usedGroups.find(group_id) != usedGroups.end()) return; @@ -1066,16 +1066,16 @@ class SpellMgr return 0; } - SpellRequiredMapBounds GetSpellsRequiredForSpellBounds(uint32 spell_id) const - { + SpellRequiredMapBounds GetSpellsRequiredForSpellBounds(uint32 spell_id) const + { return SpellRequiredMapBounds(mSpellReq.lower_bound(spell_id),mSpellReq.upper_bound(spell_id)); } - SpellsRequiringSpellMapBounds GetSpellsRequiringSpellBounds(uint32 spell_id) const - { + SpellsRequiringSpellMapBounds GetSpellsRequiringSpellBounds(uint32 spell_id) const + { return SpellsRequiringSpellMapBounds(mSpellsReqSpell.lower_bound(spell_id),mSpellsReqSpell.upper_bound(spell_id)); } - bool IsSpellRequiringSpell(uint32 spellid, uint32 req_spellid) const + bool IsSpellRequiringSpell(uint32 spellid, uint32 req_spellid) const { SpellsRequiringSpellMapBounds spellsRequiringSpell = GetSpellsRequiringSpellBounds(req_spellid); for (SpellsRequiringSpellMap::const_iterator itr = spellsRequiringSpell.first; itr != spellsRequiringSpell.second; ++itr) @@ -1280,10 +1280,10 @@ class SpellMgr uint32 GetSpellRequired(uint32 spell_id) const { SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id); - + if(itr == mSpellReq.end()) return NULL; - + return itr->second; } diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index 81a8a0abc60..114bd95837e 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -927,7 +927,7 @@ bool Guardian::UpdateStats(Stats stat) // Handle Death Knight Glyphs and Talents float mod = 0.75f; if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH)) - { + { switch (stat) { case STAT_STAMINA: mod = 0.3f; break; // Default Owner's Stamina scale diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e01776a58f0..49dbaec1475 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6754,7 +6754,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger for (ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) { if ((*itr)->GetEntry() != 2630) continue; - + caster = (*itr); break; } @@ -8554,7 +8554,7 @@ FactionTemplateEntry const* Unit::getFactionTemplateEntry() const sLog.outError("Player %s has invalid faction (faction template id) #%u", player->GetName(), getFaction()); else if (const Creature *creature = ToCreature()) sLog.outError("Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureInfo()->Entry, getFaction()); - else + else sLog.outError("Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName(), uint32(GetTypeId()), getFaction()); guid = GetGUID(); @@ -10982,7 +10982,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att { // Merciless Combat if ((*i)->GetSpellProto()->SpellIconID == 2656) - { + { if ((pVictim->GetMaxHealth() * 35 / 100) >= pVictim->GetHealth()) DoneTotalMod *= (100.0f+(*i)->GetAmount())/100.0f; } @@ -11367,7 +11367,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) this->ToCreature()->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); if (enemy) - { + { if (IsAIEnabled) { this->ToCreature()->AI()->EnterCombat(enemy); @@ -11915,7 +11915,7 @@ void Unit::SetHover(bool on) void Unit::setDeathState(DeathState s) { - // death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that + // death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that // it can be used to check creation of death items (such as soul shards). DeathState oldDeathState = m_deathState; m_deathState = s; @@ -14317,7 +14317,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co if (EventProcFlag & PROC_FLAG_KILL && GetTypeId() == TYPEID_PLAYER) { bool allow = false; - + if (pVictim) allow = ToPlayer()->isHonorOrXPTarget(pVictim); @@ -14587,7 +14587,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss) loot->generateMoneyLoot(creature->GetCreatureInfo()->mingold,creature->GetCreatureInfo()->maxgold); } - + player->RewardPlayerAndGroupAtKill(pVictim); } diff --git a/src/game/Unit.h b/src/game/Unit.h index a827f1681c8..2dc15c4422c 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1852,7 +1852,7 @@ class Unit : public WorldObject static Creature* GetCreature(WorldObject& object, uint64 guid); MotionMaster* GetMotionMaster(){ return &i_motionMaster; } - + bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); } void StopMoving(); diff --git a/src/game/World.cpp b/src/game/World.cpp index 6ab59cd9fb5..08f75214eee 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1147,7 +1147,7 @@ void World::LoadConfigSettings(bool reload) m_visibility_notify_periodOnContinents = sConfig.GetIntDefault("Visibility.Notify.Period.OnContinents", DEFAULT_VISIBILITY_NOTIFY_PERIOD); m_visibility_notify_periodInInstances = sConfig.GetIntDefault("Visibility.Notify.Period.InInstances", DEFAULT_VISIBILITY_NOTIFY_PERIOD); - m_visibility_notify_periodInBGArenas = sConfig.GetIntDefault("Visibility.Notify.Period.InBGArenas", DEFAULT_VISIBILITY_NOTIFY_PERIOD); + m_visibility_notify_periodInBGArenas = sConfig.GetIntDefault("Visibility.Notify.Period.InBGArenas", DEFAULT_VISIBILITY_NOTIFY_PERIOD); ///- Read the "Data" directory from the config file std::string dataPath = sConfig.GetStringDefault("DataDir","./"); @@ -2593,7 +2593,7 @@ void World::UpdateAreaDependentAuras() } void World::LoadWorldStates() -{ +{ QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT entry, value FROM worldstates"); if (!result) diff --git a/src/game/World.h b/src/game/World.h index 87450bc4828..2b92c01b68c 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -683,7 +683,7 @@ class World float rate_values[MAX_RATES]; uint32 m_configs[CONFIG_VALUE_COUNT]; typedef std::map<uint32,uint64> WorldStatesMap; - WorldStatesMap m_worldstates; + WorldStatesMap m_worldstates; int32 m_playerLimit; AccountTypes m_allowedSecurityLevel; LocaleConstant m_defaultDbcLocale; // from config for one from loaded DBC locales diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp index b0e524718e4..7865068b912 100644 --- a/src/game/WorldSocket.cpp +++ b/src/game/WorldSocket.cpp @@ -411,7 +411,7 @@ int WorldSocket::Update (void) if (m_TimeOutTime && time(NULL) >= m_TimeOutTime) return -1; - + if (m_OutActive || m_OutBuffer->length () == 0) return 0; @@ -837,7 +837,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) locale = LOCALE_enUS; // Checks gmlevel per Realm - result = + result = loginDatabase.PQuery ("SELECT " "RealmID, " //0 "gmlevel " //1 @@ -1064,7 +1064,7 @@ int WorldSocket::iSendPartialPacket(WorldPacket& pct) if (m_OutBuffer->copy((char*) (pct.contents() + pct.rpos()), remainingLen) == -1) ACE_ASSERT (false); - return 1; // some byte written and packet completed + return 1; // some byte written and packet completed } bool WorldSocket::iFlushPacketQueue() @@ -1076,7 +1076,7 @@ bool WorldSocket::iFlushPacketQueue() { int result = iSendPartialPacket(*pct); - if (result != 0) + if (result != 0) { // some bytes were written haveone = true; diff --git a/src/game/WorldSocket.h b/src/game/WorldSocket.h index a10a5e47f40..f7163be55d9 100644 --- a/src/game/WorldSocket.h +++ b/src/game/WorldSocket.h @@ -175,7 +175,7 @@ class WorldSocket : protected WorldHandler /// Need to be called with m_OutBufferLock lock held int iSendPacket (const WorldPacket& pct); - /// Try to write WorldPacket to m_OutBuffer even partially, + /// Try to write WorldPacket to m_OutBuffer even partially, /// Need to be called with m_OutBufferLock lock held int iSendPartialPacket(WorldPacket& pct); @@ -232,8 +232,8 @@ class WorldSocket : protected WorldHandler bool m_OutActive; uint32 m_Seed; - - /// The defined time where the socket will be forced to close. This is + + /// The defined time where the socket will be forced to close. This is /// to detect and close idle connections. time_t m_TimeOutTime; }; diff --git a/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp b/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp index 081fb6f28a4..bdaeb4aa949 100644 --- a/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp +++ b/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp @@ -49,7 +49,7 @@ enum Creatures struct mob_av_marshal_or_warmasterAI : public ScriptedAI { mob_av_marshal_or_warmasterAI(Creature *c) : ScriptedAI(c) {} - + uint32 uiChargeTimer; uint32 uiCleaveTimer; uint32 uiDemoralizingShoutTimer; @@ -57,7 +57,7 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI uint32 uiWhirlwind2Timer; uint32 uiEnrageTimer; uint32 uiResetTimer; - + bool bHasAura; void Reset() @@ -72,12 +72,12 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI bHasAura = false; } - + void JustRespawned() { Reset(); } - + void UpdateAI(const uint32 diff) { if (!bHasAura) @@ -112,47 +112,47 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI bHasAura = true; } - + if (!UpdateVictim()) return; - + if (uiChargeTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_CHARGE); uiChargeTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS); } else uiChargeTimer -= diff; - + if (uiCleaveTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_CLEAVE); uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS); } else uiCleaveTimer -= diff; - + if (uiDemoralizingShoutTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_DEMORALIZING_SHOUT); uiDemoralizingShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS); } else uiDemoralizingShoutTimer -= diff; - + if (uiWhirlwind1Timer <= diff) { DoCast(m_creature->getVictim(), SPELL_WHIRLWIND1); uiWhirlwind1Timer = urand(6*IN_MILISECONDS,20*IN_MILISECONDS); } else uiWhirlwind1Timer -= diff; - + if (uiWhirlwind2Timer <= diff) { DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2); uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS); } else uiWhirlwind2Timer -= diff; - + if (uiEnrageTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_ENRAGE); uiEnrageTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS); }else uiEnrageTimer -= diff; - - + + // check if creature is not outside of building if(uiResetTimer <= diff) { @@ -160,7 +160,7 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI EnterEvadeMode(); uiResetTimer = 5*IN_MILISECONDS; } else uiResetTimer -= diff; - + DoMeleeAttackIfReady(); } }; diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp index 2226fec339c..6b0f5bb7e60 100644 --- a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp +++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp @@ -43,11 +43,11 @@ enum WaterElementalSpells struct mob_water_elementalAI : public ScriptedAI { mob_water_elementalAI(Creature *c) : ScriptedAI(c) {} - + uint32 uiWaterBoltTimer; uint64 uiBalindaGUID; uint32 uiResetTimer; - + void Reset() { uiWaterBoltTimer = 3*IN_MILISECONDS; @@ -58,13 +58,13 @@ struct mob_water_elementalAI : public ScriptedAI { if (!UpdateVictim()) return; - + if(uiWaterBoltTimer < diff) { DoCast(m_creature->getVictim(), SPELL_WATERBOLT); uiWaterBoltTimer = 5*IN_MILISECONDS; } else uiWaterBoltTimer -= diff; - + // check if creature is not outside of building if(uiResetTimer < diff) { @@ -73,7 +73,7 @@ struct mob_water_elementalAI : public ScriptedAI EnterEvadeMode(); uiResetTimer = 5*IN_MILISECONDS; } else uiResetTimer -= diff; - + DoMeleeAttackIfReady(); } }; @@ -88,7 +88,7 @@ struct boss_balindaAI : public ScriptedAI uint32 uiFrostboltTimer; uint32 uiResetTimer; uint32 uiWaterElementalTimer; - + SummonList Summons; void Reset() @@ -117,7 +117,7 @@ struct boss_balindaAI : public ScriptedAI { ((mob_water_elementalAI*)summoned->AI())->uiBalindaGUID = m_creature->GetGUID(); summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true)); - summoned->setFaction(m_creature->getFaction()); + summoned->setFaction(m_creature->getFaction()); Summons.Summon(summoned); } diff --git a/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index d376dea8b6e..87ec1023b58 100644 --- a/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -47,7 +47,7 @@ enum eEnums NPC_SEETHREL = 9038, NPC_GLOOMREL = 9037, NPC_DOOMREL = 9039, - NPC_MAGMUS = 9938, + NPC_MAGMUS = 9938, GO_ARENA1 = 161525, GO_ARENA2 = 161522, @@ -164,7 +164,7 @@ struct instance_blackrock_depths : public ScriptedInstance case NPC_SEETHREL: TombBossGUIDs[4] = pCreature->GetGUID(); break; case NPC_GLOOMREL: TombBossGUIDs[5] = pCreature->GetGUID(); break; case NPC_ANGERREL: TombBossGUIDs[6] = pCreature->GetGUID(); break; - case NPC_MAGMUS: + case NPC_MAGMUS: MagmusGUID = pCreature->GetGUID(); if(!pCreature->isAlive()) HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss diff --git a/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.cpp b/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.cpp index c6f28b8574c..d09998cf85b 100644 --- a/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.cpp +++ b/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.cpp @@ -28,9 +28,9 @@ struct npc_rookey_whelpAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance* pInstance; - + void JustDied(Unit *who) { if (pInstance) @@ -38,12 +38,12 @@ struct npc_rookey_whelpAI : public ScriptedAI pInstance->SetData(WHELP_DEATH_COUNT, pInstance->GetData(WHELP_DEATH_COUNT)+1); } } - + void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; - + DoMeleeAttackIfReady(); } }; @@ -72,7 +72,7 @@ void AddSC_blackrock_spire() newscript->GetAI = &GetAI_rookey_whelp; newscript->RegisterSelf(); newscript = new Script; - + newscript->Name = "go_rookey_egg"; newscript->pGOHello = &GOHello_rookey_egg; newscript->RegisterSelf(); diff --git a/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index 61b21e321a9..56b6e0cbe23 100644 --- a/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/src/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -21,6 +21,6 @@ enum Data { EVENT_LEEEROY, WHELP_DEATH_COUNT -}; +}; #endif diff --git a/src/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/src/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index 709ad00efeb..f2e2b39fe87 100644 --- a/src/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/src/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -25,13 +25,13 @@ enum Achievements struct instance_blackrock_spire : public ScriptedInstance { instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap) {} - + uint32 uiLeeroyTimer; uint32 uiWhelpCount; uint32 uiLeroyData; - + bool bLeeeeeeeeroy; - + void Initialize() { uiLeeroyTimer = 15*IN_MILISECONDS; @@ -39,7 +39,7 @@ struct instance_blackrock_spire : public ScriptedInstance bLeeeeeeeeroy = true; uiLeroyData = 0; } - + void SetData(uint32 type, uint32 data) { switch(type) @@ -57,7 +57,7 @@ struct instance_blackrock_spire : public ScriptedInstance } uiWhelpCount = data; break; - } + } } uint32 GetData(uint32 type) @@ -71,7 +71,7 @@ struct instance_blackrock_spire : public ScriptedInstance } void Update(uint32 diff) - { + { if (GetData(EVENT_LEEEROY) != FAIL && GetData(EVENT_LEEEROY) == IN_PROGRESS) { if (uiLeeroyTimer <= diff) diff --git a/src/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/src/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 9b8066708c0..567a16fadae 100644 --- a/src/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/src/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -270,7 +270,7 @@ struct boss_selin_fireheartAI : public ScriptedAI if (DrainCrystalTimer <= diff) { SelectNearestCrystal(); - if (IsHeroic()) + if (IsHeroic()) DrainCrystalTimer = 10000 + rand()%5000; else DrainCrystalTimer = 20000 + rand()%5000; diff --git a/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp b/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp index f1ed1ded9b2..62bbe42ab82 100644 --- a/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp +++ b/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp @@ -85,11 +85,11 @@ struct npc_valkyr_battle_maidenAI : public PassiveAI FlyBackTimer = 5000; break; case 3: - me->SetVisibility(VISIBILITY_OFF); - FlyBackTimer = 3000; + me->SetVisibility(VISIBILITY_OFF); + FlyBackTimer = 3000; break; case 4: - me->DisappearAndDie(); + me->DisappearAndDie(); break; default: //Nothing To DO diff --git a/src/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/src/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index f4d0e3d29e7..bc1643de076 100644 --- a/src/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/src/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -147,26 +147,26 @@ struct instance_stratholme : public ScriptedInstance { switch(pGo->GetEntry()) { - case GO_SERVICE_ENTRANCE: - serviceEntranceGUID = pGo->GetGUID(); + case GO_SERVICE_ENTRANCE: + serviceEntranceGUID = pGo->GetGUID(); break; case GO_GAUNTLET_GATE1: //weird, but unless flag is set, client will not respond as expected. DB bug? pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_LOCKED); gauntletGate1GUID = pGo->GetGUID(); break; - case GO_ZIGGURAT1: - ziggurat1GUID = pGo->GetGUID(); + case GO_ZIGGURAT1: + ziggurat1GUID = pGo->GetGUID(); if (GetData(TYPE_BARONESS) == IN_PROGRESS) HandleGameObject(0, true, pGo); break; - case GO_ZIGGURAT2: - ziggurat2GUID = pGo->GetGUID(); + case GO_ZIGGURAT2: + ziggurat2GUID = pGo->GetGUID(); if (GetData(TYPE_NERUB) == IN_PROGRESS) HandleGameObject(0, true, pGo); break; - case GO_ZIGGURAT3: - ziggurat3GUID = pGo->GetGUID(); + case GO_ZIGGURAT3: + ziggurat3GUID = pGo->GetGUID(); if (GetData(TYPE_PALLID) == IN_PROGRESS) HandleGameObject(0, true, pGo); break; @@ -180,18 +180,18 @@ struct instance_stratholme : public ScriptedInstance if (GetData(TYPE_BARON) == DONE || GetData(TYPE_RAMSTEIN) == DONE) HandleGameObject(0, true, pGo); break; - case GO_PORT_GAUNTLET: - portGauntletGUID = pGo->GetGUID(); + case GO_PORT_GAUNTLET: + portGauntletGUID = pGo->GetGUID(); if (GetData(TYPE_BARONESS) == IN_PROGRESS && GetData(TYPE_NERUB) == IN_PROGRESS && GetData(TYPE_PALLID) == IN_PROGRESS) HandleGameObject(0, true, pGo); break; - case GO_PORT_SLAUGTHER: - portSlaugtherGUID = pGo->GetGUID(); + case GO_PORT_SLAUGTHER: + portSlaugtherGUID = pGo->GetGUID(); if (GetData(TYPE_BARONESS) == IN_PROGRESS && GetData(TYPE_NERUB) == IN_PROGRESS && GetData(TYPE_PALLID) == IN_PROGRESS) HandleGameObject(0, true, pGo); break; - case GO_PORT_ELDERS: - portElderGUID = pGo->GetGUID(); + case GO_PORT_ELDERS: + portElderGUID = pGo->GetGUID(); break; } } diff --git a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 2359b75f5b7..8debcb9068f 100644 --- a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -99,9 +99,9 @@ struct boss_brutallusAI : public ScriptedAI IntroFrostBoltTimer = 0; IsIntro = false; - Enraged = false; + Enraged = false; - DoCast(m_creature, SPELL_DUAL_WIELD, true); + DoCast(m_creature, SPELL_DUAL_WIELD, true); if (pInstance) pInstance->SetData(DATA_BRUTALLUS_EVENT, NOT_STARTED); @@ -151,7 +151,7 @@ struct boss_brutallusAI : public ScriptedAI Madrigosa->setActive(true); IsIntro = true; Madrigosa->SetMaxHealth(m_creature->GetMaxHealth()); - Madrigosa->SetHealth(m_creature->GetMaxHealth()); + Madrigosa->SetHealth(m_creature->GetMaxHealth()); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->Attack(Madrigosa, true); Madrigosa->Attack(m_creature, true); diff --git a/src/scripts/eastern_kingdoms/western_plaguelands.cpp b/src/scripts/eastern_kingdoms/western_plaguelands.cpp index 90b21f98283..806c7cb9169 100644 --- a/src/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/src/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -25,7 +25,7 @@ EndScriptData */ npcs_dithers_and_arbington npc_myranda_the_hag npc_the_scourge_cauldron -npc_andorhal_tower +npc_andorhal_tower EndContentData */ #include "ScriptedPch.h" @@ -206,7 +206,7 @@ CreatureAI* GetAI_npc_the_scourge_cauldron(Creature* pCreature) } /*###### -## npcs_andorhal_tower +## npcs_andorhal_tower ######*/ enum eAndorhalTower diff --git a/src/scripts/examples/example_creature.cpp b/src/scripts/examples/example_creature.cpp index 549ab338401..7a1db72e57e 100644 --- a/src/scripts/examples/example_creature.cpp +++ b/src/scripts/examples/example_creature.cpp @@ -55,7 +55,7 @@ enum Yells enum Spells { - // List of spells. + // List of spells. // Not required to define them in this way, but will make it easier to maintain in case spellId change SPELL_BUFF = 25661, SPELL_ONE = 12555, diff --git a/src/scripts/kalimdor/blackfathom_depths/boss_aku_mai.cpp b/src/scripts/kalimdor/blackfathom_depths/boss_aku_mai.cpp index 634f84ae6a3..ebdcf43ea82 100644 --- a/src/scripts/kalimdor/blackfathom_depths/boss_aku_mai.cpp +++ b/src/scripts/kalimdor/blackfathom_depths/boss_aku_mai.cpp @@ -31,12 +31,12 @@ struct boss_aku_maiAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + uint32 uiPoisonCloudTimer; bool bIsEnraged; - + ScriptedInstance *pInstance; - + void Reset() { uiPoisonCloudTimer = urand(5000,9000); @@ -44,24 +44,24 @@ struct boss_aku_maiAI : public ScriptedAI if (pInstance) pInstance->SetData(TYPE_AKU_MAI, NOT_STARTED); } - + void EnterCombat(Unit* who) { if (pInstance) pInstance->SetData(TYPE_AKU_MAI, IN_PROGRESS); } - + void JustDied(Unit* killer) { if (pInstance) pInstance->SetData(TYPE_AKU_MAI, DONE); } - + void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; - + if (uiPoisonCloudTimer < diff) { DoCastVictim(SPELL_POISON_CLOUD); @@ -73,7 +73,7 @@ struct boss_aku_maiAI : public ScriptedAI DoCast(m_creature,SPELL_FRENZIED_RAGE); bIsEnraged = true; } - + DoMeleeAttackIfReady(); } }; @@ -86,7 +86,7 @@ CreatureAI* GetAI_boss_aku_mai(Creature* pCreature) void AddSC_boss_aku_mai() { Script *newscript; - + newscript = new Script; newscript->Name = "boss_aku_mai"; newscript->GetAI = &GetAI_boss_aku_mai; diff --git a/src/scripts/kalimdor/blackfathom_depths/boss_gelihast.cpp b/src/scripts/kalimdor/blackfathom_depths/boss_gelihast.cpp index 8b3de327a12..83dfe43c28f 100644 --- a/src/scripts/kalimdor/blackfathom_depths/boss_gelihast.cpp +++ b/src/scripts/kalimdor/blackfathom_depths/boss_gelihast.cpp @@ -64,7 +64,7 @@ struct boss_gelihastAI : public ScriptedAI DoCastVictim(SPELL_NET); uiNetTimer = urand(4000,7000); } else uiNetTimer -= diff; - + DoMeleeAttackIfReady(); } }; diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_epoch.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_epoch.cpp index d95d8d696d2..8e31a848287 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_epoch.cpp +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_epoch.cpp @@ -75,7 +75,7 @@ struct boss_epochAI : public ScriptedAI uiTimeWarpTimer = 25300; uiTimeStopTimer = 21300; uiWoundingStrikeTimer = 5300; - + if (pInstance) pInstance->SetData(DATA_EPOCH_EVENT, NOT_STARTED); } @@ -83,7 +83,7 @@ struct boss_epochAI : public ScriptedAI void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS); } @@ -126,7 +126,7 @@ struct boss_epochAI : public ScriptedAI void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); - + if (pInstance) pInstance->SetData(DATA_EPOCH_EVENT, DONE); } diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite.cpp index aa6e66a853a..6eb129c3c85 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite.cpp +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite.cpp @@ -39,7 +39,7 @@ struct boss_infinite_corruptorAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance* pInstance; void Reset() @@ -47,7 +47,7 @@ struct boss_infinite_corruptorAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_INFINITE_EVENT, NOT_STARTED); } - + void EnterCombat(Unit* who) { if (pInstance) @@ -64,7 +64,7 @@ struct boss_infinite_corruptorAI : public ScriptedAI DoMeleeAttackIfReady(); } - + void JustDied(Unit* killer) { if (pInstance) diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_mal_ganis.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_mal_ganis.cpp index e3b65fa62ae..c3c5f42fb32 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_mal_ganis.cpp +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_mal_ganis.cpp @@ -87,7 +87,7 @@ struct boss_mal_ganisAI : public ScriptedAI bool bYelled2; CombatPhases Phase; - + ScriptedInstance* pInstance; void Reset() @@ -100,7 +100,7 @@ struct boss_mal_ganisAI : public ScriptedAI uiVampiricTouchTimer = urand(10000,15000); uiSleepTimer = urand(15000,20000); uiOutroTimer = 1000; - + if (pInstance) pInstance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED); } @@ -218,7 +218,7 @@ struct boss_mal_ganisAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_OFF); m_creature->Kill(m_creature); break; - + } } else uiOutroTimer -= diff; break; diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp index e9cae41409a..cea444b26c2 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -48,7 +48,7 @@ enum Yells struct boss_meathookAI : public ScriptedAI { - boss_meathookAI(Creature *c) : ScriptedAI(c) + boss_meathookAI(Creature *c) : ScriptedAI(c) { pInstance = c->GetInstanceData(); if (pInstance) @@ -58,7 +58,7 @@ struct boss_meathookAI : public ScriptedAI uint32 uiChainTimer; uint32 uiDiseaseTimer; uint32 uiFrenzyTimer; - + ScriptedInstance* pInstance; void Reset() @@ -66,7 +66,7 @@ struct boss_meathookAI : public ScriptedAI uiChainTimer = urand(12000,17000); //seen on video 13, 17, 15, 12, 16 uiDiseaseTimer = urand(2000,4000); //approx 3s uiFrenzyTimer = urand(21000,26000); //made it up - + if (pInstance) pInstance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED); } @@ -74,7 +74,7 @@ struct boss_meathookAI : public ScriptedAI void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS); } @@ -110,7 +110,7 @@ struct boss_meathookAI : public ScriptedAI void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); - + if (pInstance) pInstance->SetData(DATA_MEATHOOK_EVENT, DONE); } diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp index c1841771559..fef8b1ce99e 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -72,7 +72,7 @@ struct boss_salrammAI : public ScriptedAI uint32 uiShadowBoltTimer; uint32 uiStealFleshTimer; uint32 uiSummonGhoulsTimer; - + ScriptedInstance* pInstance; void Reset() @@ -82,7 +82,7 @@ struct boss_salrammAI : public ScriptedAI uiShadowBoltTimer = urand(8000,12000); // approx 10s uiStealFleshTimer = 12345; uiSummonGhoulsTimer = urand(19000,24000); //on a video approx 24s after aggro - + if (pInstance) pInstance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED); } @@ -90,7 +90,7 @@ struct boss_salrammAI : public ScriptedAI void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS); } @@ -140,7 +140,7 @@ struct boss_salrammAI : public ScriptedAI void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); - + if (pInstance) pInstance->SetData(DATA_SALRAMM_EVENT, DONE); } diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 63c7f0b0f83..c1b38796cbb 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -248,21 +248,21 @@ struct npc_arthasAI : public npc_escortAI uint64 uiEpochGUID; uint64 uiMalganisGUID; uint64 uiInfiniteGUID; - + uint32 uiExorcismTimer; - - void Reset() - { + + void Reset() + { uiUtherGUID = 0; uiJainaGUID = 0; - - for (uint8 i = 0; i < 2; ++i) + + for (uint8 i = 0; i < 2; ++i) uiCitymenGUID[i] = 0; - for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i) + for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i) uiWaveGUID[i] = 0; - for (uint8 i = 0; i < ENCOUNTER_DRACONIAN_NUMBER; ++i) + for (uint8 i = 0; i < ENCOUNTER_DRACONIAN_NUMBER; ++i) uiInfiniteDraconianGUID[i] = 0; uiStalkerGUID = 0; @@ -283,7 +283,7 @@ struct npc_arthasAI : public npc_escortAI uiGossipStep = 0; break; } - uiPhaseTimer = 1000; + uiPhaseTimer = 1000; uiExorcismTimer = 7300; uiWave = 0; } @@ -299,7 +299,7 @@ struct npc_arthasAI : public npc_escortAI if (pInstance) pInstance->SetData(DATA_ARTHAS_EVENT, FAIL); } - + void SpawnTimeRift(uint32 timeRiftID, uint64* guidVector) { m_creature->SummonCreature((uint32)RiftAndSpawnsLocations[timeRiftID][0],RiftAndSpawnsLocations[timeRiftID][1],RiftAndSpawnsLocations[timeRiftID][2],RiftAndSpawnsLocations[timeRiftID][3],RiftAndSpawnsLocations[timeRiftID][4],TEMPSUMMON_TIMED_DESPAWN,11000); @@ -380,7 +380,7 @@ struct npc_arthasAI : public npc_escortAI if (Unit* pDisguised1 = m_creature->SummonCreature(NPC_CITY_MAN4,2403.22f,1205.54f,134.04f,3.311264f,TEMPSUMMON_DEAD_DESPAWN,180000)) { uiInfiniteDraconianGUID[1] = pDisguised1->GetGUID(); - + if (Unit* pDisguised2 = m_creature->SummonCreature(NPC_CITY_MAN,2400.82f,1201.69f,134.01f,1.534082f,TEMPSUMMON_DEAD_DESPAWN,180000)) { uiInfiniteDraconianGUID[2] = pDisguised2->GetGUID(); @@ -733,8 +733,8 @@ struct npc_arthasAI : public npc_escortAI pZombie->UpdateEntry(NPC_ZOMBIE, 0); else //There's no one else to transform uiStep++; - } - else + } + else uiStep++; uiPhaseTimer = 500; break; @@ -742,7 +742,7 @@ struct npc_arthasAI : public npc_escortAI if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID)) DoScriptText(SAY_PHASE207, pMalganis); JumpToNextStep(17000); - break; + break; case 39: if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID)) pMalganis->SetVisibility(VISIBILITY_OFF); @@ -760,7 +760,7 @@ struct npc_arthasAI : public npc_escortAI uiBossEvent = DATA_MEATHOOK_EVENT; if (pInstance) pInstance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS); - + m_creature->SetReactState(REACT_DEFENSIVE); SetDespawnAtFar(false); JumpToNextStep(5000); @@ -794,11 +794,11 @@ struct npc_arthasAI : public npc_escortAI uint32 deadCounter = 0; for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i) { - if (uiWaveGUID[i] == 0) + if (uiWaveGUID[i] == 0) break; ++mobCounter; Unit* pTemp = Unit::GetCreature(*me, uiWaveGUID[i]); - if (!pTemp || pTemp->isDead()) + if (!pTemp || pTemp->isDead()) ++deadCounter; } @@ -806,8 +806,8 @@ struct npc_arthasAI : public npc_escortAI JumpToNextStep(1000); else uiPhaseTimer = 1000; - } - else + } + else JumpToNextStep(500); break; case 49: //Summon Boss @@ -821,7 +821,7 @@ struct npc_arthasAI : public npc_escortAI uiBossID = NPC_SALRAMM; if (Unit* pBoss = m_creature->SummonCreature(uiBossID,2232.19f,1331.933f,126.662f,3.15f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000)) - { + { uiBossGUID = pBoss->GetGUID(); pBoss->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); pBoss->GetMotionMaster()->MovePoint(0, 2194.110f,1332.00f,130.00f); @@ -841,13 +841,13 @@ struct npc_arthasAI : public npc_escortAI else if (uiBossEvent == DATA_SALRAMM_EVENT) { SetHoldState(false); - bStepping = false; + bStepping = false; uiBossEvent = DATA_EPOCH_EVENT; } - } - else if (pInstance->GetData(uiBossEvent) == FAIL) + } + else if (pInstance->GetData(uiBossEvent) == FAIL) npc_escortAI::EnterEvadeMode(); - else + else uiPhaseTimer = 10000; } break; @@ -866,7 +866,7 @@ struct npc_arthasAI : public npc_escortAI if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0])) DoScriptText(SAY_PHASE302, pDisguised0); JumpToNextStep(7000); - break; + break; case 63: DoScriptText(SAY_PHASE303, m_creature); SetHoldState(false); @@ -877,7 +877,7 @@ struct npc_arthasAI : public npc_escortAI case 64: m_creature->HandleEmoteCommand(54); JumpToNextStep(1000); - break; + break; case 65: if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0])) pDisguised0->HandleEmoteCommand(11); @@ -936,12 +936,12 @@ struct npc_arthasAI : public npc_escortAI } JumpToNextStep(5000); break; - case 72: + case 72: case 74: case 76: if (m_creature->isInCombat()) uiPhaseTimer = 1000; - else + else { if (uiStep == 72) DoScriptText(SAY_PHASE308,m_creature); if (uiStep == 74) DoScriptText(SAY_PHASE308,m_creature); @@ -955,7 +955,7 @@ struct npc_arthasAI : public npc_escortAI case 78: if (m_creature->isInCombat()) uiPhaseTimer = 1000; - else + else { DoScriptText(SAY_PHASE312,m_creature); JumpToNextStep(5000); @@ -975,7 +975,7 @@ struct npc_arthasAI : public npc_escortAI m_creature->SetUInt64Value(UNIT_FIELD_TARGET, uiEpochGUID); } JumpToNextStep(18000); - break; + break; case 81: if (pInstance) if (pInstance->GetData(DATA_EPOCH_EVENT) != DONE) @@ -990,13 +990,13 @@ struct npc_arthasAI : public npc_escortAI { //Make Epoch attackable pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_UNK_9); - pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pEpoch->SetReactState(REACT_AGGRESSIVE); } - + } JumpToNextStep(1000); - break; + break; case 83: if (pInstance) { @@ -1008,9 +1008,9 @@ struct npc_arthasAI : public npc_escortAI uiBossEvent = DATA_MAL_GANIS_EVENT; JumpToNextStep(15000); } - else if (pInstance->GetData(DATA_EPOCH_EVENT) == FAIL) + else if (pInstance->GetData(DATA_EPOCH_EVENT) == FAIL) npc_escortAI::EnterEvadeMode(); - else + else uiPhaseTimer = 10000; } break; @@ -1032,7 +1032,7 @@ struct npc_arthasAI : public npc_escortAI { GameObject* pGate = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MAL_GANIS_GATE_1)); pGate->SetGoState(GO_STATE_ACTIVE); - } + } SetHoldState(false); bStepping = false; JumpToNextStep(0); @@ -1059,9 +1059,9 @@ struct npc_arthasAI : public npc_escortAI SetHoldState(false); JumpToNextStep(1000); } - else if (pInstance->GetData(DATA_MAL_GANIS_EVENT) == FAIL) + else if (pInstance->GetData(DATA_MAL_GANIS_EVENT) == FAIL) npc_escortAI::EnterEvadeMode(); - else + else uiPhaseTimer = 10000; } break; @@ -1083,19 +1083,19 @@ struct npc_arthasAI : public npc_escortAI break; } } else uiPhaseTimer -= diff; - } - + } + //Battling skills if (!m_creature->getVictim()) return; - + if (uiExorcismTimer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, DUNGEON_MODE(SPELL_EXORCISM_N, SPELL_EXORCISM_H)); uiExorcismTimer = 7300; } else uiExorcismTimer -= diff; - + if (HealthBelowPct(40)) DoCast(m_creature, SPELL_HOLY_LIGHT); } @@ -1116,7 +1116,7 @@ CreatureAI* GetAI_npc_arthas(Creature* pCreature) bool GossipHello_npc_arthas(Player* pPlayer, Creature* pCreature) { npc_arthasAI* pAI = CAST_AI(npc_arthasAI,pCreature->AI()); - + if (pAI && pAI->bStepping == false) { switch (pAI->uiGossipStep) @@ -1161,7 +1161,7 @@ bool GossipSelect_npc_arthas(Player *pPlayer, Creature *pCreature, uint32 sender if (!pAI) return false; - + switch (action) { case GOSSIP_ACTION_INFO_DEF: diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h index 2fc8135762b..4278ad46500 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -46,7 +46,7 @@ enum Data64 enum Creatures { - NPC_MEATHOOK = 26529, + NPC_MEATHOOK = 26529, NPC_SALRAMM = 26530, NPC_EPOCH = 26532, NPC_MAL_GANIS = 26533, diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index d3d5da802d6..ad04914a47c 100644 --- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -24,15 +24,15 @@ /* Culling of Stratholme encounters: 0 - Meathook 1 - Salramm the Fleshcrafter -2 - Chrono-Lord Epoch -3 - Mal'Ganis +2 - Chrono-Lord Epoch +3 - Mal'Ganis 4 - Infinite Corruptor (Heroic only) */ struct instance_culling_of_stratholme : public ScriptedInstance { instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - + uint64 uiArthas; uint64 uiMeathook; uint64 uiSalramm; @@ -45,10 +45,10 @@ struct instance_culling_of_stratholme : public ScriptedInstance uint64 uiMalGanisGate2; uint64 uiExitGate; uint64 uiMalGanisChest; - + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string str_data; - + bool IsEncounterInProgress() const { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) @@ -56,7 +56,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance return false; } - + void OnCreatureCreate(Creature* pCreature, bool add) { switch(pCreature->GetEntry()) @@ -108,7 +108,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance break; } } - + void SetData(uint32 type, uint32 data) { switch(type) @@ -144,11 +144,11 @@ struct instance_culling_of_stratholme : public ScriptedInstance m_auiEncounter[4] = data; break; } - + if (data == DONE) SaveToDB(); } - + uint32 GetData(uint32 type) { switch(type) @@ -161,7 +161,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance } return 0; } - + uint64 GetData64(uint32 identifier) { switch(identifier) @@ -180,7 +180,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance } return 0; } - + std::string GetSaveData() { OUT_SAVE_INST_DATA; diff --git a/src/scripts/kalimdor/desolace.cpp b/src/scripts/kalimdor/desolace.cpp index 920542d9167..f06c1a4a04d 100644 --- a/src/scripts/kalimdor/desolace.cpp +++ b/src/scripts/kalimdor/desolace.cpp @@ -179,7 +179,7 @@ void AddSC_desolace() newscript->pEffectDummyCreature = &EffectDummyCreature_npc_aged_dying_ancient_kodo; newscript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo; newscript->RegisterSelf(); - + newscript = new Script; newscript->Name = "go_iruxos"; newscript->pGOHello = &GOHello_go_iruxos; diff --git a/src/scripts/kalimdor/durotar.cpp b/src/scripts/kalimdor/durotar.cpp index d10e24f6a26..05af1aae3d4 100644 --- a/src/scripts/kalimdor/durotar.cpp +++ b/src/scripts/kalimdor/durotar.cpp @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ +*/ #include "ScriptedPch.h" @@ -39,24 +39,24 @@ enum LazyPeon struct npc_lazy_peonAI : public ScriptedAI { npc_lazy_peonAI(Creature *c) : ScriptedAI(c) {} - + uint64 uiPlayerGUID; - + uint32 m_uiRebuffTimer; uint32 work; - + void Reset () { uiPlayerGUID = 0; work = false; } - + void MovementInform(uint32 type, uint32 id) { if (id == 1) work = true; } - + void SpellHit(Unit *caster, const SpellEntry *spell) { if (spell->Id == SPELL_AWAKEN_PEON && caster->GetTypeId() == TYPEID_PLAYER @@ -69,7 +69,7 @@ struct npc_lazy_peonAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(1,Lumberpile->GetPositionX()-1,Lumberpile->GetPositionY(),Lumberpile->GetPositionZ()); } } - + void UpdateAI(const uint32 uiDiff) { if (work = true) @@ -95,7 +95,7 @@ CreatureAI* GetAI_npc_lazy_peon(Creature* pCreature) void AddSC_durotar() { Script* newscript; - + newscript = new Script; newscript->Name = "npc_lazy_peon"; newscript->GetAI = &GetAI_npc_lazy_peon; diff --git a/src/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp b/src/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp index 8ac8073e1f1..53fd62e1951 100644 --- a/src/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp +++ b/src/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp @@ -109,7 +109,7 @@ struct instance_razorfen_downs : public ScriptedInstance if (uiType == DATA_GONG_WAVES) { uiGongWaves = uiData; - + switch(uiGongWaves) { case 9: @@ -127,10 +127,10 @@ struct instance_razorfen_downs : public ScriptedInstance return; pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_UNK1); - + uint32 uiCreature = 0; uint8 uiSummonTimes = 0; - + switch(uiGongWaves) { case 1: @@ -147,7 +147,7 @@ struct instance_razorfen_downs : public ScriptedInstance default: break; } - + if (Creature* pCreature = pGo->SummonCreature(uiCreature,2502.635,844.140,46.896,0.633)) { diff --git a/src/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/src/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index d8ffb63a3a7..ad9202df097 100644 --- a/src/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/src/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -117,7 +117,7 @@ struct npc_tomb_creatureAI : public ScriptedAI { if (!UpdateVictim()) return; - + //from acid if (m_creature->GetEntry() == CREATURE_TOMB_REAVER) { diff --git a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 9dc3b4f0e0c..19d62fb8dc4 100644 --- a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -48,7 +48,7 @@ struct boss_ayamissAI : public ScriptedAI uint32 POISONSTINGER_Timer; uint32 SUMMONSWARMER_Timer; uint32 phase; - + ScriptedInstance *pInstance; void Reset() @@ -57,7 +57,7 @@ struct boss_ayamissAI : public ScriptedAI POISONSTINGER_Timer = 30000; SUMMONSWARMER_Timer = 60000; phase=1; - + if (pInstance) pInstance->SetData(DATA_AYAMISS_EVENT, NOT_STARTED); } @@ -67,7 +67,7 @@ struct boss_ayamissAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_AYAMISS_EVENT, IN_PROGRESS); } - + void JustDied(Unit *killer) { if (pInstance) diff --git a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index dff5b0a5585..1f4e0c8d93b 100644 --- a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -35,21 +35,21 @@ struct boss_buruAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance *pInstance; - + void Reset() { if (pInstance) pInstance->SetData(DATA_BURU_EVENT, NOT_STARTED); } - + void EnterCombat(Unit *who) { if (pInstance) pInstance->SetData(DATA_BURU_EVENT, IN_PROGRESS); } - + void JustDied(Unit *killer) { if (pInstance) diff --git a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 1838a69e4ec..8c1ade43a32 100644 --- a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -40,14 +40,14 @@ struct boss_kurinnaxxAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + uint32 uiMortalWoundTimer; uint32 uiSandtrapTimer; uint32 uiWideSlashTimer; uint32 uiSummonPlayerTimer; uint32 uiTrashTimer; bool bIsEnraged; - + ScriptedInstance* pInstance; void Reset() @@ -58,17 +58,17 @@ struct boss_kurinnaxxAI : public ScriptedAI uiWideSlashTimer = urand(10000,15000); uiTrashTimer = urand(20000,25000); uiSummonPlayerTimer = urand(30000,40000); - + if (pInstance) pInstance->SetData(DATA_KURINNAXX_EVENT, NOT_STARTED); } void EnterCombat(Unit *who) - { + { if (pInstance) pInstance->SetData(DATA_KURINNAXX_EVENT, IN_PROGRESS); } - + void JustDied(Unit *killer) { if (pInstance) @@ -101,21 +101,21 @@ struct boss_kurinnaxxAI : public ScriptedAI DoCast(pTarget, SPELL_SANDTRAP); uiSandtrapTimer = 30000; } else uiSandtrapTimer -= diff; - + //Wide Slash spell if (uiWideSlashTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_WIDE_SLASH); uiWideSlashTimer = urand(10000,15000); } else uiWideSlashTimer -= diff; - + //Trash spell if (uiTrashTimer <= diff) { DoCast(m_creature, SPELL_TRASH); uiTrashTimer = urand(20000,25000); } else uiTrashTimer -= diff; - + //Summon Player spell if (uiSummonPlayerTimer <= diff) { diff --git a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 397b0c7463b..d700bad6ff8 100644 --- a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -56,12 +56,12 @@ struct boss_moamAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + uint32 uiTrampleTimer; uint32 uiDrainManaTimer; uint32 uiPhaseTimer; CombatPhase Phase; - + ScriptedInstance *pInstance; void Reset() @@ -71,7 +71,7 @@ struct boss_moamAI : public ScriptedAI uiPhaseTimer = 90000; Phase = NORMAL; m_creature->SetPower(POWER_MANA,0); - + if (pInstance) pInstance->SetData(DATA_MOAM_EVENT, NOT_STARTED); } @@ -79,17 +79,17 @@ struct boss_moamAI : public ScriptedAI void EnterCombat(Unit *who) { DoScriptText(EMOTE_AGGRO, m_creature); - + if (pInstance) pInstance->SetData(DATA_MOAM_EVENT, IN_PROGRESS); } - + void JustDied(Unit *killer) { if (pInstance) pInstance->SetData(DATA_MOAM_EVENT, DONE); } - + void DrainMana() { for (uint8 i=0;i<6;++i) @@ -108,7 +108,7 @@ struct boss_moamAI : public ScriptedAI { if (!UpdateVictim()) return; - + //If we are 100%MANA cast Arcane Erruption if (m_creature->GetPower(POWER_MANA) == m_creature->GetMaxPower(POWER_MANA)) { @@ -116,23 +116,23 @@ struct boss_moamAI : public ScriptedAI DoScriptText(EMOTE_MANA_FULL, m_creature); m_creature->SetPower(POWER_MANA,0); } - + //Trample Spell if (uiTrampleTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_TRAMPLE); uiTrampleTimer = urand(3000,7000); } else uiTrampleTimer -= diff; - + //Drain Mana if (uiDrainManaTimer <= diff) { DrainMana(); uiDrainManaTimer = urand(3000,7000); } else uiDrainManaTimer -= diff; - + DoMeleeAttackIfReady(); - + //After 90secs change phase if (uiPhaseTimer <= diff) { diff --git a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 70520b11d8b..36ccdefd8f6 100644 --- a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -43,21 +43,21 @@ struct boss_ossirianAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance *pInstance; - + void Reset() { if (pInstance) pInstance->SetData(DATA_OSSIRIAN_EVENT, NOT_STARTED); } - + void EnterCombat(Unit *who) { if (pInstance) pInstance->SetData(DATA_OSSIRIAN_EVENT, IN_PROGRESS); } - + void JustDied(Unit *killer) { if (pInstance) diff --git a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 7c9c01ceaad..d3fb028910c 100644 --- a/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/src/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -49,21 +49,21 @@ struct boss_rajaxxAI : public ScriptedAI { pInstance = c->GetInstanceData(); } - + ScriptedInstance *pInstance; - + void Reset() { if (pInstance) pInstance->SetData(DATA_RAJAXX_EVENT, NOT_STARTED); } - + void EnterCombat(Unit *who) { if (pInstance) pInstance->SetData(DATA_RAJAXX_EVENT, IN_PROGRESS); } - + void JustDied(Unit *killer) { if (pInstance) diff --git a/src/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/src/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index fdc2215c670..92faac64f13 100644 --- a/src/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -37,7 +37,7 @@ EndScriptData */ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance { instance_ruins_of_ahn_qiraj(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } - + uint64 uiKurinaxx; uint64 uiRajaxx; uint64 uiMoam; @@ -47,11 +47,11 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance uint8 m_auiEncounter[MAX_ENCOUNTER]; std::string str_data; - + void Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - + uiKurinaxx = 0; uiRajaxx = 0; uiMoam = 0; @@ -59,7 +59,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance uiAyamiss = 0; uiOssirian = 0; } - + bool IsEncounterInProgress() const { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) @@ -67,7 +67,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance return false; } - + void OnCreatureCreate(Creature* pCreature, bool add) { switch (pCreature->GetEntry()) @@ -92,7 +92,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance break; } } - + uint32 GetData(uint32 identifier) { switch(identifier) @@ -104,10 +104,10 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance case DATA_AYAMISS_EVENT: return m_auiEncounter[4]; case DATA_OSSIRIAN_EVENT: return m_auiEncounter[5]; } - + return 0; } - + void SetData(uint32 identifier, uint32 data) { switch(identifier) @@ -131,11 +131,11 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance m_auiEncounter[5] = data; break; } - + if (data == DONE) SaveToDB(); } - + uint64 GetData64(uint32 uiIdentifier) { switch(uiIdentifier) @@ -147,10 +147,10 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance case DATA_AYAMISS: return uiAyamiss; case DATA_OSSIRIAN: return uiOssirian; } - + return 0; } - + std::string GetSaveData() { OUT_SAVE_INST_DATA; @@ -164,7 +164,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance OUT_SAVE_INST_DATA_COMPLETE; return str_data; } - + void Load(const char* in) { if (!in) @@ -189,7 +189,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance m_auiEncounter[3] = data3; m_auiEncounter[4] = data4; m_auiEncounter[5] = data5; - + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; diff --git a/src/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/src/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index e4c729d8ada..61c7e644695 100644 --- a/src/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/src/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -29,7 +29,7 @@ EndScriptData */ * * The first phase is the EYE phase: the Eye of C'Thun is active and C'thun is not active. * During this phase, the "Eye of C'Thun" alternates between 2 sub-phases: - * - PHASE_EYE_GREEN_BEAM: + * - PHASE_EYE_GREEN_BEAM: * 50 sec phase during which the Eye mainly casts its Green Beam every 3 sec. * - PHASE_EYE_RED_BEAM: * 35 sec phase during which the Eye casts its red beam every sec. @@ -39,7 +39,7 @@ EndScriptData */ * This phase starts with the transformation of the Eye into C'Thun (PHASE_CTHUN_TRANSITION). * After the transformation, C'Thun alternates between 2 sub-phases: * - PHASE_CTHUN_STOMACH: - * - C'Thun is almost insensible to all damage (99% damage reduction). + * - C'Thun is almost insensible to all damage (99% damage reduction). * - It spawns 2 tentacles in its stomach. * - C'Thun swallows players. * - This sub-phase ends when the 2 tentacles are killed. Swallowed players are regurgitate. @@ -50,7 +50,7 @@ EndScriptData */ * * This CTHUN phase ends when C'Thun is killed * - * Note: + * Note: * - the current phase is stored in the instance data to be easily shared between the eye and cthun. */ @@ -94,7 +94,7 @@ enum Spells { //***** Main Phase 1 ******** //Eye Spells - SPELL_FREEZE_ANIM = 16245, + SPELL_FREEZE_ANIM = 16245, SPELL_GREEN_BEAM = 26134, SPELL_DARK_GLARE = 26029, SPELL_RED_COLORATION = 22518, //Probably not the right spell but looks similar @@ -331,7 +331,7 @@ struct eye_of_cthunAI : public Scripted_NoMovementAI //Freeze animation DoCast(m_creature, SPELL_FREEZE_ANIM); m_creature->SetOrientation(DarkGlareAngle); - m_creature->StopMoving(); + m_creature->StopMoving(); //Darkbeam for 35 seconds PhaseTimer = 35000; diff --git a/src/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/src/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index af6158b2e24..c26a3bd108b 100644 --- a/src/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/src/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - + #include "ScriptedPch.h" #define NPC_GAHZRILLA 7273 @@ -42,7 +42,7 @@ struct instance_zulfarrak : public ScriptedInstance } } }; - + InstanceData* GetInstanceData_instance_zulfarrak(Map* pMap) { return new instance_zulfarrak(pMap); 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); diff --git a/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp index a1f6e9816a5..34a2e19d98c 100644 --- a/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp +++ b/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp @@ -144,7 +144,7 @@ struct boss_talon_king_ikissAI : public ScriptedAI //second top aggro target in normal, random target in heroic correct? if (IsHeroic()) pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); - else + else pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,1); if (pTarget) diff --git a/src/scripts/outland/boss_doomlord_kazzak.cpp b/src/scripts/outland/boss_doomlord_kazzak.cpp index 2d2339d2c26..b5aa660a5c5 100644 --- a/src/scripts/outland/boss_doomlord_kazzak.cpp +++ b/src/scripts/outland/boss_doomlord_kazzak.cpp @@ -26,13 +26,13 @@ EndScriptData */ #define SAY_INTRO -1000147 #define SAY_AGGRO1 -1000148 #define SAY_AGGRO2 -1000149 -#define SAY_SURPREME1 -1000154 +#define SAY_SURPREME1 -1000154 #define SAY_SURPREME2 -1000149 #define SAY_KILL1 -1000150 #define SAY_KILL2 -1000151 -#define SAY_KILL3 -1000152 -#define SAY_DEATH -1000155 -#define EMOTE_FRENZY -1000151 +#define SAY_KILL3 -1000152 +#define SAY_DEATH -1000155 +#define EMOTE_FRENZY -1000151 #define SAY_RAND1 -1000158 #define SAY_RAND2 -1000157 diff --git a/src/scripts/outland/boss_doomwalker.cpp b/src/scripts/outland/boss_doomwalker.cpp index 761f9e22289..c1b6241802e 100644 --- a/src/scripts/outland/boss_doomwalker.cpp +++ b/src/scripts/outland/boss_doomwalker.cpp @@ -24,10 +24,10 @@ EndScriptData */ #include "ScriptedPch.h" #define SAY_AGGRO -1000159 -#define SAY_EARTHQUAKE_1 -1000160 -#define SAY_EARTHQUAKE_2 -1000161 +#define SAY_EARTHQUAKE_1 -1000160 +#define SAY_EARTHQUAKE_2 -1000161 #define SAY_OVERRUN_1 -1000162 -#define SAY_OVERRUN_2 -1000163 +#define SAY_OVERRUN_2 -1000163 #define SAY_SLAY_1 -1000164 #define SAY_SLAY_2 -1000165 #define SAY_SLAY_3 -1000166 diff --git a/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 9b201ef4348..ee353c9d82b 100644 --- a/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -155,7 +155,7 @@ struct mob_ragin_flamesAI : public ScriptedAI { mob_ragin_flamesAI(Creature *c) : ScriptedAI(c) { - pInstance = c->GetInstanceData(); + pInstance = c->GetInstanceData(); } ScriptedInstance *pInstance; diff --git a/src/scripts/world/areatrigger_scripts.cpp b/src/scripts/world/areatrigger_scripts.cpp index bda3620ce57..96bdbbeb315 100644 --- a/src/scripts/world/areatrigger_scripts.cpp +++ b/src/scripts/world/areatrigger_scripts.cpp @@ -138,7 +138,7 @@ bool AreaTrigger_at_ravenholdt(Player* pPlayer, const AreaTriggerEntry* pAt) enum eWarsongFarms { QUEST_THE_WARSONG_FARMS = 11686, - + NPC_CREDIT_SLAUGHTERHOUSE = 25672, NPC_CREDIT_GRAINERY = 25669, NPC_CREDIT_TORP_FARM = 25671, diff --git a/src/scripts/world/go_scripts.cpp b/src/scripts/world/go_scripts.cpp index 22dd21a1075..25e794ec5ee 100644 --- a/src/scripts/world/go_scripts.cpp +++ b/src/scripts/world/go_scripts.cpp @@ -715,8 +715,8 @@ bool GOHello_go_soulwell(Player *pPlayer, GameObject* pGO) if (!pPlayer->IsInSameRaidWith(static_cast<Player *>(caster))) return true; - // Repeating this at every use is ugly and inefficient. But as long as we don't have proper - // GO scripting with at least On Create and On Update events, the other options are no less + // Repeating this at every use is ugly and inefficient. But as long as we don't have proper + // GO scripting with at least On Create and On Update events, the other options are no less // ugly and hacky. uint32 newSpell = 0; if (pGO->GetEntry() == 193169) // Soulwell for rank 2 @@ -855,8 +855,8 @@ bool GOHello_go_amberpine_outhouse(Player *pPlayer, GameObject *pGO) } else pPlayer->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_INUSE, pGO->GetGUID()); - return true; -} + return true; +} bool GOSelect_go_amberpine_outhouse(Player *pPlayer, GameObject *pGO, uint32 uiSender, uint32 uiAction) { @@ -1044,7 +1044,7 @@ void AddSC_go_scripts() newscript->Name = "go_dragonflayer_cage"; newscript->pGOHello = &GOHello_go_dragonflayer_cage; newscript->RegisterSelf(); - + newscript = new Script; newscript->Name = "go_amberpine_outhouse"; newscript->pGOHello = &GOHello_go_amberpine_outhouse; diff --git a/src/scripts/world/item_scripts.cpp b/src/scripts/world/item_scripts.cpp index 6787e8df303..fe5c304dc75 100644 --- a/src/scripts/world/item_scripts.cpp +++ b/src/scripts/world/item_scripts.cpp @@ -352,7 +352,7 @@ bool ItemUse_item_dehta_trap_smasher(Player* pPlayer, Item* pItem, const SpellCa { Creature* pMammoth; GameObject* pTrap; - + if (pPlayer->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) == QUEST_STATUS_INCOMPLETE && (pMammoth = pPlayer->FindNearestCreature(NPC_TRAPPED_MAMMOTH_CALF,5.0f)) && ((pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_1,5.0f)) || diff --git a/src/scripts/world/npc_innkeeper.cpp b/src/scripts/world/npc_innkeeper.cpp index 04cd92722d6..b53ba6f92ff 100644 --- a/src/scripts/world/npc_innkeeper.cpp +++ b/src/scripts/world/npc_innkeeper.cpp @@ -37,7 +37,7 @@ EndScriptData */ #define LOCALE_INNKEEPER_0 "Make this inn my home." #define LOCALE_INNKEEPER_3 "Ich möchte dieses Gasthaus zu meinem Heimatort machen." - + bool GossipHello_npc_innkeeper(Player *pPlayer, Creature *pCreature) { if (IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED)) @@ -80,7 +80,7 @@ bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiS if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED)) { pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true); - + if (urand(0, 1)) pPlayer->CastSpell(pPlayer, SPELL_TREAT, true); else diff --git a/src/shared/Database/SqlOperations.h b/src/shared/Database/SqlOperations.h index 8c012afbf72..d450a816c4e 100644 --- a/src/shared/Database/SqlOperations.h +++ b/src/shared/Database/SqlOperations.h @@ -141,7 +141,7 @@ public: { return -1; } - + return 0; } diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp index ef0f9b5cd3d..92923b3a6a4 100644 --- a/src/trinitycore/CliRunnable.cpp +++ b/src/trinitycore/CliRunnable.cpp @@ -240,7 +240,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* /*args*/) ///- Get the username, last IP and GM level of each account // No SQL injection. account is uint32. - QueryResult_AutoPtr resultLogin = + QueryResult_AutoPtr resultLogin = loginDatabase.PQuery("SELECT a.username, a.last_ip, aa.gmlevel, a.expansion " "FROM account a " "LEFT JOIN account_access aa " diff --git a/src/trinityrealm/Main.cpp b/src/trinityrealm/Main.cpp index bcc039e8fb1..aba65e06c9a 100644 --- a/src/trinityrealm/Main.cpp +++ b/src/trinityrealm/Main.cpp @@ -206,9 +206,9 @@ extern int main(int argc, char **argv) uint16 rmport = sConfig.GetIntDefault("RealmServerPort", DEFAULT_REALMSERVER_PORT); std::string bind_ip = sConfig.GetStringDefault("BindIP", "0.0.0.0"); - + ACE_INET_Addr bind_addr(rmport, bind_ip.c_str()); - + if(acceptor.open(bind_addr, ACE_Reactor::instance(), ACE_NONBLOCK) == -1) { sLog.outError("Trinity realm can not bind to %s:%d", bind_ip.c_str(), rmport); |