From bd30769dec720971e8439f9ff9ef45b0dd8f4201 Mon Sep 17 00:00:00 2001 From: balrok Date: Sat, 5 Sep 2009 10:42:36 +0200 Subject: [PATCH] [8475] fixed some gcc-warnings all warnings from Wunused and some from Wall cause unused may be most interesting for some: they were in following files: src/game/Level2.cpp src/game/Map.cpp src/game/SpellAuras.cpp src/game/Unit.cpp src/mangosd/Master.cpp but i guess mostly someone just fogot to remove this code for some unsigned vs signed warnings i used: ack "for.*int .*size\(\)" | ack -v uint also note for coding: if you do something like if( a && b || c) just place parentheses around (a && b) && always will have precedence over || but without parentheses this could be overseen quite fast (at least that's my guess why gcc will warn for this) Signed-off-by: balrok --- src/game/BattleGround.cpp | 3 +- src/game/BattleGroundAB.cpp | 4 +-- src/game/BattleGroundMgr.h | 2 +- src/game/CharacterHandler.cpp | 2 +- src/game/Chat.cpp | 4 +-- src/game/Creature.cpp | 8 ++--- src/game/CreatureEventAI.cpp | 2 +- src/game/GameObject.cpp | 1 + src/game/GridNotifiers.h | 4 +-- src/game/GuildHandler.cpp | 2 +- src/game/Level0.cpp | 4 +-- src/game/Level1.cpp | 6 ++-- src/game/Level2.cpp | 6 +--- src/game/Level3.cpp | 8 ++--- src/game/LootHandler.cpp | 4 +-- src/game/Map.cpp | 7 ++-- src/game/Map.h | 4 +-- src/game/MotionMaster.cpp | 2 +- src/game/MovementHandler.cpp | 4 +-- src/game/ObjectMgr.cpp | 17 +++++---- src/game/Player.cpp | 49 ++++++++++++-------------- src/game/PoolHandler.cpp | 6 ++-- src/game/SocialMgr.cpp | 4 +-- src/game/Spell.cpp | 3 +- src/game/SpellAuras.cpp | 2 -- src/game/SpellMgr.cpp | 3 +- src/game/SpellMgr.h | 10 +++--- src/game/StatSystem.cpp | 5 +-- src/game/TradeHandler.cpp | 2 +- src/game/Unit.cpp | 1 - src/game/Unit.h | 2 +- src/game/WaypointManager.cpp | 2 +- src/game/WaypointMovementGenerator.cpp | 2 +- src/game/WorldSession.cpp | 6 ++-- src/mangosd/Master.cpp | 4 --- src/shared/revision_nr.h | 2 +- 36 files changed, 96 insertions(+), 101 deletions(-) diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 5b1c6d89d..0e9e8549c 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1788,5 +1788,6 @@ WorldSafeLocsEntry const* BattleGround::GetClosestGraveYard( Player* player ) bool BattleGround::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const { BattleGroundTeamId team_idx = GetTeamIndexByTeamId(team); - return m_TeamScores[team_idx] >= minScore && m_TeamScores[team_idx] <= maxScore; + uint32 score = (m_TeamScores[team_idx] < 0) ? 0 : uint32(m_TeamScores[team_idx]); + return score >= minScore && score <= maxScore; } diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index 8aee3ddfb..8737b9395 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -676,8 +676,8 @@ bool BattleGroundAB::IsAllNodesConrolledByTeam(uint32 team) const { uint32 count = 0; for(int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i) - if (team == ALLIANCE && m_Nodes[i] == BG_AB_NODE_STATUS_ALLY_OCCUPIED || - team == HORDE && m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED) + if ((team == ALLIANCE && m_Nodes[i] == BG_AB_NODE_STATUS_ALLY_OCCUPIED) || + (team == HORDE && m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)) ++count; return count == BG_AB_DYNAMIC_NODES_COUNT; diff --git a/src/game/BattleGroundMgr.h b/src/game/BattleGroundMgr.h index 2b65b76c7..7044a4de2 100644 --- a/src/game/BattleGroundMgr.h +++ b/src/game/BattleGroundMgr.h @@ -146,8 +146,8 @@ class BGQueueInviteEvent : public BasicEvent private: uint64 m_PlayerGuid; uint32 m_BgInstanceGUID; - uint32 m_RemoveTime; BattleGroundTypeId m_BgTypeId; + uint32 m_RemoveTime; }; /* diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index 753c6be83..027a5065a 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -1293,7 +1293,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data) uint8 srcbag, srcslot; recv_data >> srcbag >> srcslot; - sLog.outDebug("Item " I64FMT ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot); + sLog.outDebug("Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot); Item *item = _player->GetItemByGuid(itemGuid); diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 00508a5d5..9ae5cd722 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -1177,7 +1177,7 @@ valid examples: char c = reader.peek(); // ignore enchants etc. - while(c >='0' && c <='9' || c==':') + while ((c >= '0' && c <= '9') || c== ':') { reader.ignore(1); c = reader.peek(); @@ -2201,4 +2201,4 @@ LocaleConstant CliHandler::GetSessionDbcLocale() const int CliHandler::GetSessionDbLocaleIndex() const { return objmgr.GetDBCLocaleIndex(); -} \ No newline at end of file +} diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 775caeb74..b4432790e 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -153,7 +153,7 @@ void Creature::RemoveFromWorld() void Creature::RemoveCorpse() { - if( getDeathState()!=CORPSE && !m_isDeadByDefault || getDeathState()!=ALIVE && m_isDeadByDefault ) + if ((getDeathState() != CORPSE && !m_isDeadByDefault) || (getDeathState() != ALIVE && m_isDeadByDefault)) return; m_deathTimer = 0; @@ -1459,8 +1459,8 @@ float Creature::GetAttackDistance(Unit const* pl) const if(aggroRate==0) return 0.0f; - int32 playerlevel = pl->getLevelForTarget(this); - int32 creaturelevel = getLevelForTarget(pl); + uint32 playerlevel = pl->getLevelForTarget(this); + uint32 creaturelevel = getLevelForTarget(pl); int32 leveldif = playerlevel - creaturelevel; @@ -1730,7 +1730,7 @@ bool Creature::IsVisibleInGridForPlayer(Player* pl) const { if(GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INVISIBLE) return false; - return isAlive() || m_deathTimer > 0 || m_isDeadByDefault && m_deathState==CORPSE; + return (isAlive() || m_deathTimer > 0 || (m_isDeadByDefault && m_deathState == CORPSE)); } // Dead player see live creatures near own corpse diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index e70b153ff..936045f6b 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -378,7 +378,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 target = owner; } } - else if (target = m_creature->getVictim()) + else if ((target = m_creature->getVictim())) { if (target->GetTypeId() != TYPEID_PLAYER) if (Unit* owner = target->GetOwner()) diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index e4c631f1b..794e11ca1 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -386,6 +386,7 @@ void GameObject::Update(uint32 /*p_time*/) if (GetGOInfo()->GetAutoCloseTime() && (m_cooldownTime < time(NULL))) ResetDoorOrButton(); break; + default: break; } break; } diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index 32454762d..38fbd1704 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -872,11 +872,11 @@ namespace MaNGOS return false; } private: - bool i_hitHidden; bool i_targetForPlayer; WorldObject const* i_obj; Unit const* i_funit; float i_range; + bool i_hitHidden; }; // do attack at call of help to friendly crearture @@ -1076,7 +1076,7 @@ namespace MaNGOS ~LocalizedPacketListDo() { for(size_t i = 0; i < i_data_cache.size(); ++i) - for(int j = 0; j < i_data_cache[i].size(); ++j) + for(size_t j = 0; j < i_data_cache[i].size(); ++j) delete i_data_cache[i][j]; } void operator()( Player* p ); diff --git a/src/game/GuildHandler.cpp b/src/game/GuildHandler.cpp index ddacd2aec..39530579c 100644 --- a/src/game/GuildHandler.cpp +++ b/src/game/GuildHandler.cpp @@ -1076,7 +1076,7 @@ void WorldSession::HandleGuildBankSwapItems( WorldPacket & recv_data ) recv_data >> unk2; // always 0 recv_data >> SplitedAmount; - if (BankTabSlotDst >= GUILD_BANK_MAX_SLOTS || BankTabDst == BankTab && BankTabSlotDst == BankTabSlot) + if (BankTabSlotDst >= GUILD_BANK_MAX_SLOTS || (BankTabDst == BankTab && BankTabSlotDst == BankTabSlot)) { recv_data.rpos(recv_data.wpos()); // prevent additional spam at rejected packet return; diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp index 557ca91ae..937f1b9cc 100644 --- a/src/game/Level0.cpp +++ b/src/game/Level0.cpp @@ -143,7 +143,7 @@ bool ChatHandler::HandleSaveCommand(const char* /*args*/) // save or plan save after 20 sec (logout delay) if current next save time more this value and _not_ output any messages to prevent cheat planning uint32 save_interval = sWorld.getConfig(CONFIG_INTERVAL_SAVE); - if(save_interval==0 || save_interval > 20*IN_MILISECONDS && player->GetSaveTimer() <= save_interval - 20*IN_MILISECONDS) + if (save_interval==0 || (save_interval > 20*IN_MILISECONDS && player->GetSaveTimer() <= save_interval - 20*IN_MILISECONDS)) player->SaveToDB(); return true; @@ -158,7 +158,7 @@ bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/) for(; itr != m.end(); ++itr) { AccountTypes itr_sec = itr->second->GetSession()->GetSecurity(); - if ((itr->second->isGameMaster() || itr_sec > SEC_PLAYER && itr_sec <= sWorld.getConfig(CONFIG_GM_LEVEL_IN_GM_LIST)) && + if ((itr->second->isGameMaster() || (itr_sec > SEC_PLAYER && itr_sec <= sWorld.getConfig(CONFIG_GM_LEVEL_IN_GM_LIST))) && (!m_session || itr->second->IsVisibleGloballyFor(m_session->GetPlayer()))) { if(first) diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index dd260c4d6..ceff91a76 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -658,7 +658,7 @@ bool ChatHandler::HandleModifyKnownTitlesCommand(const char* args) uint64 titles2 = titles; - for(int i = 1; i < sCharTitlesStore.GetNumRows(); ++i) + for(uint32 i = 1; i < sCharTitlesStore.GetNumRows(); ++i) if(CharTitlesEntry const* tEntry = sCharTitlesStore.LookupEntry(i)) titles2 &= ~(uint64(1) << tEntry->bit_index); @@ -2275,7 +2275,7 @@ bool ChatHandler::HandleGoTaxinodeCommand(const char* args) return false; } - if (node->x == 0.0f && node->y == 0.0f && node->z == 0.0f || + if ((node->x == 0.0f && node->y == 0.0f && node->z == 0.0f) || !MapManager::IsValidMapCoord(node->map_id,node->x,node->y,node->z)) { PSendSysMessage(LANG_INVALID_TARGET_COORD,node->x,node->y,node->map_id); @@ -2412,7 +2412,7 @@ bool ChatHandler::HandleGoZoneXYCommand(const char* args) float y = (float)atof(py); // prevent accept wrong numeric args - if (x==0.0f && *px!='0' || y==0.0f && *py!='0') + if ((x==0.0f && *px!='0') || (y==0.0f && *py!='0')) return false; uint32 areaid = cAreaId ? (uint32)atoi(cAreaId) : _player->GetZoneId(); diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index a188f65c5..96b05fc93 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -3180,7 +3180,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) } wpCreature->SetVisibility(VISIBILITY_OFF); - sLog.outDebug("DEBUG: UPDATE creature_movement SET wpguid = '%u"); + sLog.outDebug("DEBUG: UPDATE creature_movement SET wpguid = '%u", wpCreature->GetGUIDLow()); // set "wpguid" column to the visual waypoint WorldDatabase.PExecuteLog("UPDATE creature_movement SET wpguid = '%u' WHERE id = '%u' and point = '%u'", wpCreature->GetGUIDLow(), lowguid, point); @@ -3928,8 +3928,6 @@ void ChatHandler::HandleLearnSkillRecipesHelper(Player* player,uint32 skill_id) bool ChatHandler::HandleLearnAllCraftsCommand(const char* /*args*/) { - uint32 classmask = m_session->GetPlayer()->getClassMask(); - for (uint32 i = 0; i < sSkillLineStore.GetNumRows(); ++i) { SkillLineEntry const *skillInfo = sSkillLineStore.LookupEntry(i); @@ -3970,8 +3968,6 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args) // converting string that we try to find to lower case wstrToLower( wnamepart ); - uint32 classmask = m_session->GetPlayer()->getClassMask(); - std::string name; SkillLineEntry const *targetSkillInfo = NULL; diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 8771e2811..6bd6a859d 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -4581,7 +4581,7 @@ bool ChatHandler::HandleServerRestartCommand(const char* args) int32 time = atoi (time_str); ///- Prevent interpret wrong arg value as 0 secs shutdown time - if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) + if ((time == 0 && (time_str[0]!='0' || time_str[1]!='\0')) || time < 0) return false; if (exitcode_str) @@ -4616,7 +4616,7 @@ bool ChatHandler::HandleServerIdleRestartCommand(const char* args) int32 time = atoi (time_str); ///- Prevent interpret wrong arg value as 0 secs shutdown time - if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) + if ((time == 0 && (time_str[0]!='0' || time_str[1]!='\0')) || time < 0) return false; if (exitcode_str) @@ -4651,7 +4651,7 @@ bool ChatHandler::HandleServerIdleShutDownCommand(const char* args) int32 time = atoi (time_str); ///- Prevent interpret wrong arg value as 0 secs shutdown time - if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) + if ((time == 0 && (time_str[0]!='0' || time_str[1]!='\0')) || time < 0) return false; if (exitcode_str) @@ -6182,7 +6182,7 @@ bool ChatHandler::HandleSendItemsCommand(const char* args) } uint32 item_count = itemCountStr ? atoi(itemCountStr) : 1; - if(item_count < 1 || item_proto->MaxCount > 0 && item_count > uint32(item_proto->MaxCount)) + if (item_count < 1 || (item_proto->MaxCount > 0 && item_count > uint32(item_proto->MaxCount))) { PSendSysMessage(LANG_COMMAND_INVALID_ITEM_COUNT, item_count,item_id); SetSentErrorMessage(true); diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index 274a7f94f..76008c6e9 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -45,7 +45,7 @@ void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data ) GameObject *go = player->GetMap()->GetGameObject(lguid); // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO - if (!go || (go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player,INTERACTION_DISTANCE)) + if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player,INTERACTION_DISTANCE))) { player->SendLootRelease(lguid); return; @@ -280,7 +280,7 @@ void WorldSession::DoLootRelease( uint64 lguid ) GameObject *go = GetPlayer()->GetMap()->GetGameObject(lguid); // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO - if (!go || (go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player,INTERACTION_DISTANCE)) + if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player,INTERACTION_DISTANCE))) return; loot = &go->loot; diff --git a/src/game/Map.cpp b/src/game/Map.cpp index a43712d25..544c62a31 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1789,7 +1789,8 @@ uint16 Map::GetAreaFlag(float x, float y, float z) const // Makers' Overlook (ground and cave) else if (x > 5634.48f && x < 5774.53f && y < 3475.0f && z > 300.0f) { - if(y > 3380.26f || y > 3265.0f && z < 360.0f) areaflag = 2187; + if (y > 3380.26f || (y > 3265.0f && z < 360.0f)) + areaflag = 2187; } break; // The Makers' Perch (underground) @@ -1868,7 +1869,7 @@ void Map::GetZoneAndAreaIdByAreaFlag(uint32& zoneid, uint32& areaid, uint16 area bool Map::IsInWater(float x, float y, float pZ) const { // Check surface in x, y point for liquid - if (GridMap* gmap = const_cast(this)->GetGrid(x, y)) + if (const_cast(this)->GetGrid(x, y)) { LiquidData liquid_status; if (getLiquidStatus(x, y, pZ, MAP_ALL_LIQUIDS, &liquid_status)) @@ -1882,7 +1883,7 @@ bool Map::IsInWater(float x, float y, float pZ) const bool Map::IsUnderWater(float x, float y, float z) const { - if (GridMap* gmap = const_cast(this)->GetGrid(x, y)) + if (const_cast(this)->GetGrid(x, y)) { if (getLiquidStatus(x, y, z, MAP_LIQUID_TYPE_WATER|MAP_LIQUID_TYPE_OCEAN)&LIQUID_MAP_UNDER_WATER) return true; diff --git a/src/game/Map.h b/src/game/Map.h index c4abec12e..bf3dbdfb7 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -478,6 +478,8 @@ class MANGOS_DLL_SPEC Map : public GridRefManager, public MaNGOS::Obj ActiveNonPlayers m_activeNonPlayers; ActiveNonPlayers::iterator m_activeNonPlayersIter; private: + time_t i_gridExpiry; + //used for fast base_map (e.g. MapInstanced class object) search for //InstanceMaps and BattleGroundMaps... Map* m_parentMap; @@ -489,8 +491,6 @@ class MANGOS_DLL_SPEC Map : public GridRefManager, public MaNGOS::Obj GridMap *GridMaps[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; std::bitset marked_cells; - time_t i_gridExpiry; - std::set i_objectsToRemove; std::multimap m_scriptSchedule; diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index 54bfb4410..319279a2b 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -90,7 +90,7 @@ MotionMaster::UpdateMotion(uint32 diff) if (m_expList) { - for (int i = 0; i < m_expList->size(); ++i) + for (size_t i = 0; i < m_expList->size(); ++i) { MovementGenerator* mg = (*m_expList)[i]; if (!isStatic(mg)) diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 7696e1e48..c4ca4d8f5 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -438,7 +438,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) if(_player->m_mover->GetGUID() != guid) { - sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " I64FMT " and should be " I64FMT, _player->m_mover->GetGUID(), guid); + sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, _player->m_mover->GetGUID(), guid); return; } } @@ -453,7 +453,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data) if(_player->m_mover->GetGUID() == old_mover_guid) { - sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " I64FMT " and should be " I64FMT " instead of " I64FMT, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid); + sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD " instead of " UI64FMTD, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid); recv_data.rpos(recv_data.wpos()); // prevent warnings spam return; } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index d6a70f0d8..0a064aa3e 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -111,7 +111,7 @@ bool SpellClickInfo::IsFitToRequirements(Player const* player) const if(questStart) { // not in expected required quest state - if(!player || (!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart)) + if (!player || ((!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart))) return false; } @@ -782,8 +782,8 @@ void ObjectMgr::ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const* // replace by new structures array const_cast(addon->auras) = new CreatureDataAddonAura[val.size()/2+1]; - int i=0; - for(int j=0;j(addon->auras[i]); cAura.spell_id = (uint32)val[2*j+0]; @@ -1082,7 +1082,7 @@ void ObjectMgr::LoadCreatures() if(heroicCreatures.find(data.id)!=heroicCreatures.end()) { - sLog.outErrorDb("Table `creature` have creature (GUID: %u) that listed as heroic template in `creature_template`, skipped.",guid,data.id ); + sLog.outErrorDb("Table `creature` have creature (GUID: %u) that listed as heroic template (entry: %u) in `creature_template`, skipped.",guid, data.id ); continue; } @@ -3464,8 +3464,8 @@ void ObjectMgr::LoadQuests() bool found = false; for(int k = 0; k < 3; ++k) { - if( spellInfo->Effect[k]==SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->EffectMiscValue[k])==qinfo->QuestId || - spellInfo->Effect[k]==SPELL_EFFECT_SEND_EVENT) + if ((spellInfo->Effect[k] == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->EffectMiscValue[k]) == qinfo->QuestId) || + spellInfo->Effect[k] == SPELL_EFFECT_SEND_EVENT) { found = true; break; @@ -7080,7 +7080,10 @@ bool PlayerCondition::Meets(Player const * player) const case CONDITION_REPUTATION_RANK: { FactionEntry const* faction = sFactionStore.LookupEntry(value1); - return faction && player->GetReputationMgr().GetRank(faction) >= value2; + // -1 used if faction couldn't be found + if (player->GetReputationMgr().GetRank(faction) == -1) + return false; + return faction && uint32(player->GetReputationMgr().GetRank(faction)) >= value2; } case CONDITION_TEAM: return player->GetTeam() == value1; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 2a061ba20..0006f266b 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -776,9 +776,9 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) void Player::SendMirrorTimer(MirrorTimerType Type, uint32 MaxValue, uint32 CurrentValue, int32 Regen) { - if (MaxValue == DISABLED_MIRROR_TIMER) + if (int(MaxValue) == DISABLED_MIRROR_TIMER) { - if (CurrentValue!=DISABLED_MIRROR_TIMER) + if (int(CurrentValue) != DISABLED_MIRROR_TIMER) StopMirrorTimer(Type); return; } @@ -1499,7 +1499,7 @@ bool Player::BuildEnumData( QueryResult * result, WorldPacket * p_data ) if(!enchantId) continue; - if(enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId)) + if ((enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId))) break; } @@ -2260,9 +2260,8 @@ bool Player::IsGroupVisibleFor(Player* p) const bool Player::IsInSameGroupWith(Player const* p) const { - return p==this || GetGroup() != NULL && - GetGroup() == p->GetGroup() && - GetGroup()->SameSubGroup((Player*)this, (Player*)p); + return (p==this || (GetGroup() != NULL && + GetGroup()->SameSubGroup((Player*)this, (Player*)p))); } ///- If the player is invited, remove him. If the group if then only 1 person, disband the group. @@ -3064,7 +3063,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen if (_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL || // lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL - (pSkill->id==SKILL_LOCKPICKING || pSkill->id==SKILL_RUNEFORGING) && _spell_idx->second->max_value==0 ) + ((pSkill->id==SKILL_LOCKPICKING || pSkill->id==SKILL_RUNEFORGING) && _spell_idx->second->max_value==0)) { switch(GetSkillRangeType(pSkill,_spell_idx->second->racemask!=0)) { @@ -3118,7 +3117,7 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellEntry const* spellInfo) const { // note: form passives activated with shapeshift spells be implemented by HandleShapeshiftBoosts instead of spell_learn_spell // talent dependent passives activated at form apply have proper stance data - bool need_cast = !spellInfo->Stances || m_form != 0 && (spellInfo->Stances & (1<<(m_form-1))); + bool need_cast = (!spellInfo->Stances || (m_form != 0 && (spellInfo->Stances & (1<<(m_form-1))))); //Check CasterAuraStates return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState))); @@ -3160,7 +3159,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) if (itr == m_spells.end()) return; - if(itr->second->state == PLAYERSPELL_REMOVED || disabled && itr->second->disabled) + if (itr->second->state == PLAYERSPELL_REMOVED || (disabled && itr->second->disabled)) return; // unlearn non talent higher ranks (recursive) @@ -3270,7 +3269,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) if(_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL && pSkill->categoryId != SKILL_CATEGORY_CLASS ||// not unlearn class skills (spellbook/talent pages) // lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL - (pSkill->id==SKILL_LOCKPICKING || pSkill->id==SKILL_RUNEFORGING) && _spell_idx->second->max_value==0 ) + ((pSkill->id==SKILL_LOCKPICKING || pSkill->id==SKILL_RUNEFORGING) && _spell_idx->second->max_value==0)) { // not reset skills for professions and racial abilities if ((pSkill->categoryId==SKILL_CATEGORY_SECONDARY || pSkill->categoryId==SKILL_CATEGORY_PROFESSION) && @@ -4495,7 +4494,7 @@ void Player::RepopAtGraveyard() AreaTableEntry const *zone = GetAreaEntryByAreaID(GetAreaId()); // Such zones are considered unreachable as a ghost and the player must be automatically revived - if(!isAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY || GetTransport()) + if ((!isAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport()) { ResurrectPlayer(0.5f); SpawnCorpseBones(); @@ -6736,7 +6735,7 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl // If set dpsMod in ScalingStatValue use it for min (70% from average), max (130% from average) damage if (ssv) { - if (extraDPS = ssv->getDPSMod(proto->ScalingStatValue)) + if ((extraDPS = ssv->getDPSMod(proto->ScalingStatValue))) { float average = extraDPS * proto->Delay / 1000.0f; minDamage = 0.7f * average; @@ -8459,10 +8458,10 @@ Item* Player::GetItemByPos( uint16 pos ) const Item* Player::GetItemByPos( uint8 bag, uint8 slot ) const { - if( bag == INVENTORY_SLOT_BAG_0 && ( slot < BANK_SLOT_BAG_END || slot >= KEYRING_SLOT_START && slot < CURRENCYTOKEN_SLOT_END ) ) + if( bag == INVENTORY_SLOT_BAG_0 && ( slot < BANK_SLOT_BAG_END || (slot >= KEYRING_SLOT_START && slot < CURRENCYTOKEN_SLOT_END )) ) return m_items[slot]; - else if(bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END - || bag >= BANK_SLOT_BAG_START && bag < BANK_SLOT_BAG_END ) + else if ((bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END) + || (bag >= BANK_SLOT_BAG_START && bag < BANK_SLOT_BAG_END) ) { Bag *pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, bag ); if ( pBag ) @@ -11095,7 +11094,7 @@ void Player::SwapItem( uint16 src, uint16 dst ) if(IsEquipmentPos ( src ) || IsBagPos ( src )) { // bags can be swapped with empty bag slots, or with empty bag (items move possibility checked later) - uint8 msg = CanUnequipItem( src, !IsBagPos ( src ) || IsBagPos ( dst ) || pDstItem && pDstItem->IsBag() && ((Bag*)pDstItem)->IsEmpty()); + uint8 msg = CanUnequipItem( src, !IsBagPos ( src ) || IsBagPos ( dst ) || (pDstItem && pDstItem->IsBag() && ((Bag*)pDstItem)->IsEmpty())); if(msg != EQUIP_ERR_OK) { SendEquipError( msg, pSrcItem, pDstItem ); @@ -11125,7 +11124,7 @@ void Player::SwapItem( uint16 src, uint16 dst ) if(IsEquipmentPos ( dst ) || IsBagPos ( dst )) { // bags can be swapped with empty bag slots, or with empty bag (items move possibility checked later) - uint8 msg = CanUnequipItem( dst, !IsBagPos ( dst ) || IsBagPos ( src ) || pSrcItem->IsBag() && ((Bag*)pSrcItem)->IsEmpty()); + uint8 msg = CanUnequipItem( dst, !IsBagPos ( dst ) || IsBagPos ( src ) || (pSrcItem->IsBag() && ((Bag*)pSrcItem)->IsEmpty())); if(msg != EQUIP_ERR_OK) { SendEquipError( msg, pSrcItem, pDstItem ); @@ -11543,7 +11542,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly) Item* item = *itr; ++itr; // current element can be erased in UpdateDuration - if (realtimeonly && item->GetProto()->Duration < 0 || !realtimeonly) + if ((realtimeonly && item->GetProto()->Duration < 0) || !realtimeonly) item->UpdateDuration(this,time); } } @@ -14066,7 +14065,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) // check name limitations if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS || - GetSession()->GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(m_name)) + (GetSession()->GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(m_name))) { delete result; CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE guid ='%u'", uint32(AT_LOGIN_RENAME),guid); @@ -15718,8 +15717,6 @@ void Player::_SaveAuras() // save previous spellEffectPair to db itr2--; - SpellEntry const *spellInfo = itr2->second->GetSpellProto(); - //skip all auras from spells that are passive //do not save single target auras (unless they were cast by the player) if (!itr2->second->IsPassive() && (itr2->second->GetCasterGUID() == GetGUID() || !itr2->second->IsSingleTarget())) @@ -16989,7 +16986,7 @@ bool Player::ActivateTaxiPathTo(std::vector const& nodes, Creature* npc uint32 mount_display_id = objmgr.GetTaxiMountDisplayId(sourcenode, GetTeam(), npc == NULL); // in spell case allow 0 model - if (mount_display_id == 0 && spellid == 0 || sourcepath == 0) + if ((mount_display_id == 0 && spellid == 0) || sourcepath == 0) { WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); data << uint32(ERR_TAXIUNSPECIFIEDSERVERERROR); @@ -19151,8 +19148,8 @@ void Player::UpdateAreaDependentAuras( uint32 newArea ) uint32 Player::GetCorpseReclaimDelay(bool pvp) const { - if( pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP) || - !pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE) ) + if ((pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) || + (!pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE) )) { return copseReclaimDelay[0]; } @@ -19167,8 +19164,8 @@ void Player::UpdateCorpseReclaimDelay() { bool pvp = m_ExtraFlags & PLAYER_EXTRA_PVP_DEATH; - if( pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP) || - !pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE) ) + if ((pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) || + (!pvp && !sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE) )) return; time_t now = time(NULL); diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp index dd0834b80..6e6a71312 100644 --- a/src/game/PoolHandler.cpp +++ b/src/game/PoolHandler.cpp @@ -100,7 +100,7 @@ uint32 PoolGroup::RollOne(void) template void PoolGroup::DespawnObject(uint32 guid) { - for (int i=0; i::SpawnObject(uint32 limit, bool cache) else if (limit < EqualChanced.size() && Spawned < limit) { std::vector IndexList; - for (int i=0; i::SpawnObject(uint32 limit, bool cache) } else // Not enough objects in pool, so spawn all { - for (int i=0; iGetName() && (security > SEC_PLAYER || - (pFriend->GetTeam() == team || allowTwoSideWhoList) && (pFriend->GetSession()->GetSecurity() <= gmLevelInWhoList)) && + ((pFriend->GetTeam() == team || allowTwoSideWhoList) && (pFriend->GetSession()->GetSecurity() <= gmLevelInWhoList))) && pFriend->IsVisibleGloballyFor(player)) { friendInfo.Status = FRIEND_STATUS_ONLINE; @@ -285,7 +285,7 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet) // MODERATOR, GAME MASTER, ADMINISTRATOR can see all if (pFriend && pFriend->IsInWorld() && (pFriend->GetSession()->GetSecurity() > SEC_PLAYER || - (pFriend->GetTeam() == team || allowTwoSideWhoList) && security <= gmLevelInWhoList) && + ((pFriend->GetTeam() == team || allowTwoSideWhoList) && security <= gmLevelInWhoList)) && player->IsVisibleGloballyFor(pFriend)) { pFriend->GetSession()->SendPacket(packet); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index e5f053b58..2c3b22ef0 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4866,6 +4866,7 @@ SpellCastResult Spell::CheckCasterAuras() const else if ( m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE) return SPELL_FAILED_SILENCED; break; + default: break; } } } @@ -5987,4 +5988,4 @@ void Spell::FillRaidOrPartyHealthPriorityTargets( UnitList &TagUnitMap, Unit* me TagUnitMap.push_back(healthQueue.top().getUnit()); healthQueue.pop(); } -} \ No newline at end of file +} diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 52cc53caf..c2f188fbc 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1325,8 +1325,6 @@ void Aura::HandleAddModifier(bool apply, bool Real) m_spellmod = mod; } - uint64 spellFamilyMask = m_spellmod->mask; - ((Player*)m_target)->AddSpellMod(m_spellmod, apply); // reapply talents to own passive persistent auras diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 87c0849b7..5ffee0e34 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2989,7 +2989,8 @@ void SpellMgr::CheckUsedSpells(char const* table) { if(spellEntry->SpellFamilyFlags != 0 || spellEntry->SpellFamilyFlags2 != 0) { - sLog.outError("Spell %u '%s' not fit to (" I64FMT "," I32FMT ") but used in %s.",spell,name.c_str(),familyMaskA,familyMaskB,code.c_str()); + sLog.outError("Spell %u '%s' not fit to (" UI64FMTD "," I32FMT ") but used in %s.", + spell, name.c_str(), familyMaskA, familyMaskB, code.c_str()); continue; } diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 96f93e035..68560b750 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -167,16 +167,16 @@ inline bool IsElementalShield(SpellEntry const *spellInfo) inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo) { - return spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM - && spellInfo->Effect[1] == SPELL_EFFECT_SCRIPT_EFFECT - || spellInfo->Id == 64323; // Book of Glyph Mastery (Effect0==SPELL_EFFECT_SCRIPT_EFFECT without any other data) + return ((spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM + && spellInfo->Effect[1] == SPELL_EFFECT_SCRIPT_EFFECT) + || spellInfo->Id == 64323); // Book of Glyph Mastery (Effect0==SPELL_EFFECT_SCRIPT_EFFECT without any other data) } inline bool IsLootCraftingSpell(SpellEntry const *spellInfo) { - return spellInfo->Effect[0]==SPELL_EFFECT_CREATE_RANDOM_ITEM || + return (spellInfo->Effect[0]==SPELL_EFFECT_CREATE_RANDOM_ITEM || // different random cards from Inscription (121==Virtuoso Inking Set category) - spellInfo->Effect[0]==SPELL_EFFECT_CREATE_ITEM_2 && spellInfo->TotemCategory[0] == 121; + (spellInfo->Effect[0]==SPELL_EFFECT_CREATE_ITEM_2 && spellInfo->TotemCategory[0] == 121)); } int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2); diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index cbcd754f3..c305e9e74 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -309,6 +309,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged ) } break; } + default: break; } switch(m_form) @@ -909,7 +910,7 @@ void Pet::UpdateResistances(uint32 school) Unit *owner = GetOwner(); // hunter and warlock pets gain 40% of owner's resistance - if(owner && (getPetType() == HUNTER_PET || getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK)) + if(owner && (getPetType() == HUNTER_PET || (getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK))) value += float(owner->GetResistance(SpellSchools(school))) * 0.4f; SetResistance(SpellSchools(school), int32(value)); @@ -926,7 +927,7 @@ void Pet::UpdateArmor() Unit *owner = GetOwner(); // hunter and warlock pets gain 35% of owner's armor value - if(owner && (getPetType() == HUNTER_PET || getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK)) + if(owner && (getPetType() == HUNTER_PET || (getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK))) bonus_armor = 0.35f * float(owner->GetArmor()); value = GetModifierValue(unitMod, BASE_VALUE); diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp index c7948f523..6662545e4 100644 --- a/src/game/TradeHandler.cpp +++ b/src/game/TradeHandler.cpp @@ -592,7 +592,7 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket) // check cheating, can't fail with correct client operations Item* item = _player->GetItemByPos(bag,slot); - if(!item || tradeSlot!=TRADE_SLOT_NONTRADED && !item->CanBeTraded()) + if (!item || (tradeSlot != TRADE_SLOT_NONTRADED && !item->CanBeTraded())) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a69fb3582..9fdc3f158 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6500,7 +6500,6 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB { if ((*i)->GetModifier()->m_miscvalue == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellProto()->SpellIconID == 113) { - int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this); // Drain Soul CastCustomSpell(this, 18371, &basepoints[0], NULL, NULL, true, castItem, triggeredByAura); break; diff --git a/src/game/Unit.h b/src/game/Unit.h index 2e24a4f1e..9726aa874 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -692,9 +692,9 @@ struct SpellPeriodicAuraLogInfo Aura *aura; uint32 damage; + uint32 overDamage; // overkill/overheal uint32 absorb; uint32 resist; - uint32 overDamage; // overkill/overheal float multiplier; bool critical; }; diff --git a/src/game/WaypointManager.cpp b/src/game/WaypointManager.cpp index 2806bd73e..831ffca68 100644 --- a/src/game/WaypointManager.cpp +++ b/src/game/WaypointManager.cpp @@ -312,7 +312,7 @@ void WaypointManager::CheckTextsExistance(std::set& ids) WaypointPathMap::const_iterator pmItr = m_pathMap.begin(); for ( ; pmItr != m_pathMap.end(); ++pmItr) { - for (int i = 0; i < pmItr->second.size(); ++i) + for (size_t i = 0; i < pmItr->second.size(); ++i) { WaypointBehavior* be = pmItr->second[i].behavior; if (!be) diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index acf3fb398..f33512bdd 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -310,7 +310,7 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport() return; uint32 map0 = i_mapIds[0]; - for(int i = 1; i < i_mapIds.size(); ++i) + for (size_t i = 1; i < i_mapIds.size(); ++i) { if(i_mapIds[i]!=map0) { diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 18c8d6f27..44d55fbcd 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -597,14 +597,14 @@ void WorldSession::LoadAccountData(QueryResult* result, uint32 mask) if (type >= NUM_ACCOUNT_DATA_TYPES) { sLog.outError("Table `%s` have invalid account data type (%u), ignore.", - mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data"); + mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type); continue; } if ((mask & (1 << type))==0) { sLog.outError("Table `%s` have non appropriate for table account data type (%u), ignore.", - mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data"); + mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type); continue; } @@ -887,4 +887,4 @@ void WorldSession::SetPlayer( Player *plr ) // set m_GUID that can be used while player loggined and later until m_playerRecentlyLogout not reset if(_player) m_GUIDLow = _player->GetGUIDLow(); -} \ No newline at end of file +} diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp index 7cb6c1011..36ae92e35 100644 --- a/src/mangosd/Master.cpp +++ b/src/mangosd/Master.cpp @@ -293,10 +293,6 @@ int Master::Run() uint32 socketSelecttime = sWorld.getConfig(CONFIG_SOCKET_SELECTTIME); - // maximum counter for next ping - uint32 numLoops = (sConfig.GetIntDefault( "MaxPingTime", 30 ) * (MINUTE * 1000000 / socketSelecttime)); - uint32 loopCounter = 0; - ///- Start up freeze catcher thread if(uint32 freeze_delay = sConfig.GetIntDefault("MaxCoreStuckTime", 0)) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 31ae0d921..47bc1a6d8 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8474" + #define REVISION_NR "8475" #endif // __REVISION_NR_H__