mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[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 <der-coole-carl@gmx.net>
This commit is contained in:
parent
56ddf40d62
commit
bd30769dec
36 changed files with 96 additions and 101 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ class BGQueueInviteEvent : public BasicEvent
|
|||
private:
|
||||
uint64 m_PlayerGuid;
|
||||
uint32 m_BgInstanceGUID;
|
||||
uint32 m_RemoveTime;
|
||||
BattleGroundTypeId m_BgTypeId;
|
||||
uint32 m_RemoveTime;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -386,6 +386,7 @@ void GameObject::Update(uint32 /*p_time*/)
|
|||
if (GetGOInfo()->GetAutoCloseTime() && (m_cooldownTime < time(NULL)))
|
||||
ResetDoorOrButton();
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<Map*>(this)->GetGrid(x, y))
|
||||
if (const_cast<Map*>(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<Map*>(this)->GetGrid(x, y))
|
||||
if (const_cast<Map*>(this)->GetGrid(x, y))
|
||||
{
|
||||
if (getLiquidStatus(x, y, z, MAP_LIQUID_TYPE_WATER|MAP_LIQUID_TYPE_OCEAN)&LIQUID_MAP_UNDER_WATER)
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -478,6 +478,8 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, 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<NGridType>, public MaNGOS::Obj
|
|||
GridMap *GridMaps[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS];
|
||||
std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP> marked_cells;
|
||||
|
||||
time_t i_gridExpiry;
|
||||
|
||||
std::set<WorldObject *> i_objectsToRemove;
|
||||
std::multimap<time_t, ScriptAction> m_scriptSchedule;
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<CreatureDataAddonAura*&>(addon->auras) = new CreatureDataAddonAura[val.size()/2+1];
|
||||
|
||||
int i=0;
|
||||
for(int j=0;j<val.size()/2;++j)
|
||||
uint32 i=0;
|
||||
for(uint32 j = 0; j < val.size()/2; ++j)
|
||||
{
|
||||
CreatureDataAddonAura& cAura = const_cast<CreatureDataAddonAura&>(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,7 +3464,7 @@ 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 ||
|
||||
if ((spellInfo->Effect[k] == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->EffectMiscValue[k]) == qinfo->QuestId) ||
|
||||
spellInfo->Effect[k] == SPELL_EFFECT_SEND_EVENT)
|
||||
{
|
||||
found = true;
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<uint32> 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);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ uint32 PoolGroup<T>::RollOne(void)
|
|||
template<class T>
|
||||
void PoolGroup<T>::DespawnObject(uint32 guid)
|
||||
{
|
||||
for (int i=0; i<EqualChanced.size(); ++i)
|
||||
for (size_t i=0; i < EqualChanced.size(); ++i)
|
||||
{
|
||||
if (EqualChanced[i].spawned)
|
||||
{
|
||||
|
|
@ -189,7 +189,7 @@ void PoolGroup<T>::SpawnObject(uint32 limit, bool cache)
|
|||
else if (limit < EqualChanced.size() && Spawned < limit)
|
||||
{
|
||||
std::vector<uint32> IndexList;
|
||||
for (int i=0; i<EqualChanced.size(); ++i)
|
||||
for (size_t i = 0; i < EqualChanced.size(); ++i)
|
||||
if (!EqualChanced[i].spawned)
|
||||
IndexList.push_back(i);
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ void PoolGroup<T>::SpawnObject(uint32 limit, bool cache)
|
|||
}
|
||||
else // Not enough objects in pool, so spawn all
|
||||
{
|
||||
for (int i=0; i<EqualChanced.size(); ++i)
|
||||
for (size_t i = 0; i < EqualChanced.size(); ++i)
|
||||
EqualChanced[i].spawned = Spawn1Object(EqualChanced[i].guid);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ void SocialMgr::GetFriendInfo(Player *player, uint32 friendGUID, FriendInfo &fri
|
|||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if (pFriend && pFriend->GetName() &&
|
||||
(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);
|
||||
|
|
|
|||
|
|
@ -4866,6 +4866,7 @@ SpellCastResult Spell::CheckCasterAuras() const
|
|||
else if ( m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE)
|
||||
return SPELL_FAILED_SILENCED;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ void WaypointManager::CheckTextsExistance(std::set<int32>& 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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8474"
|
||||
#define REVISION_NR "8475"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue