diff options
54 files changed, 159 insertions, 159 deletions
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp index 065a8ed8289..23e97be8dcb 100644 --- a/src/game/ArenaTeam.cpp +++ b/src/game/ArenaTeam.cpp @@ -46,7 +46,7 @@ ArenaTeam::ArenaTeam() m_stats.games_week = 0; m_stats.games_season = 0; m_stats.rank = 0; - if (sWorld.getConfig(CONFIG_ARENA_START_RATING)>=0) + if (sWorld.getConfig(CONFIG_ARENA_START_RATING) >= 0) m_stats.rating = sWorld.getConfig(CONFIG_ARENA_START_RATING); else if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) >= 6) m_stats.rating = 0; @@ -518,7 +518,7 @@ uint32 ArenaTeam::GetPoints(uint32 MemberRating) uint32 rating = MemberRating + 150 < m_stats.rating ? MemberRating : m_stats.rating; - if (rating<=1500) + if (rating <= 1500) { if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) < 5) points = (float)rating * 0.22f + 14.0f; diff --git a/src/game/AuctionHouseBot.h b/src/game/AuctionHouseBot.h index 7fcd234bafa..208a09aa0b2 100644 --- a/src/game/AuctionHouseBot.h +++ b/src/game/AuctionHouseBot.h @@ -163,7 +163,7 @@ public: } uint32 GetMinItems() { - if ((minItems == 0) && (maxItems)) + if ((minItems == 0) && (maxItems)) return maxItems; else if ((maxItems) && (minItems > maxItems)) return maxItems; diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp index 1d28258e33a..f18661d8015 100644 --- a/src/game/BattleGroundAV.cpp +++ b/src/game/BattleGroundAV.cpp @@ -90,7 +90,7 @@ void BattleGroundAV::HandleKillUnit(Creature *unit, Player *killer) RewardHonorToTeam(GetBonusHonor(BG_AV_KILL_CAPTAIN),HORDE); UpdateScore(ALLIANCE,(-1)*BG_AV_RES_CAPTAIN); //spawn destroyed aura - for (uint8 i=0; i<=9; i++) + for (uint8 i=0; i <= 9; i++) SpawnBGObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+i,RESPAWN_IMMEDIATELY); Creature* creature = GetBGCreature(AV_CPLACE_HERALD); if (creature) @@ -109,7 +109,7 @@ void BattleGroundAV::HandleKillUnit(Creature *unit, Player *killer) RewardHonorToTeam(GetBonusHonor(BG_AV_KILL_CAPTAIN),ALLIANCE); UpdateScore(HORDE,(-1)*BG_AV_RES_CAPTAIN); //spawn destroyed aura - for (uint8 i=0; i<=9; i++) + for (uint8 i=0; i <= 9; i++) SpawnBGObject(BG_AV_OBJECT_BURN_BUILDING_HORDE+i,RESPAWN_IMMEDIATELY); Creature* creature = GetBGCreature(AV_CPLACE_HERALD); if (creature) @@ -271,10 +271,10 @@ Creature* BattleGroundAV::AddAVCreature(uint16 cinfoid, uint16 type) if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_A_CAPTAIN][0] || creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN][0]) creature->SetRespawnDelay(RESPAWN_ONE_DAY); // TODO: look if this can be done by database + also add this for the wingcommanders - if ((isStatic && cinfoid>=10 && cinfoid<=14) || (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid<=AV_NPC_A_GRAVEDEFENSE3) || + if ((isStatic && cinfoid >= 10 && cinfoid <= 14) || (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid <= AV_NPC_A_GRAVEDEFENSE3) || (cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3)))) { - if (!isStatic && ((cinfoid>=AV_NPC_A_GRAVEDEFENSE0 && cinfoid<=AV_NPC_A_GRAVEDEFENSE3) + if (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid <= AV_NPC_A_GRAVEDEFENSE3) || (cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3))) { CreatureData &data = objmgr.NewOrExistCreatureData(creature->GetDBTableGUIDLow()); @@ -301,7 +301,7 @@ void BattleGroundAV::Update(uint32 diff) if (GetStatus() == STATUS_IN_PROGRESS) { - for (uint8 i=0; i<=1; i++)//0=alliance, 1=horde + for (uint8 i=0; i <= 1; i++)//0=alliance, 1=horde { if (!m_CaptainAlive[i]) continue; @@ -366,9 +366,9 @@ void BattleGroundAV::StartingEventCloseDoors() void BattleGroundAV::StartingEventOpenDoors() { sLog.outDebug("BG_AV: start spawning mine stuff"); - for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i<=BG_AV_OBJECT_MINE_SUPPLY_N_MAX; i++) + for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_N_MAX; i++) SpawnBGObject(i,RESPAWN_IMMEDIATELY); - for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i<=BG_AV_OBJECT_MINE_SUPPLY_S_MAX; i++) + for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_S_MAX; i++) SpawnBGObject(i,RESPAWN_IMMEDIATELY); for (uint8 mine = AV_NORTH_MINE; mine <= AV_SOUTH_MINE; mine++) //mine population ChangeMineOwner(mine, AV_NEUTRAL_TEAM,true); @@ -414,7 +414,7 @@ void BattleGroundAV::EndBattleGround(uint32 winner) } } - for (int i=0; i<=1; i++) //0=ally 1=horde + for (int i=0; i <= 1; i++) //0=ally 1=horde { if (m_CaptainAlive[i]) { @@ -541,7 +541,7 @@ void BattleGroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node) else sLog.outError("BG_AV: playerdestroyedpoint: marshal %i doesn't exist",AV_CPLACE_A_MARSHAL_SOUTH + tmp); //spawn destroyed aura - for (uint8 i=0; i<=9; i++) + for (uint8 i=0; i <= 9; i++) SpawnBGObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + i + (tmp * 10),RESPAWN_IMMEDIATELY); UpdateScore((owner == ALLIANCE) ? HORDE : ALLIANCE, (-1)*BG_AV_RES_TOWER); @@ -1174,7 +1174,7 @@ bool BattleGroundAV::SetupBattleGround() return false; } } - for (uint8 j=0; j<=9; j++) //burning aura + for (uint8 j=0; j <= 9; j++) //burning aura { if (!AddObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j,BG_AV_OBJECTID_FIRE,BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][0],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][1],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][2],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2),RESPAWN_ONE_DAY)) { @@ -1186,7 +1186,7 @@ bool BattleGroundAV::SetupBattleGround() } for (uint8 i=0; i<2; i++) //burning aura for buildings { - for (uint8 j=0; j<=9; j++) + for (uint8 j=0; j <= 9; j++) { if (j<5) { @@ -1206,7 +1206,7 @@ bool BattleGroundAV::SetupBattleGround() } } } - for (uint16 i= 0; i<=(BG_AV_OBJECT_MINE_SUPPLY_N_MAX-BG_AV_OBJECT_MINE_SUPPLY_N_MIN); i++) + for (uint16 i= 0; i <= (BG_AV_OBJECT_MINE_SUPPLY_N_MAX-BG_AV_OBJECT_MINE_SUPPLY_N_MIN); i++) { if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_N_MIN+i,BG_AV_OBJECTID_MINE_N,BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][0],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][1],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][2],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2),RESPAWN_ONE_DAY)) { @@ -1214,7 +1214,7 @@ bool BattleGroundAV::SetupBattleGround() return false; } } - for (uint16 i= 0 ; i<=(BG_AV_OBJECT_MINE_SUPPLY_S_MAX-BG_AV_OBJECT_MINE_SUPPLY_S_MIN); i++) + for (uint16 i= 0 ; i <= (BG_AV_OBJECT_MINE_SUPPLY_S_MAX-BG_AV_OBJECT_MINE_SUPPLY_S_MIN); i++) { if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_S_MIN+i,BG_AV_OBJECTID_MINE_S,BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][0],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][1],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][2],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2),RESPAWN_ONE_DAY)) { @@ -1253,7 +1253,7 @@ bool BattleGroundAV::SetupBattleGround() SpawnBGObject(i, RESPAWN_IMMEDIATELY); for (i = BG_AV_OBJECT_FLAG_H_ICEBLOOD_GRAVE; i <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_WTOWER ; i++){ SpawnBGObject(i, RESPAWN_IMMEDIATELY); - if (i<=BG_AV_OBJECT_FLAG_H_FROSTWOLF_HUT) + if (i <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_HUT) SpawnBGObject(BG_AV_OBJECT_AURA_H_FIRSTAID_STATION+3*GetNodeThroughObject(i),RESPAWN_IMMEDIATELY); } for (i = BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH; i <= BG_AV_OBJECT_TFLAG_A_STONEHEART_BUNKER; i+=2) @@ -1288,7 +1288,7 @@ bool BattleGroundAV::SetupBattleGround() AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE); //spawn the marshals (those who get deleted, if a tower gets destroyed) sLog.outDebug("BG_AV: start spawning marshal creatures"); - for (i=AV_NPC_A_MARSHAL_SOUTH; i<= AV_NPC_H_MARSHAL_WTOWER; i++) + for (i=AV_NPC_A_MARSHAL_SOUTH; i <= AV_NPC_H_MARSHAL_WTOWER; i++) AddAVCreature(i,AV_CPLACE_A_MARSHAL_SOUTH+(i-AV_NPC_A_MARSHAL_SOUTH)); AddAVCreature(AV_NPC_HERALD,AV_CPLACE_HERALD); return true; diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index ea324f3d5eb..fc4539c7d72 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -1263,12 +1263,12 @@ valid examples: color <<= 4; // check for hex char - if (c >= '0' && c <='9') + if (c >= '0' && c <= '9') { color |= c-'0'; continue; } - if (c >= 'a' && c <='f') + if (c >= 'a' && c <= 'f') { color |= 10+c-'a'; continue; @@ -1320,7 +1320,7 @@ valid examples: negativeNumber = false; while ((c = reader.get())!=':') { - if (c >='0' && c<='9') + if (c >='0' && c <= '9') { propertyId*=10; propertyId += c-'0'; @@ -1347,7 +1347,7 @@ valid examples: } // ignore other integers - while ((c >='0' && c <='9') || c == ':') + while ((c >='0' && c <= '9') || c == ':') { reader.ignore(1); c = reader.peek(); @@ -1359,7 +1359,7 @@ valid examples: uint32 questid= 0; // read questid char c = reader.peek(); - while (c >='0' && c<='9') + while (c >='0' && c <= '9') { reader.ignore(1); questid *= 10; @@ -1435,7 +1435,7 @@ valid examples: uint32 spellid = 0; // read spell entry char c = reader.peek(); - while (c >='0' && c<='9') + while (c >='0' && c <= '9') { reader.ignore(1); spellid *= 10; @@ -1454,7 +1454,7 @@ valid examples: uint32 spellid = 0; // read spell entry char c = reader.peek(); - while (c >='0' && c<='9') + while (c >='0' && c <= '9') { reader.ignore(1); spellid *= 10; @@ -1493,7 +1493,7 @@ valid examples: reader.getline(buffer, 256, ':'); uint32 glyphId = 0; char c = reader.peek(); - while (c>='0' && c <='9') + while (c >= '0' && c <= '9') { glyphId *= 10; glyphId += c-'0'; diff --git a/src/game/Creature.h b/src/game/Creature.h index a3fbfc828b1..3ffaa5e401f 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -323,7 +323,7 @@ struct VendorItemData VendorItem* GetItem(uint32 slot) const { - if (slot>=m_items.size()) return NULL; + if (slot >= m_items.size()) return NULL; return m_items[slot]; } bool Empty() const { return m_items.empty(); } diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h index d5cff8c4b9b..abbdc24036b 100644 --- a/src/game/CreatureAI.h +++ b/src/game/CreatureAI.h @@ -87,7 +87,7 @@ class CreatureAI : public UnitAI virtual ~CreatureAI() {} - /// == Reactions At ================================= + /// == Reactions At ================================= // Called if IsVisible(Unit *who) is true at each *who move, reaction at visibility zone enter void MoveInLineOfSight_Safe(Unit *who); @@ -146,7 +146,7 @@ class CreatureAI : public UnitAI // Called at text emote receive from player virtual void ReceiveEmote(Player* pPlayer, uint32 text_emote) {} - /// == Triggered Actions Requested ================== + /// == Triggered Actions Requested ================== // Called when creature attack expected (if creature can and no have current victim) // Note: for reaction at hostile action must be called AttackedBy function. @@ -155,7 +155,7 @@ class CreatureAI : public UnitAI // Called at World update tick //virtual void UpdateAI(const uint32 diff) {} - /// == State checks ================================= + /// == State checks ================================= // Is unit visible for MoveInLineOfSight //virtual bool IsVisible(Unit *) const { return false; } @@ -166,7 +166,7 @@ class CreatureAI : public UnitAI // Called when victim entered water and creature can not enter water //virtual bool canReachByRangeAttack(Unit*) { return false; } - /// == Fields ======================================= + /// == Fields ======================================= // Pointer to controlled by AI creature //Creature* const m_creature; diff --git a/src/game/DBCEnums.h b/src/game/DBCEnums.h index 967a5a683f1..3a3a46fdfaa 100644 --- a/src/game/DBCEnums.h +++ b/src/game/DBCEnums.h @@ -235,7 +235,7 @@ enum AreaFlags AREA_FLAG_UNUSED2 = 0x00020000, // not used now (no area/zones with this flag set in 3.0.3) AREA_FLAG_UNK5 = 0x00040000, // only used for Amani Pass, Hatchet Hills AREA_FLAG_UNK6 = 0x00080000, // Valgarde and Acherus: The Ebon Hold - AREA_FLAG_LOWLEVEL = 0x00100000, // used for some starting areas with area_level <=15 + AREA_FLAG_LOWLEVEL = 0x00100000, // used for some starting areas with area_level <= 15 AREA_FLAG_TOWN = 0x00200000, // small towns with Inn AREA_FLAG_UNK7 = 0x00400000, // Warsong Hold, Acherus: The Ebon Hold, New Agamand Inn, Vengeance Landing Inn AREA_FLAG_UNK8 = 0x00800000, // Westguard Inn, Acherus: The Ebon Hold, Valgarde diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index b71f0a533ea..68aae64e77d 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -423,7 +423,7 @@ void LoadDBCStores(const std::string& dataPath) // store class talent tab pages uint32 cls = 1; - for (uint32 m=1; !(m & talentTabInfo->ClassMask) && cls < MAX_CLASSES; m <<=1, ++cls) {} + for (uint32 m=1; !(m & talentTabInfo->ClassMask) && cls < MAX_CLASSES; m <<= 1, ++cls) {} sTalentTabPages[cls][talentTabInfo->tabpage]=talentTabId; } diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index 8c38c9ca3a3..78867d593e3 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -840,7 +840,7 @@ struct FactionTemplateEntry if (entry.faction) { for (int i = 0; i < 4; ++i) - if (enemyFaction[i] == entry.faction) + if (enemyFaction[i] == entry.faction) return false; for (int i = 0; i < 4; ++i) if (friendFaction[i] == entry.faction) @@ -855,7 +855,7 @@ struct FactionTemplateEntry if (entry.faction) { for (int i = 0; i < 4; ++i) - if (enemyFaction[i] == entry.faction) + if (enemyFaction[i] == entry.faction) return true; for (int i = 0; i < 4; ++i) if (friendFaction[i] == entry.faction) @@ -1593,7 +1593,7 @@ struct SpellShapeshiftEntry //char* Name[16]; // 2-17 unused //uint32 NameFlags; // 18 unused uint32 flags1; // 19 - int32 creatureType; // 20 <=0 humanoid, other normal creature types + int32 creatureType; // 20 <= 0 humanoid, other normal creature types //uint32 unk1; // 21 unused uint32 attackSpeed; // 22 //uint32 modelID; // 23 unused, alliance modelid (where horde case?) diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp index 7490f587b9d..02ebbc329b4 100644 --- a/src/game/Debugcmds.cpp +++ b/src/game/Debugcmds.cpp @@ -1101,11 +1101,11 @@ bool ChatHandler::HandleDebugUpdateCommand(const char* args) //check updateIndex if (chr->GetTypeId() == TYPEID_PLAYER) { - if (updateIndex>=PLAYER_END) return true; + if (updateIndex >= PLAYER_END) return true; } else { - if (updateIndex>=UNIT_END) return true; + if (updateIndex >= UNIT_END) return true; } char* pvalue = strtok(NULL, " "); diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 45db58fa813..d4dc05a9b78 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -1537,7 +1537,7 @@ uint32 Group::CanJoinBattleGroundQueue(BattleGround const* bgOrTemplate, BattleG } //=================================================== -//============== Roll =============================== +//============== Roll =============================== //=================================================== void Roll::targetObjectBuildLink() diff --git a/src/game/Group.h b/src/game/Group.h index ca29d330367..8d606cd7f01 100644 --- a/src/game/Group.h +++ b/src/game/Group.h @@ -189,7 +189,7 @@ class Group void Disband(bool hideDestroy=false); // properties accessories - bool IsFull() const { return (m_groupType == GROUPTYPE_NORMAL) ? (m_memberSlots.size()>=MAXGROUPSIZE) : (m_memberSlots.size()>=MAXRAIDSIZE); } + bool IsFull() const { return (m_groupType == GROUPTYPE_NORMAL) ? (m_memberSlots.size() >= MAXGROUPSIZE) : (m_memberSlots.size() >= MAXRAIDSIZE); } bool isRaidGroup() const { return m_groupType == GROUPTYPE_RAID; } bool isBGGroup() const { return m_bgGroup != NULL; } bool IsCreated() const { return GetMembersCount() > 0; } diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index 226932fd7f5..d58d5816277 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -635,7 +635,7 @@ void Guild::DelRank() // delete lowest guild_rank uint32 rank = GetLowestRank(); - CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE rid>='%u' AND guildid='%u'", rank, m_Id); + CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE rid >= '%u' AND guildid='%u'", rank, m_Id); m_Ranks.pop_back(); } @@ -1804,7 +1804,7 @@ uint8 Guild::CanStoreItem(uint8 tab, uint8 slot, GuildItemPosCountVec &dest, uin return EQUIP_ERR_CANT_DROP_SOULBOUND; // in specific tab - if (tab >= m_TabListMap.size() || tab >= GUILD_BANK_MAX_TABS) + if (tab >= m_TabListMap.size() || tab >= GUILD_BANK_MAX_TABS) return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; // in specific slot diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 75f344a65a5..76f1e3363c0 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -290,7 +290,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff) sLog.outDebug("Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff); - if (GetUInt32Value(ITEM_FIELD_DURATION)<=diff) + if (GetUInt32Value(ITEM_FIELD_DURATION) <= diff) { sScriptMgr.ItemExpire(owner, GetProto()); owner->DestroyItem(GetBagSlot(), GetSlot(), true); @@ -1007,7 +1007,7 @@ bool Item::IsBindedNotWith(Player const* player) const return false; // own item - if (GetOwnerGUID() == player->GetGUID()) + if (GetOwnerGUID() == player->GetGUID()) return false; // not BOA item case diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index 858db7d0a34..a22078243f2 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -540,7 +540,7 @@ struct ItemPrototype uint32 RequiredCityRank; uint32 RequiredReputationFaction; // id from Faction.dbc uint32 RequiredReputationRank; - int32 MaxCount; // <=0: no limit + int32 MaxCount; // <= 0: no limit int32 Stackable; // 0: not allowed, -1: put in player coin info tab and don't limit stacking (so 1 slot) uint32 ContainerSlots; uint32 StatsCount; diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 86bf4e007f2..33f1533c1d9 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -4248,7 +4248,7 @@ bool ChatHandler::HandleDamageCommand(const char * args) return false; int32 damage_int = atoi((char*)damageStr); - if (damage_int <=0) + if (damage_int <= 0) return true; uint32 damage = damage_int; @@ -5972,7 +5972,7 @@ bool ChatHandler::HandleBanInfoIPCommand(const char *args) bool ChatHandler::HandleBanListCharacterCommand(const char *args) { - loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); char* cFilter = strtok ((char*)args, " "); if (!cFilter) @@ -5992,7 +5992,7 @@ bool ChatHandler::HandleBanListCharacterCommand(const char *args) bool ChatHandler::HandleBanListAccountCommand(const char *args) { - loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); char* cFilter = strtok((char*)args, " "); std::string filter = cFilter ? cFilter : ""; @@ -6097,7 +6097,7 @@ bool ChatHandler::HandleBanListHelper(QueryResult_AutoPtr result) bool ChatHandler::HandleBanListIPCommand(const char *args) { - loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); char* cFilter = strtok((char*)args, " "); std::string filter = cFilter ? cFilter : ""; diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index e73a94b5b4d..55aefb3c1f5 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -352,7 +352,7 @@ void WorldSession::DoLootRelease(uint64 lguid) else if (go->GetGoType() == GAMEOBJECT_TYPE_FISHINGHOLE) { // The fishing hole used once more go->AddUse(); // if the max usage is reached, will be despawned in next tick - if (go->GetUseCount()>=irand(go->GetGOInfo()->fishinghole.minSuccessOpens,go->GetGOInfo()->fishinghole.maxSuccessOpens)) + if (go->GetUseCount() >= irand(go->GetGOInfo()->fishinghole.minSuccessOpens,go->GetGOInfo()->fishinghole.maxSuccessOpens)) { go->SetLootState(GO_JUST_DEACTIVATED); } diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index e8a6fefbd72..9b41b3d4cbd 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -1192,7 +1192,7 @@ bool LootTemplate::HasQuestDrop(LootTemplateMap const& store, uint8 groupId) con if (i->mincountOrRef < 0) // References { LootTemplateMap::const_iterator Referenced = store.find(-i->mincountOrRef); - if (Referenced == store.end()) + if (Referenced == store.end()) continue; // Error message [should be] already printed at loading stage if (Referenced->second->HasQuestDrop(store, i->group)) return true; diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 7889b61e749..d74a8d1d664 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1207,7 +1207,7 @@ bool GridMap::loadData(char *filename) if (!in) return true; fread(&header, sizeof(header),1,in); - if (header.mapMagic == uint32(MAP_MAGIC) && + if (header.mapMagic == uint32(MAP_MAGIC) && header.versionMagic == uint32(MAP_VERSION_MAGIC)) { // loadup area data @@ -2924,7 +2924,7 @@ void Map::ScriptsProcess() switch(GUID_HIPART(step.sourceGUID)) { case HIGHGUID_ITEM: - // case HIGHGUID_CONTAINER: == HIGHGUID_ITEM + // case HIGHGUID_CONTAINER: == HIGHGUID_ITEM { Player* player = HashMapHolder<Player>::Find(step.ownerGUID); if (player) diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp index 956c85f8869..bb13caa3299 100644 --- a/src/game/MapManager.cpp +++ b/src/game/MapManager.cpp @@ -188,7 +188,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player) if (!mapDiff) { bool isNormalTargetMap = entry->map_type == MAP_RAID - ? (player->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL) + ? (player->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL) : (player->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL); //Send aborted message diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index ef474031481..f673501145d 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3192,7 +3192,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassL void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const { - if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES) + if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES) return; PlayerInfo const* pInfo = &playerInfo[race][class_]; @@ -5972,7 +5972,7 @@ void ObjectMgr::SetHighestGuids() if (result) m_hiItemGuid = (*result)[0].GetUInt32()+1; - // Cleanup other tables from not existed guids (>=m_hiItemGuid) + // Cleanup other tables from not existed guids ( >= m_hiItemGuid) CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", m_hiItemGuid); CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", m_hiItemGuid); CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", m_hiItemGuid); @@ -6013,7 +6013,7 @@ void ObjectMgr::SetHighestGuids() uint32 ObjectMgr::GenerateArenaTeamId() { - if (m_arenaTeamId>=0xFFFFFFFE) + if (m_arenaTeamId >= 0xFFFFFFFE) { sLog.outError("Arena team ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); @@ -6023,7 +6023,7 @@ uint32 ObjectMgr::GenerateArenaTeamId() uint32 ObjectMgr::GenerateAuctionID() { - if (m_auctionid>=0xFFFFFFFE) + if (m_auctionid >= 0xFFFFFFFE) { sLog.outError("Auctions ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); @@ -6033,7 +6033,7 @@ uint32 ObjectMgr::GenerateAuctionID() uint64 ObjectMgr::GenerateEquipmentSetGuid() { - if (m_equipmentSetGuid>=0xFFFFFFFFFFFFFFFEll) + if (m_equipmentSetGuid >= 0xFFFFFFFFFFFFFFFEll) { sLog.outError("EquipmentSet guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); @@ -6043,7 +6043,7 @@ uint64 ObjectMgr::GenerateEquipmentSetGuid() uint32 ObjectMgr::GenerateGuildId() { - if (m_guildId>=0xFFFFFFFE) + if (m_guildId >= 0xFFFFFFFE) { sLog.outError("Guild ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); @@ -6053,7 +6053,7 @@ uint32 ObjectMgr::GenerateGuildId() uint32 ObjectMgr::GenerateMailID() { - if (m_mailid>=0xFFFFFFFE) + if (m_mailid >= 0xFFFFFFFE) { sLog.outError("Mail ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); @@ -6063,7 +6063,7 @@ uint32 ObjectMgr::GenerateMailID() uint32 ObjectMgr::GenerateItemTextID() { - if (m_ItemTextId>=0xFFFFFFFE) + if (m_ItemTextId >= 0xFFFFFFFE) { sLog.outError("Item text ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); @@ -6090,56 +6090,56 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh) switch(guidhigh) { case HIGHGUID_ITEM: - if (m_hiItemGuid>=0xFFFFFFFE) + if (m_hiItemGuid >= 0xFFFFFFFE) { sLog.outError("Item guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiItemGuid++; case HIGHGUID_UNIT: - if (m_hiCreatureGuid>=0x00FFFFFE) + if (m_hiCreatureGuid >= 0x00FFFFFE) { sLog.outError("Creature guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiCreatureGuid++; case HIGHGUID_PET: - if (m_hiPetGuid>=0x00FFFFFE) + if (m_hiPetGuid >= 0x00FFFFFE) { sLog.outError("Pet guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiPetGuid++; case HIGHGUID_VEHICLE: - if (m_hiVehicleGuid>=0x00FFFFFF) + if (m_hiVehicleGuid >= 0x00FFFFFF) { sLog.outError("Vehicle guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiVehicleGuid++; case HIGHGUID_PLAYER: - if (m_hiCharGuid>=0xFFFFFFFE) + if (m_hiCharGuid >= 0xFFFFFFFE) { sLog.outError("Players guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiCharGuid++; case HIGHGUID_GAMEOBJECT: - if (m_hiGoGuid>=0x00FFFFFE) + if (m_hiGoGuid >= 0x00FFFFFE) { sLog.outError("Gameobject guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiGoGuid++; case HIGHGUID_CORPSE: - if (m_hiCorpseGuid>=0xFFFFFFFE) + if (m_hiCorpseGuid >= 0xFFFFFFFE) { sLog.outError("Corpse guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiCorpseGuid++; case HIGHGUID_DYNAMICOBJECT: - if (m_hiDoGuid>=0xFFFFFFFE) + if (m_hiDoGuid >= 0xFFFFFFFE) { sLog.outError("DynamicObject guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); @@ -7356,7 +7356,7 @@ int ObjectMgr::GetIndexForLocale(LocaleConstant loc) LocaleConstant ObjectMgr::GetLocaleForIndex(int i) { - if (i<0 || i>=m_LocalForIndex.size()) + if (i<0 || i >= m_LocalForIndex.size()) return LOCALE_enUS; return m_LocalForIndex[i]; @@ -8742,7 +8742,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max else if (maxcount == 0 && incrtime > 0) { if (pl) - ChatHandler(pl).PSendSysMessage("MaxCount == 0 but IncrTime<>=0"); + ChatHandler(pl).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0"); else sLog.outErrorDb("Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry); return false; diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index eaf07245980..5447fe23d51 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -486,7 +486,7 @@ class ObjectMgr PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const { - if (race >= MAX_RACES) return NULL; + if (race >= MAX_RACES) return NULL; if (class_ >= MAX_CLASSES) return NULL; PlayerInfo const* info = &playerInfo[race][class_]; if (info->displayId_m == 0 || info->displayId_f == 0) return NULL; diff --git a/src/game/OutdoorPvPNA.cpp b/src/game/OutdoorPvPNA.cpp index 3dedb4c0891..5c1769e6a6f 100644 --- a/src/game/OutdoorPvPNA.cpp +++ b/src/game/OutdoorPvPNA.cpp @@ -412,7 +412,7 @@ bool OPvPCapturePointNA::HandleCustomSpell(Player * plr, uint32 spellId, GameObj int32 OPvPCapturePointNA::HandleOpenGo(Player *plr, uint64 guid) { uint32 retval = OPvPCapturePoint::HandleOpenGo(plr, guid); - if (retval>=0) + if (retval >= 0) { const go_type * gos = NULL; if (m_ControllingFaction == ALLIANCE) diff --git a/src/game/OutdoorPvPZM.cpp b/src/game/OutdoorPvPZM.cpp index 34c43944265..e7b81c6cfad 100644 --- a/src/game/OutdoorPvPZM.cpp +++ b/src/game/OutdoorPvPZM.cpp @@ -211,7 +211,7 @@ bool OPvPCapturePointZM_GraveYard::Update(uint32 diff) int32 OPvPCapturePointZM_GraveYard::HandleOpenGo(Player *plr, uint64 guid) { uint32 retval = OPvPCapturePoint::HandleOpenGo(plr, guid); - if (retval>=0) + if (retval >= 0) { if (plr->HasAura(ZM_BATTLE_STANDARD_A) && m_GraveYardState != ZM_GRAVEYARD_A) { diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 29c85996e78..abfb964237a 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -430,7 +430,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data) return; // in the normal case, command and reaction buttons can only be moved, not removed - // at moving count == 2, at removing count == 1 + // at moving count == 2, at removing count == 1 // ignore attempt to remove command|reaction buttons (not possible at normal case) if (act_state == ACT_COMMAND || act_state == ACT_REACTION) { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index a69b864bc02..1e89c3204ff 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -134,7 +134,7 @@ enum CharacterCustomizeFlags static uint32 copseReclaimDelay[MAX_DEATH_COUNT] = { 30, 60, 120 }; -// == PlayerTaxi ================================================ +// == PlayerTaxi ================================================ PlayerTaxi::PlayerTaxi() { @@ -178,7 +178,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level case HORDE: SetTaximaskNode(99); break; } // level dependent taxi hubs - if (level>=68) + if (level >= 68) SetTaximaskNode(213); //Shattered Sun Staging Area } @@ -280,7 +280,7 @@ std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi) return ss; } -// == Player ==================================================== +// == Player ==================================================== UpdateMask Player::updateVisualBits; @@ -6459,7 +6459,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt k_grey = Trinity::XP::GetGrayLevel(k_level); - if (v_level<=k_grey) + if (v_level <= k_grey) return false; float diff_level = (k_level == k_grey) ? 1 : ((float(v_level) - float(k_grey)) / (float(k_level) - float(k_grey))); @@ -18796,7 +18796,7 @@ void Player::SetRestBonus (float rest_bonus_new) // update data for client if (m_rest_bonus>10) SetByteValue(PLAYER_BYTES_2, 3, 0x01); // Set Reststate = Rested - else if (m_rest_bonus<=1) + else if (m_rest_bonus <= 1) SetByteValue(PLAYER_BYTES_2, 3, 0x02); // Set Reststate = Normal //RestTickUpdate @@ -21603,7 +21603,7 @@ void Player::SendCorpseReclaimDelay(bool load) !pvp && sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)) { count = (m_deathExpireTime-corpse->GetGhostTime())/DEATH_EXPIRE_STEP; - if (count>=MAX_DEATH_COUNT) + if (count >= MAX_DEATH_COUNT) count = MAX_DEATH_COUNT-1; } else @@ -22708,7 +22708,7 @@ void Player::UpdateKnownCurrencies(uint32 itemId, bool apply) void Player::UpdateFallInformationIfNeed(MovementInfo const& minfo,uint16 opcode) { - if (m_lastFallTime >= minfo.fallTime || m_lastFallZ <=minfo.z || opcode == MSG_MOVE_FALL_LAND) + if (m_lastFallTime >= minfo.fallTime || m_lastFallZ <= minfo.z || opcode == MSG_MOVE_FALL_LAND) SetFallInformation(minfo.fallTime, minfo.z); } diff --git a/src/game/RandomMovementGenerator.cpp b/src/game/RandomMovementGenerator.cpp index 13c861cbc93..8ede9b49af8 100644 --- a/src/game/RandomMovementGenerator.cpp +++ b/src/game/RandomMovementGenerator.cpp @@ -96,7 +96,7 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature) //else if (is_water_ok) // 3D system under water and above ground (swimming mode) else // 2D only { - dist = dist>=100.0f ? 10.0f : sqrtf(dist); // 10.0 is the max that vmap high can check (MAX_CAN_FALL_DISTANCE) + dist = dist >= 100.0f ? 10.0f : sqrtf(dist); // 10.0 is the max that vmap high can check (MAX_CAN_FALL_DISTANCE) // The fastest way to get an accurate result 90% of the time. // Better result can be obtained like 99% accuracy with a ray light, but the cost is too high and the code is too long. diff --git a/src/game/ScriptedCreature.cpp b/src/game/ScriptedCreature.cpp index b44c7e63930..9e5bdb4c3f6 100644 --- a/src/game/ScriptedCreature.cpp +++ b/src/game/ScriptedCreature.cpp @@ -386,7 +386,7 @@ void FillSpellSummary() if (pTempSpell->Effect[j] == SPELL_EFFECT_HEAL || pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MAX_HEALTH || pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MECHANICAL || - (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA && pTempSpell->EffectApplyAuraName[j] == 8)) + (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA && pTempSpell->EffectApplyAuraName[j] == 8)) SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_HEALING-1); //Make sure that this spell applies an aura diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index f6086aa14bd..26d0089f998 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -957,7 +957,7 @@ void AuraEffect::ApplySpellMod(Unit * target, bool apply) if (AuraEffect * aurEff = aura->GetEffect(1)) aurEff->RecalculateAmount(); } - else //if (modOp == SPELLMOD_EFFECT3) + else //if (modOp == SPELLMOD_EFFECT3) { if (AuraEffect * aurEff = aura->GetEffect(2)) aurEff->RecalculateAmount(); @@ -1643,7 +1643,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const if (target->GetMaxPower(power) == 0) return; - if (GetBase()->GetDuration() == -1 && target->GetPower(power) == target->GetMaxPower(power)) + if (GetBase()->GetDuration() == -1 && target->GetPower(power) == target->GetMaxPower(power)) return; uint32 amount = m_amount; @@ -1864,7 +1864,7 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const // TODO: this should use effect[1] of 51690 UnitList targets; { - // eff_radius == 0 + // eff_radius == 0 float radius = GetSpellMaxRange(GetSpellProto(), false); CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(),caster->GetPositionY())); @@ -2058,7 +2058,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const case 30427: { // move loot to player inventory and despawn target - if (caster->GetTypeId() == TYPEID_PLAYER && + if (caster->GetTypeId() == TYPEID_PLAYER && triggerTarget->GetTypeId() == TYPEID_UNIT && triggerTarget->ToCreature()->GetCreatureInfo()->type == CREATURE_TYPE_GAS_CLOUD) { diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 935b85e3384..a41445e0e13 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -692,7 +692,7 @@ bool Aura::ModStackAmount(int32 num) int32 stackAmount = m_stackAmount + num; if (stackAmount > m_spellProto->StackAmount) stackAmount = m_spellProto->StackAmount; - else if (stackAmount <=0) // Last aura from stack removed + else if (stackAmount <= 0) // Last aura from stack removed { m_stackAmount = 0; return true; // need remove aura diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 0d91cbc49fa..4785d5db806 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2105,7 +2105,7 @@ void Spell::EffectDummy(uint32 i) spell_id=48289; } // Raise dead - take reagents and trigger summon spells - else if (m_spellInfo->Id == 48289) + else if (m_spellInfo->Id == 48289) { if (m_targets.HasDst()) targets.setDst(&m_targets.m_dstPos); @@ -3051,7 +3051,7 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype) if (canCreateExtraItems(player, m_spellInfo->Id, additionalCreateChance, additionalMaxNum)) { // roll with this chance till we roll not to create or we create the max num - while (roll_chance_f(additionalCreateChance) && items_count<=additionalMaxNum) + while (roll_chance_f(additionalCreateChance) && items_count <= additionalMaxNum) ++items_count; } @@ -4156,15 +4156,15 @@ void Spell::EffectEnchantItemTmp(uint32 i) switch(damage) { // Rank 1 - case 2: spell_id = 36744; break; // 0% [ 7% == 2, 14% == 2, 20% == 2] + case 2: spell_id = 36744; break; // 0% [ 7% == 2, 14% == 2, 20% == 2] // Rank 2 - case 4: spell_id = 36753; break; // 0% [ 7% == 4, 14% == 4] + case 4: spell_id = 36753; break; // 0% [ 7% == 4, 14% == 4] case 5: spell_id = 36751; break; // 20% // Rank 3 - case 6: spell_id = 36754; break; // 0% [ 7% == 6, 14% == 6] + case 6: spell_id = 36754; break; // 0% [ 7% == 6, 14% == 6] case 7: spell_id = 36755; break; // 20% // Rank 4 - case 9: spell_id = 36761; break; // 0% [ 7% == 6] + case 9: spell_id = 36761; break; // 0% [ 7% == 6] case 10: spell_id = 36758; break; // 14% case 11: spell_id = 36760; break; // 20% default: diff --git a/src/game/ThreatManager.h b/src/game/ThreatManager.h index 94fdf848bc2..ec6c6ec1684 100644 --- a/src/game/ThreatManager.h +++ b/src/game/ThreatManager.h @@ -106,7 +106,7 @@ class HostileReference : public Reference<Unit, ThreatManager> void setAccessibleState(bool pIsAccessible); //================================================= - bool operator == (const HostileReference& pHostileReference) const { return pHostileReference.getUnitGuid() == getUnitGuid(); } + bool operator == (const HostileReference& pHostileReference) const { return pHostileReference.getUnitGuid() == getUnitGuid(); } //================================================= diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp index 51623622dc5..8b5a250320f 100644 --- a/src/game/TradeHandler.cpp +++ b/src/game/TradeHandler.cpp @@ -336,7 +336,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/) } // test if item will fit in each inventory - hisCanCompleteTrade = (_player->pTrader->CanStoreItems(myItems,TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK); + hisCanCompleteTrade = (_player->pTrader->CanStoreItems(myItems,TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK); myCanCompleteTrade = (_player->CanStoreItems(hisItems,TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK); // clear 'in-trade' flag diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a46581bf6a8..16b1b3fed52 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1976,7 +1976,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff { AuraEffect * auraEff =(*i); ++i; - if (auraEff->GetAmount()<=0) + if (auraEff->GetAmount() <= 0) { uint32 removedAuras = pVictim->m_removedAurasCount; auraEff->GetBase()->Remove(AURA_REMOVE_BY_ENEMY_SPELL); @@ -2493,7 +2493,7 @@ bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const * /*spellProto*/, Weap { if (!(*i)->IsAffectedOnSpell(spellProto)) continue; - if ((*i)->GetMiscValue() == ) + if ((*i)->GetMiscValue() == ) return false; } */ @@ -4675,7 +4675,7 @@ int32 Unit::GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) { - if ((*i)->GetMiscValue() == misc_value) + if ((*i)->GetMiscValue() == misc_value) modifier += (*i)->GetAmount(); } return modifier; @@ -4688,7 +4688,7 @@ float Unit::GetTotalAuraMultiplierByMiscValue(AuraType auratype, int32 misc_valu AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) { - if ((*i)->GetMiscValue() == misc_value) + if ((*i)->GetMiscValue() == misc_value) multiplier *= (100.0f + (*i)->GetAmount())/100.0f; } return multiplier; @@ -4701,7 +4701,7 @@ int32 Unit::GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_ AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) { - if ((*i)->GetMiscValue() == misc_value && (*i)->GetAmount() > modifier) + if ((*i)->GetMiscValue() == misc_value && (*i)->GetAmount() > modifier) modifier = (*i)->GetAmount(); } @@ -4715,7 +4715,7 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_ AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) { - if ((*i)->GetMiscValue() == misc_value && (*i)->GetAmount() < modifier) + if ((*i)->GetMiscValue() == misc_value && (*i)->GetAmount() < modifier) modifier = (*i)->GetAmount(); } @@ -5610,7 +5610,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // mana cost save int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100; basepoints0 = cost * triggerAmount/100; - if (basepoints0 <=0) + if (basepoints0 <= 0) return false; target = this; @@ -5665,7 +5665,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100; basepoints0 = cost * triggerAmount/100; - if (basepoints0 <=0) + if (basepoints0 <= 0) return false; triggered_spell_id = 44450; target = this; diff --git a/src/game/Weather.cpp b/src/game/Weather.cpp index d027277e2e6..d74f945fd5a 100644 --- a/src/game/Weather.cpp +++ b/src/game/Weather.cpp @@ -43,7 +43,7 @@ Weather::Weather(uint32 zone, WeatherZoneChances const* weatherChances) : m_zone /// Launch a weather update bool Weather::Update(uint32 diff) { - if (m_timer.GetCurrent()>=0) + if (m_timer.GetCurrent() >= 0) m_timer.Update(diff); else m_timer.SetCurrent(0); diff --git a/src/game/World.cpp b/src/game/World.cpp index cbd53eefd0d..47294a89107 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -562,7 +562,7 @@ void World::LoadConfigSettings(bool reload) } if (rate_values[RATE_DURABILITY_LOSS_ON_DEATH] > 100.0f) { - sLog.outError("DurabilityLoss.OnDeath (%f) must be <=100. Using 100.0 instead.",rate_values[RATE_DURABILITY_LOSS_ON_DEATH]); + sLog.outError("DurabilityLoss.OnDeath (%f) must be <= 100. Using 100.0 instead.",rate_values[RATE_DURABILITY_LOSS_ON_DEATH]); rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = 0.0f; } rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = rate_values[RATE_DURABILITY_LOSS_ON_DEATH] / 100.0f; @@ -891,7 +891,7 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_MAIL_DELIVERY_DELAY] = sConfig.GetIntDefault("MailDeliveryDelay",HOUR); m_configs[CONFIG_UPTIME_UPDATE] = sConfig.GetIntDefault("UpdateUptimeInterval", 10); - if (int32(m_configs[CONFIG_UPTIME_UPDATE])<=0) + if (int32(m_configs[CONFIG_UPTIME_UPDATE]) <= 0) { sLog.outError("UpdateUptimeInterval (%i) must be > 0, set to default 10.",m_configs[CONFIG_UPTIME_UPDATE]); m_configs[CONFIG_UPTIME_UPDATE] = 10; @@ -1670,7 +1670,7 @@ void World::SetInitialWorldSettings() objmgr.LoadTransportEvents(); sLog.outString("Deleting expired bans..."); - loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); sLog.outString("Calculate next daily quest reset time..."); InitDailyQuestResetTime(); @@ -1825,7 +1825,7 @@ void World::Update(uint32 diff) ///- Update the different timers for (int i = 0; i < WUPDATE_COUNT; ++i) - if (m_timers[i].GetCurrent()>=0) + if (m_timers[i].GetCurrent() >= 0) m_timers[i].Update(diff); else m_timers[i].SetCurrent(0); diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index a5b8f55b705..4acbe9eaae2 100644 --- a/src/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/src/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -94,7 +94,7 @@ struct boss_midnightAI : public ScriptedAI if (Unit *pAttumen = Unit::GetUnit(*m_creature, Attumen)) Mount(pAttumen); } - else if (Phase == 3) + else if (Phase == 3) { if (Mount_Timer) { diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 41a9f2325e1..6420c4d34d2 100644 --- a/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -104,7 +104,7 @@ struct boss_netherspiteAI : public ScriptedAI yh = pTarget->GetPositionY(); // check if target is between (not checking distance from the beam yet) - if (dist(xn,yn,xh,yh)>=dist(xn,yn,xp,yp) || dist(xp,yp,xh,yh)>=dist(xn,yn,xp,yp)) + if (dist(xn,yn,xh,yh) >= dist(xn,yn,xp,yp) || dist(xp,yp,xh,yh) >= dist(xn,yn,xp,yp)) return false; // check distance from the beam return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn,yn,xp,yp) < 1.5f); diff --git a/src/scripts/kalimdor/azshara.cpp b/src/scripts/kalimdor/azshara.cpp index f4aba0d5b56..d9d63d90061 100644 --- a/src/scripts/kalimdor/azshara.cpp +++ b/src/scripts/kalimdor/azshara.cpp @@ -56,7 +56,7 @@ struct mobs_spitelashesAI : public ScriptedAI if (!spellhit && Hitter->GetTypeId() == TYPEID_PLAYER && CAST_PLR(Hitter)->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE && - (Spellkind->Id == 118 || Spellkind->Id == 12824 || Spellkind->Id == 12825 || Spellkind->Id == 12826)) + (Spellkind->Id == 118 || Spellkind->Id == 12824 || Spellkind->Id == 12825 || Spellkind->Id == 12826)) { spellhit=true; DoCast(m_creature, 29124); //become a sheep @@ -66,7 +66,7 @@ struct mobs_spitelashesAI : public ScriptedAI void UpdateAI(const uint32 diff) { // we mustn't remove the Creature in the same round in which we cast the summon spell, otherwise there will be no summons - if (spellhit && morphtimer>=5000) + if (spellhit && morphtimer >= 5000) { m_creature->ForcedDespawn(); return; @@ -75,7 +75,7 @@ struct mobs_spitelashesAI : public ScriptedAI if (spellhit && morphtimer<5000) { morphtimer+=diff; - if (morphtimer>=5000) + if (morphtimer >= 5000) { DoCast(m_creature, 28406); //summon copies DoCast(m_creature, 6924); //visual explosion diff --git a/src/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp b/src/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp index b485ff26998..6fd51e06312 100644 --- a/src/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp +++ b/src/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp @@ -422,7 +422,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI void UpdateAI(const uint32 diff) { - if (Delay<= diff) + if (Delay <= diff) { Delay=0; }else{ @@ -444,7 +444,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI m_creature->GetMotionMaster()->Clear(); meteor = true; } else if (!CanMove){ - if (spawnTimer<= diff) + if (spawnTimer <= diff) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -488,7 +488,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI DoCast(m_creature, SPELL_IMMOLATION); imol=true; } - if (FlameBuffetTimer<= diff) + if (FlameBuffetTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_FLAME_BUFFET, true); FlameBuffetTimer = 7000; @@ -583,7 +583,7 @@ struct mob_abominationAI : public hyjal_trashAI DoCast(m_creature, SPELL_DISEASE_CLOUD); if (!UpdateVictim()) return; - if (KnockDownTimer<= diff) + if (KnockDownTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_KNOCKDOWN); KnockDownTimer = 15000+rand()%10000; @@ -679,7 +679,7 @@ struct mob_ghoulAI : public hyjal_trashAI } } } - if (FrenzyTimer<= diff) + if (FrenzyTimer <= diff) { DoCast(m_creature, SPELL_FRENZY); FrenzyTimer = 15000+rand()%15000; @@ -796,7 +796,7 @@ struct mob_necromancerAI : public hyjal_trashAI } if (!UpdateVictim()) return; - if (ShadowBoltTimer<= diff) + if (ShadowBoltTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_SHADOW_BOLT); ShadowBoltTimer = 20000+rand()%10000; @@ -887,17 +887,17 @@ struct mob_bansheeAI : public hyjal_trashAI } if (!UpdateVictim()) return; - if (CourseTimer<= diff) + if (CourseTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_BANSHEE_CURSE); CourseTimer = 20000+rand()%5000; } else CourseTimer -= diff; - if (WailTimer<= diff) + if (WailTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_BANSHEE_WAIL); WailTimer = 15000+rand()%5000; } else WailTimer -= diff; - if (ShellTimer<= diff) + if (ShellTimer <= diff) { DoCast(m_creature, SPELL_ANTI_MAGIC_SHELL); ShellTimer = 50000+rand()%10000; @@ -982,7 +982,7 @@ struct mob_crypt_fiendAI : public hyjal_trashAI } if (!UpdateVictim()) return; - if (WebTimer<= diff) + if (WebTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_WEB); WebTimer = 20000+rand()%5000; @@ -1067,7 +1067,7 @@ struct mob_fel_stalkerAI : public hyjal_trashAI } if (!UpdateVictim()) return; - if (ManaBurnTimer<= diff) + if (ManaBurnTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_MANA_BURN); ManaBurnTimer = 9000+rand()%5000; @@ -1166,14 +1166,14 @@ struct mob_frost_wyrmAI : public hyjal_trashAI if (!UpdateVictim()) return; if (!m_creature->IsWithinDist(m_creature->getVictim(), 25)){ - if (MoveTimer<= diff) + if (MoveTimer <= diff) { m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); MoveTimer = 2000; } else MoveTimer-=diff; } - if (FrostBreathTimer<= diff) + if (FrostBreathTimer <= diff) { if (!m_creature->IsWithinDist(m_creature->getVictim(), 25)) { @@ -1278,7 +1278,7 @@ struct mob_gargoyleAI : public hyjal_trashAI { if (faction == 0)//alliance { - if (StrikeTimer<= diff) + if (StrikeTimer <= diff) { m_creature->CastSpell(DummyTarget[0],DummyTarget[1],DummyTarget[2],SPELL_GARGOYLE_STRIKE,false); StrikeTimer = 2000+rand()%1000; @@ -1296,17 +1296,17 @@ struct mob_gargoyleAI : public hyjal_trashAI if (pTarget) m_creature->Attack(pTarget,false); } - if (MoveTimer<= diff) + if (MoveTimer <= diff) { float x,y,z; m_creature->getVictim()->GetPosition(x,y,z); m_creature->GetMotionMaster()->MovePoint(0,x,y,z+Zpos); Zpos-=1.0; - if (Zpos<=0)Zpos=0; + if (Zpos <= 0)Zpos=0; MoveTimer = 2000; } else MoveTimer-=diff; } - if (StrikeTimer<= diff) + if (StrikeTimer <= diff) { if (m_creature->IsWithinDist(m_creature->getVictim(), 20)) { diff --git a/src/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/src/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp index 645614e8d23..077a49ade01 100644 --- a/src/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ b/src/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -98,7 +98,7 @@ struct boss_captain_skarlocAI : public ScriptedAI } else Holy_Light_Timer -= diff; //Cleanse - if (Cleanse_Timer <= diff) + if (Cleanse_Timer <= diff) { DoCast(m_creature, SPELL_CLEANSE); Cleanse_Timer = 10000; diff --git a/src/scripts/kalimdor/felwood.cpp b/src/scripts/kalimdor/felwood.cpp index 8f1a77ef365..122e581ca8b 100644 --- a/src/scripts/kalimdor/felwood.cpp +++ b/src/scripts/kalimdor/felwood.cpp @@ -69,7 +69,7 @@ bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCrea bool GossipSelect_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->CLOSE_GOSSIP_MENU(); pCreature->CastSpell(pPlayer, 15120, false); diff --git a/src/scripts/kalimdor/silithus.cpp b/src/scripts/kalimdor/silithus.cpp index d9ae218c077..ee272d64499 100644 --- a/src/scripts/kalimdor/silithus.cpp +++ b/src/scripts/kalimdor/silithus.cpp @@ -931,7 +931,7 @@ struct npc_anachronos_quest_triggerAI : public ScriptedAI if (Spawn) { Spawn->LoadCreaturesAddon(); - if (Spawn->GetGUID() == 15423) + if (Spawn->GetGUID() == 15423) Spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID,15427+rand()%4); if (i >= 30) WaveCount = 1; if (i >= 33) WaveCount = 2; diff --git a/src/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/src/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index d01ee456ee5..4def1fa2a0c 100644 --- a/src/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/src/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -122,7 +122,7 @@ struct boss_fankrissAI : public ScriptedAI //We will only telport if fankriss has more than 3% of hp so teleported gamers can always loot. if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 3) { - if (SpawnHatchlings_Timer<= diff) + if (SpawnHatchlings_Timer <= diff) { Unit *pTarget = NULL; pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); diff --git a/src/scripts/kalimdor/winterspring.cpp b/src/scripts/kalimdor/winterspring.cpp index 522a3cc7d92..34d5ffed61c 100644 --- a/src/scripts/kalimdor/winterspring.cpp +++ b/src/scripts/kalimdor/winterspring.cpp @@ -134,7 +134,7 @@ bool GossipHello_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->CLOSE_GOSSIP_MENU(); pCreature->CastSpell(pPlayer, 16351, false); diff --git a/src/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/src/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index 0077add4755..dc7a3c71a5c 100644 --- a/src/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/src/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -131,11 +131,11 @@ struct boss_malygosAI : public ScriptedAI if (victim == m_creature) return; - if (phase == 1) + if (phase == 1) DoScriptText(RAND(SAY_PHASE1_SLAY_1,SAY_PHASE1_SLAY_2,SAY_PHASE1_SLAY_3), m_creature); - if (phase == 2) + if (phase == 2) DoScriptText(RAND(SAY_PHASE2_SLAY_1,SAY_PHASE2_SLAY_2,SAY_PHASE2_SLAY_3), m_creature); - if (phase == 3) + if (phase == 3) DoScriptText(RAND(SAY_PHASE3_SLAY_1,SAY_PHASE3_SLAY_2,SAY_PHASE3_SLAY_3), m_creature); } }; diff --git a/src/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/src/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 20d38148ee9..894ae9d2a56 100644 --- a/src/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/src/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -170,7 +170,7 @@ struct boss_ormorokAI : public ScriptedAI { Unit *pTarget = NULL; uint8 Healer = 0; - for (uint8 j = 1; j<=4; j++) + for (uint8 j = 1; j <= 4; j++) { switch (j) { diff --git a/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 48adc36cfd4..0d174800eed 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -314,7 +314,7 @@ struct boss_algalonAI : public ScriptedAI { if (Enrage) { - if (Ascend_Timer <= diff) + if (Ascend_Timer <= diff) { DoCast(m_creature, SPELL_ASCEND); DoScriptText(SAY_BERSERK, m_creature); 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 df14331a870..3c6d4875ae8 100644 --- a/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp +++ b/src/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp @@ -705,9 +705,9 @@ struct mob_palehoof_orbAI : public ScriptedAI if (currentPhase == PHASE_NONE) return; - if (SummonTimer<=diff) + if (SummonTimer <= diff) { - if (currentPhase<5&¤tPhase>=0) + if (currentPhase<5&¤tPhase >= 0) { Creature *pNext; switch(currentPhase) diff --git a/src/scripts/outland/black_temple/boss_bloodboil.cpp b/src/scripts/outland/black_temple/boss_bloodboil.cpp index b1fce8d4d42..da598ed0ea2 100644 --- a/src/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/src/scripts/outland/black_temple/boss_bloodboil.cpp @@ -161,7 +161,7 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI for (uint32 i = 0; i<3; ++i) { uint8 eff = spellInfo->Effect[i]; - if (eff>=TOTAL_SPELL_EFFECTS) + if (eff >= TOTAL_SPELL_EFFECTS) continue; Aura *Aur = new Aura(spellInfo, i, pTarget, pTarget, pTarget); diff --git a/src/scripts/outland/black_temple/boss_supremus.cpp b/src/scripts/outland/black_temple/boss_supremus.cpp index 88e701d8f13..23423b7a581 100644 --- a/src/scripts/outland/black_temple/boss_supremus.cpp +++ b/src/scripts/outland/black_temple/boss_supremus.cpp @@ -250,7 +250,7 @@ struct npc_volcanoAI : public Scripted_NoMovementAI void UpdateAI(const uint32 diff) { - if (wait<=diff)//wait 3secs before casting + if (wait <= diff)//wait 3secs before casting { DoCast(m_creature, SPELL_VOLCANIC_ERUPTION); wait = 60000; diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp index 02911782b1c..cd8d12a097e 100644 --- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -384,7 +384,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI //Return since we have no target if (m_creature->HasAura(AURA_BANISH) || !UpdateVictim()) { - if (BanishTimer<= diff) + if (BanishTimer <= diff) { CheckBanish();//no need to check every update tick BanishTimer = 1000; diff --git a/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index fcc76c4eec3..1287bfa290e 100644 --- a/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -260,7 +260,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI //After these 50 seconds she portals to the middle of the room and disappears, leaving 3 light portals behind. m_creature->GetMotionMaster()->Clear(); m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, CENTER_Z, CENTER_O); - for (uint8 i=0; i<=2; ++i) + for (uint8 i=0; i <= 2; ++i) { if (!i) { @@ -283,7 +283,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI Portals[2][0] = Portals[2][0]+7*i; Portals[2][1] = Portal_Y(Portals[2][0], LARGE_PORTAL_RADIUS); } - for (int i=0; i<=2; ++i) + for (int i=0; i <= 2; ++i) { if (Creature* Summoned = m_creature->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O, TEMPSUMMON_TIMED_DESPAWN, Phase2_Timer+Phase3_Timer+AppearDelay_Timer+1700)) { @@ -302,8 +302,8 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI if (Phase2_Timer <= diff) { Phase = 3; - for (int i=0; i<=2; ++i) - for (int j=1; j<=4; j++) + for (int i=0; i <= 2; ++i) + for (int j=1; j <= 4; j++) SummonMinion(NPC_SOLARIUM_AGENT, Portals[i][0], Portals[i][1], Portals[i][2]); DoScriptText(SAY_SUMMON1, m_creature); @@ -325,7 +325,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(); m_creature->GetMap()->CreatureRelocation(m_creature, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O); - for (int j=0; j<=2; j++) + for (int j=0; j <= 2; j++) if (j!=i) SummonMinion(NPC_SOLARIUM_PRIEST, Portals[j][0], Portals[j][1], Portals[j][2]); diff --git a/src/scripts/world/npc_professions.cpp b/src/scripts/world/npc_professions.cpp index 2fb9ca50d02..da84a6d842a 100644 --- a/src/scripts/world/npc_professions.cpp +++ b/src/scripts/world/npc_professions.cpp @@ -361,7 +361,7 @@ bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) uint32 eCreature = pCreature->GetEntry(); - if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetBaseSkillValue(SKILL_ALCHEMY)>=350 && pPlayer->getLevel() > 67) + if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && pPlayer->getLevel() > 67) { if (pPlayer->GetQuestRewardStatus(10899) || pPlayer->GetQuestRewardStatus(10902) || pPlayer->GetQuestRewardStatus(10897)) { @@ -548,13 +548,13 @@ bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) uint32 eCreature = pCreature->GetEntry(); //WEAPONSMITH & ARMORSMITH - if (pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=225) + if (pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 225) { switch (eCreature) { case 11145: //Myolor Sunderfury case 11176: //Krathok Moltenfist - if (!pPlayer->HasSpell(S_ARMOR) && !pPlayer->HasSpell(S_WEAPON) && pPlayer->GetReputationRank(REP_ARMOR) >= REP_FRIENDLY) + if (!pPlayer->HasSpell(S_ARMOR) && !pPlayer->HasSpell(S_WEAPON) && pPlayer->GetReputationRank(REP_ARMOR) >= REP_FRIENDLY) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); if (!pPlayer->HasSpell(S_WEAPON) && !pPlayer->HasSpell(S_ARMOR) && pPlayer->GetReputationRank(REP_WEAPON) >= REP_FRIENDLY) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); @@ -572,7 +572,7 @@ bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) } } //WEAPONSMITH SPEC - if (pPlayer->HasSpell(S_WEAPON) && pPlayer->getLevel() > 49 && pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=250) + if (pPlayer->HasSpell(S_WEAPON) && pPlayer->getLevel() > 49 && pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250) { switch (eCreature) { @@ -958,7 +958,7 @@ bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature) uint32 eCreature = pCreature->GetEntry(); - if (pPlayer->HasSkill(SKILL_LEATHERWORKING) && pPlayer->GetBaseSkillValue(SKILL_LEATHERWORKING)>=250 && pPlayer->getLevel() > 49) + if (pPlayer->HasSkill(SKILL_LEATHERWORKING) && pPlayer->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 250 && pPlayer->getLevel() > 49) { switch (eCreature) { @@ -1102,7 +1102,7 @@ bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) uint32 eCreature = pCreature->GetEntry(); //TAILORING SPEC - if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING)>=350 && pPlayer->getLevel() > 59) + if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 350 && pPlayer->getLevel() > 59) { if (pPlayer->GetQuestRewardStatus(10831) || pPlayer->GetQuestRewardStatus(10832) || pPlayer->GetQuestRewardStatus(10833)) { |