[12065] Fix various warnings

This commit is contained in:
Schmoozerd 2012-07-20 18:48:48 +02:00
parent 5f4d61928f
commit 84080ee5d3
27 changed files with 91 additions and 89 deletions

View file

@ -325,7 +325,7 @@ bool AchievementCriteriaRequirement::Meets(uint32 criteria_id, Player const* sou
case ACHIEVEMENT_CRITERIA_REQUIRE_T_TEAM:
if (!target || target->GetTypeId() != TYPEID_PLAYER)
return false;
return ((Player*)target)->GetTeam() == team.team;
return ((Player*)target)->GetTeam() == Team(team.team);
case ACHIEVEMENT_CRITERIA_REQUIRE_S_DRUNK:
return (uint32)Player::GetDrunkenstateByValue(source->GetDrunkValue()) >= drunk.state;
case ACHIEVEMENT_CRITERIA_REQUIRE_HOLIDAY:

View file

@ -704,7 +704,7 @@ WorldSafeLocsEntry const* BattleGroundAV::GetClosestGraveYard(Player* plr)
return good_entry;
}
uint32 BattleGroundAV::GetNodeName(BG_AV_Nodes node)
uint32 BattleGroundAV::GetNodeName(BG_AV_Nodes node) const
{
switch (node)
{

View file

@ -364,9 +364,9 @@ class BattleGroundAV : public BattleGround
void PopulateNode(BG_AV_Nodes node);
uint32 GetNodeName(BG_AV_Nodes node);
const bool IsTower(BG_AV_Nodes node) { return (node == BG_AV_NODES_ERROR) ? false : m_Nodes[node].Tower; }
const bool IsGrave(BG_AV_Nodes node) { return (node == BG_AV_NODES_ERROR) ? false : !m_Nodes[node].Tower; }
uint32 GetNodeName(BG_AV_Nodes node) const;
bool IsTower(BG_AV_Nodes node) const { return (node == BG_AV_NODES_ERROR) ? false : m_Nodes[node].Tower; }
bool IsGrave(BG_AV_Nodes node) const { return (node == BG_AV_NODES_ERROR) ? false : !m_Nodes[node].Tower; }
/*mine*/
void ChangeMineOwner(uint8 mine, BattleGroundAVTeamIndex teamIdx);

View file

@ -73,7 +73,7 @@ class MANGOS_DLL_SPEC CreatureAI
* Use this for on-the-fly debugging
* @param reader is a ChatHandler to send messages to.
*/
virtual void GetAIInformation(ChatHandler& reader) {}
virtual void GetAIInformation(ChatHandler& /*reader*/) {}
///== Reactions At =================================
@ -83,13 +83,13 @@ class MANGOS_DLL_SPEC CreatureAI
* Note: This function is not called for creatures who are in evade mode
* @param pWho Unit* who moved in the visibility range and is visisble
*/
virtual void MoveInLineOfSight(Unit* pWho) {}
virtual void MoveInLineOfSight(Unit* /*pWho*/) {}
/**
* Called for reaction at enter to combat if not in combat yet
* @param pEnemy Unit* of whom the Creature enters combat with, can be NULL
*/
virtual void EnterCombat(Unit* pEnemy) {}
virtual void EnterCombat(Unit* /*pEnemy*/) {}
/**
* Called for reaction at stopping attack at no attackers or targets
@ -110,7 +110,7 @@ class MANGOS_DLL_SPEC CreatureAI
* @param pDoneTo Unit* to whom Damage of amount uiDamage will be dealt
* @param uiDamage Amount of Damage that will be dealt, can be changed here
*/
virtual void DamageDeal(Unit* pDoneTo, uint32& uiDamage) {}
virtual void DamageDeal(Unit* /*pDoneTo*/, uint32& /*uiDamage*/) {}
/**
* Called at any Damage from any attacker (before damage apply)
@ -119,69 +119,69 @@ class MANGOS_DLL_SPEC CreatureAI
* @param pDealer Unit* who will deal Damage to the creature
* @param uiDamage Amount of Damage that will be dealt, can be changed here
*/
virtual void DamageTaken(Unit* pDealer, uint32& uiDamage) {}
virtual void DamageTaken(Unit* /*pDealer*/, uint32& /*uiDamage*/) {}
/**
* Called when the creature is killed
* @param pKiller Unit* who killed the creature
*/
virtual void JustDied(Unit* pKiller) {}
virtual void JustDied(Unit* /*pKiller*/) {}
/**
* Called when the corpse of this creature gets removed
* @param uiRespawnDelay Delay (in seconds). If != 0, then this is the time after which the creature will respawn, if = 0 the default respawn-delay will be used
*/
virtual void CorpseRemoved(uint32& uiRespawnDelay) {}
virtual void CorpseRemoved(uint32& /*uiRespawnDelay*/) {}
/**
* Called when a summoned creature is killed
* @param pSummoned Summoned Creature* that got killed
*/
virtual void SummonedCreatureJustDied(Creature* pSummoned) {}
virtual void SummonedCreatureJustDied(Creature* /*pSummoned*/) {}
/**
* Called when the creature kills a unit
* @param pVictim Victim that got killed
*/
virtual void KilledUnit(Unit* pVictim) {}
virtual void KilledUnit(Unit* /*pVictim*/) {}
/**
* Called when owner of m_creature (if m_creature is PROTECTOR_PET) kills a unit
* @param pVictim Victim that got killed (by owner of creature)
*/
virtual void OwnerKilledUnit(Unit* pVictim) {}
virtual void OwnerKilledUnit(Unit* /*pVictim*/) {}
/**
* Called when the creature summon successfully other creature
* @param pSummoned Creature that got summoned
*/
virtual void JustSummoned(Creature* pSummoned) {}
virtual void JustSummoned(Creature* /*pSummoned*/) {}
/**
* Called when the creature summon successfully a gameobject
* @param pGo GameObject that was summoned
*/
virtual void JustSummoned(GameObject* pGo) {}
virtual void JustSummoned(GameObject* /*pGo*/) {}
/**
* Called when a summoned creature gets TemporarySummon::UnSummon ed
* @param pSummoned Summoned creature that despawned
*/
virtual void SummonedCreatureDespawn(Creature* pSummoned) {}
virtual void SummonedCreatureDespawn(Creature* /*pSummoned*/) {}
/**
* Called when hit by a spell
* @param pCaster Caster who casted the spell
* @param pSpell The spell that hit the creature
*/
virtual void SpellHit(Unit* pCaster, const SpellEntry* pSpell) {}
virtual void SpellHit(Unit* /*pCaster*/, const SpellEntry* /*pSpell*/) {}
/**
* Called when spell hits creature's target
* @param pTarget Target that we hit with the spell
* @param pSpell Spell with which we hit pTarget
*/
virtual void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) {}
virtual void SpellHitTarget(Unit* /*pTarget*/, const SpellEntry* /*pSpell*/) {}
/**
* Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
@ -199,7 +199,7 @@ class MANGOS_DLL_SPEC CreatureAI
* @param uiMovementType Type of the movement (enum MovementGeneratorType)
* @param uiData Data related to the finished movement (ie point-id)
*/
virtual void MovementInform(uint32 uiMovementType, uint32 uiData) {}
virtual void MovementInform(uint32 /*uiMovementType*/, uint32 /*uiData*/) {}
/**
* Called if a temporary summoned of m_creature reach a move point
@ -207,14 +207,14 @@ class MANGOS_DLL_SPEC CreatureAI
* @param uiMotionType Type of the movement (enum MovementGeneratorType)
* @param uiData Data related to the finished movement (ie point-id)
*/
virtual void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiData) {}
virtual void SummonedMovementInform(Creature* /*pSummoned*/, uint32 /*uiMotionType*/, uint32 /*uiData*/) {}
/**
* Called at text emote receive from player
* @param pPlayer Player* who sent the emote
* @param uiEmote ID of the emote the player used with the creature as target
*/
virtual void ReceiveEmote(Player* pPlayer, uint32 uiEmote) {}
virtual void ReceiveEmote(Player* /*pPlayer*/, uint32 /*uiEmote*/) {}
///== Triggered Actions Requested ==================
@ -224,7 +224,7 @@ class MANGOS_DLL_SPEC CreatureAI
* Note: Usually called by MoveInLineOfSight, in Unit::SelectHostileTarget or when the AI is forced to attack an enemy
* @param pWho Unit* who is possible target
*/
virtual void AttackStart(Unit* pWho) {}
virtual void AttackStart(Unit* /*pWho*/) {}
/**
* Called at World update tick, by default every 100ms
@ -232,7 +232,7 @@ class MANGOS_DLL_SPEC CreatureAI
* Note: Use this function to handle Timers, Threat-Management and MeleeAttacking
* @param uiDiff Passed time since last call
*/
virtual void UpdateAI(const uint32 uiDiff) {}
virtual void UpdateAI(const uint32 /*uiDiff*/) {}
///== State checks =================================
@ -241,7 +241,7 @@ class MANGOS_DLL_SPEC CreatureAI
* Note: This check is by default only the state-depending (visibility, range), NOT LineOfSight
* @param pWho Unit* who is checked if it is visisble for the creature
*/
virtual bool IsVisible(Unit* pWho) const { return false; }
virtual bool IsVisible(Unit* /*pWho*/) const { return false; }
// Called when victim entered water and creature can not enter water
// TODO: rather unused

View file

@ -471,6 +471,9 @@ void CreatureLinkingHolder::DoCreatureLinkingEvent(CreatureLinkingEvent eventTyp
case LINKING_EVENT_RESPAWN:
if (pMaster->isAlive())
SetFollowing(pSource, pMaster);
break;
case LINKING_EVENT_DIE: // Nothing linked for this case
break;
}
}
}

View file

@ -115,7 +115,7 @@ Unit* DynamicObject::GetCaster() const
return ObjectAccessor::GetUnit(*this, GetCasterGuid());
}
void DynamicObject::Update(uint32 update_diff, uint32 p_time)
void DynamicObject::Update(uint32 /*update_diff*/, uint32 p_time)
{
// caster can be not in world at time dynamic object update, but dynamic object not yet deleted in Unit destructor
Unit* caster = GetCaster();

View file

@ -41,7 +41,7 @@ namespace MaNGOS
explicit VisibleNotifier(Camera& c) : i_camera(c), i_clientGUIDs(c.GetOwner()->m_clientGUIDs) {}
template<class T> void Visit(GridRefManager<T>& m);
void Visit(CameraMapType& m) {}
void Visit(CameraMapType& /*m*/) {}
void Notify(void);
};
@ -704,7 +704,7 @@ namespace MaNGOS
{
public:
NearestGameObjectEntryInPosRangeCheck(WorldObject const& obj, uint32 entry, float x, float y, float z, float range)
: i_obj(obj), i_x(x), i_y(y), i_z(z), i_entry(entry), i_range(range) {}
: i_obj(obj), i_entry(entry), i_x(x), i_y(y), i_z(z), i_range(range) {}
WorldObject const& GetFocusObject() const { return i_obj; }
@ -737,7 +737,7 @@ namespace MaNGOS
{
public:
GameObjectEntryInPosRangeCheck(WorldObject const& obj, uint32 entry, float x, float y, float z, float range)
: i_obj(obj), i_x(x), i_y(y), i_z(z), i_entry(entry), i_range(range) {}
: i_obj(obj), i_entry(entry), i_x(x), i_y(y), i_z(z), i_range(range) {}
WorldObject const& GetFocusObject() const { return i_obj; }
@ -1096,7 +1096,7 @@ namespace MaNGOS
WorldObject const& GetFocusObject() const { return i_obj; }
bool operator()(Creature* u)
{
if (u->GetEntry() == i_entry && (i_onlyAlive && u->isAlive() || i_onlyDead && u->IsCorpse() || !i_onlyAlive && !i_onlyDead) && i_obj.IsWithinDistInMap(u, i_range))
if (u->GetEntry() == i_entry && ((i_onlyAlive && u->isAlive()) || (i_onlyDead && u->IsCorpse()) || (!i_onlyAlive && !i_onlyDead)) && i_obj.IsWithinDistInMap(u, i_range))
{
i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check
return true;

View file

@ -204,6 +204,7 @@ bool Guild::AddMember(ObjectGuid plGuid, uint32 plRank)
newmember.ZoneId = fields[3].GetUInt32();
newmember.accountId = fields[4].GetInt32();
delete result;
if (newmember.Level < 1 || newmember.Level > STRONG_MAX_LEVEL ||
!((1 << (newmember.Class - 1)) & CLASSMASK_ALL_PLAYABLE))
{

View file

@ -68,7 +68,7 @@ void WorldSession::HandleSearchLfgJoinOpcode(WorldPacket& recv_data)
recv_data >> temp;
entry = (temp & 0x00FFFFFF);
LfgType type = LfgType((temp >> 24) & 0x000000FF);
// LfgType type = LfgType((temp >> 24) & 0x000000FF);
//SendLfgSearchResults(type, entry);
}

View file

@ -4711,7 +4711,7 @@ bool ChatHandler::HandleLookupPoolCommand(char* args)
return true;
}
bool ChatHandler::HandlePoolListCommand(char* args)
bool ChatHandler::HandlePoolListCommand(char* /*args*/)
{
Player* player = m_session->GetPlayer();

View file

@ -144,7 +144,7 @@ bool ChatHandler::HandleAHBotRebuildCommand(char* args)
return true;
}
bool ChatHandler::HandleAHBotReloadCommand(char* args)
bool ChatHandler::HandleAHBotReloadCommand(char* /*args*/)
{
if (sAuctionBot.ReloadAllConfig())
{
@ -6384,7 +6384,7 @@ ComeToMe command REQUIRED for 3rd party scripting library to have access to Poin
Without this function 3rd party scripting library will get linking errors (unresolved external)
when attempting to use the PointMovementGenerator
*/
bool ChatHandler::HandleComeToMeCommand(char* args)
bool ChatHandler::HandleComeToMeCommand(char* /*args*/)
{
Creature* caster = getSelectedCreature();

View file

@ -404,18 +404,18 @@ LootSlotType LootItem::GetSlotTypeForSharedLoot(PermissionTypes permission, Play
switch (permission)
{
case GROUP_PERMISSION:
return (is_blocked || is_underthreshold) ? LOOT_SLOT_NORMAL : LOOT_SLOT_VIEW;
case ALL_PERMISSION:
return LOOT_SLOT_NORMAL;
case OWNER_PERMISSION:
return LOOT_SLOT_OWNER;
case GROUP_PERMISSION:
return (is_blocked || is_underthreshold) ? LOOT_SLOT_NORMAL : LOOT_SLOT_VIEW;
case MASTER_PERMISSION:
return !is_underthreshold ? LOOT_SLOT_MASTER : LOOT_SLOT_NORMAL;
}
case OWNER_PERMISSION:
return LOOT_SLOT_OWNER;
default:
return MAX_LOOT_SLOT_TYPE;
}
}
//
// --------- Loot ---------

View file

@ -291,16 +291,16 @@ void DungeonPersistentState::UpdateEncounterState(EncounterCreditType type, uint
{
DungeonEncounterEntry const* dbcEntry = iter->second->dbcEntry;
if (iter->second->creditType == type && dbcEntry->Difficulty == GetDifficulty() && dbcEntry->mapId == GetMapId())
if (iter->second->creditType == type && Difficulty(dbcEntry->Difficulty) == GetDifficulty() && dbcEntry->mapId == GetMapId())
{
m_completedEncountersMask |= 1 << dbcEntry->encounterIndex;
CharacterDatabase.PExecute("UPDATE instance SET encountersMask = '%u' WHERE id = '%u'", m_completedEncountersMask, GetInstanceId());
DEBUG_LOG("DungeonPersistentState: Dungeon %s (Id %u) completed encounter %s", GetMap()->GetMapName(), GetInstanceId(), dbcEntry->encounterName[sWorld.GetDefaultDbcLocale()]);
if (uint32 dungeonId = iter->second->lastEncounterDungeon)
if (/*uint32 dungeonId =*/ iter->second->lastEncounterDungeon)
{
DEBUG_LOG("DungeonPersistentState:: Dungeon %s (Id %u) completed last encounter %s", GetMap()->GetMapName(), GetInstanceId(), dbcEntry->encounterName[sWorld.GetDefaultDbcLocale()]);
DEBUG_LOG("DungeonPersistentState:: Dungeon %s (Instance-Id %u) completed last encounter %s", GetMap()->GetMapName(), GetInstanceId(), dbcEntry->encounterName[sWorld.GetDefaultDbcLocale()]);
// Place LFG reward here
}
return;
@ -483,7 +483,7 @@ void DungeonResetScheduler::LoadResetTimes()
// schedule the global reset/warning
ResetEventType type = RESET_EVENT_INFORM_1;
for (; type < RESET_EVENT_INFORM_LAST; type = ResetEventType(type + 1))
if (t - resetEventTypeDelay[type] > now)
if (t > time_t(now + resetEventTypeDelay[type]))
break;
ScheduleReset(true, t - resetEventTypeDelay[type], DungeonResetEvent(type, mapid, difficulty, 0));
@ -563,7 +563,7 @@ void DungeonResetScheduler::Update()
ResetEventType type = RESET_EVENT_INFORM_1;
for (; type < RESET_EVENT_INFORM_LAST; type = ResetEventType(type + 1))
if (next_reset - resetEventTypeDelay[type] > now)
if (next_reset > time_t(now + resetEventTypeDelay[type]))
break;
// add new scheduler event to the queue
@ -618,7 +618,7 @@ MapPersistentState* MapPersistentStateManager::AddPersistentState(MapEntry const
}
}
DEBUG_LOG("MapPersistentStateManager::AddPersistentState: mapid = %d, instanceid = %d, reset time = %u, canRset = %u", mapEntry->MapID, instanceId, resetTime, canReset ? 1 : 0);
DEBUG_LOG("MapPersistentStateManager::AddPersistentState: mapid = %d, instanceid = %d, reset time = '" UI64FMTD "', canRset = %u", mapEntry->MapID, instanceId, uint64(resetTime), canReset ? 1 : 0);
MapPersistentState* state;
if (mapEntry->IsDungeon())

View file

@ -591,7 +591,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
// ASSERT print helper
bool PrintCoordinatesError(float x, float y, float z, char const* descr) const;
virtual void StartGroupLoot(Group* group, uint32 timer) {}
virtual void StartGroupLoot(Group* /*group*/, uint32 /*timer*/) {}
protected:
explicit WorldObject();

View file

@ -107,7 +107,7 @@ template<> void addUnitState(Creature* obj, CellPair const& cell_pair)
}
template <class T>
void LoadHelper(CellGuidSet const& guid_set, CellPair& cell, GridRefManager<T>& m, uint32& count, Map* map, GridType& grid)
void LoadHelper(CellGuidSet const& guid_set, CellPair& cell, GridRefManager<T>& /*m*/, uint32& count, Map* map, GridType& grid)
{
BattleGround* bg = map->IsBattleGroundOrArena() ? ((BattleGroundMap*)map)->GetBG() : NULL;
@ -140,7 +140,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellPair& cell, GridRefManager<T>&
}
}
void LoadHelper(CellCorpseSet const& cell_corpses, CellPair& cell, CorpseMapType& m, uint32& count, Map* map, GridType& grid)
void LoadHelper(CellCorpseSet const& cell_corpses, CellPair& cell, CorpseMapType& /*m*/, uint32& count, Map* map, GridType& grid)
{
if (cell_corpses.empty())
return;

View file

@ -5471,7 +5471,7 @@ void ObjectMgr::SetGraveYardLinkTeam(uint32 id, uint32 zoneId, Team team)
return;
// Link expected but not exist.
sLog.outErrorDb("ObjectMgr::SetGraveYardLinkTeam called for safeLoc %u, zoneId &u, but no graveyard link for this found in database.", id, zoneId);
sLog.outErrorDb("ObjectMgr::SetGraveYardLinkTeam called for safeLoc %u, zoneId %u, but no graveyard link for this found in database.", id, zoneId);
AddGraveYardLink(id, zoneId, team); // Add to prevent further error message and correct mechanismn
}

View file

@ -42,7 +42,7 @@ struct PoolTemplateData
// helpers
bool CanBeSpawnedAtMap(MapEntry const* entry) const
{
return mapEntry && (mapEntry == entry || !entry->Instanceable() && !mapEntry->Instanceable());
return mapEntry && (mapEntry == entry || (!entry->Instanceable() && !mapEntry->Instanceable()));
}
};

View file

@ -44,6 +44,7 @@ INSTANTIATE_SINGLETON_1(ScriptMgr);
ScriptMgr::ScriptMgr() :
m_hScriptLib(NULL),
m_scheduledScripts(0),
m_pOnInitScriptLibrary(NULL),
m_pOnFreeScriptLibrary(NULL),
@ -72,9 +73,7 @@ ScriptMgr::ScriptMgr() :
m_pOnEffectDummyCreature(NULL),
m_pOnEffectDummyGO(NULL),
m_pOnEffectDummyItem(NULL),
m_pOnAuraDummy(NULL),
m_scheduledScripts(0)
m_pOnAuraDummy(NULL)
{
}
@ -599,7 +598,7 @@ void ScriptMgr::LoadScripts(ScriptMapMapName& scripts, const char* tablename)
if (SpellEntry const* spell = sSpellStore.LookupEntry(i))
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
{
if (spell->Effect[j] == SPELL_EFFECT_SEND_TAXI && spell->EffectMiscValue[j] == tmp.sendTaxiPath.taxiPathId)
if (spell->Effect[j] == SPELL_EFFECT_SEND_TAXI && spell->EffectMiscValue[j] == int32(tmp.sendTaxiPath.taxiPathId))
{
taxiSpell = i;
break;
@ -1121,7 +1120,7 @@ void ScriptAction::HandleScriptStep()
break;
// Just turn around
if (m_script->x == 0.0f && m_script->y == 0.0f && m_script->z == 0.0f ||
if ((m_script->x == 0.0f && m_script->y == 0.0f && m_script->z == 0.0f) ||
// Check point-to-point distance, hence revert effect of bounding radius
((Unit*)pSource)->IsWithinDist3d(m_script->x, m_script->y, m_script->z, 0.01f - ((Unit*)pSource)->GetObjectBoundingRadius()))
{
@ -1351,8 +1350,8 @@ void ScriptAction::HandleScriptStep()
break;
}
if (m_script->command == SCRIPT_COMMAND_OPEN_DOOR && pDoor->GetGoState() != GO_STATE_READY ||
m_script->command == SCRIPT_COMMAND_CLOSE_DOOR && pDoor->GetGoState() == GO_STATE_READY)
if ((m_script->command == SCRIPT_COMMAND_OPEN_DOOR && pDoor->GetGoState() != GO_STATE_READY) ||
(m_script->command == SCRIPT_COMMAND_CLOSE_DOOR && pDoor->GetGoState() == GO_STATE_READY))
break; // to be opened door already open, or to be closed door already closed
pDoor->UseDoorOrButton(time_to_reset);

View file

@ -368,12 +368,12 @@ class ScriptAction
void HandleScriptStep();
private:
const char* m_table; // of which table the script was started
Map* m_map; // Map on which the action will be executed
ObjectGuid m_sourceGuid;
ObjectGuid m_targetGuid;
ObjectGuid m_ownerGuid; // owner of source if source is item
const char* m_table; // of which table the script was started
ScriptInfo const* m_script; // pointer to static script data
Map* m_map; // Map on which the action will be executed
// Helper functions
bool GetScriptCommandObject(const ObjectGuid guid, bool includeItem, Object*& resultObject);

View file

@ -858,7 +858,7 @@ bool Aura::isAffectedOnSpell(SpellEntry const* spell) const
return spell->IsFitToFamily(SpellFamily(GetSpellProto()->SpellFamilyName), GetAuraSpellClassMask());
}
bool Aura::CanProcFrom(SpellEntry const* spell, uint32 procFlag, uint32 EventProcEx, uint32 procEx, bool active, bool useClassMask) const
bool Aura::CanProcFrom(SpellEntry const* spell, uint32 /*procFlag*/, uint32 EventProcEx, uint32 procEx, bool active, bool useClassMask) const
{
// Check EffectClassMask
ClassFamilyMask const& mask = GetAuraSpellClassMask();
@ -918,7 +918,7 @@ void Aura::ReapplyAffectedPassiveAuras(Unit* target, bool owner_mode)
{
// permanent passive or permanent area aura
// passive spells can be affected only by own or owner spell mods)
if ((itr->second->IsPermanent() && (owner_mode && itr->second->IsPassive() || itr->second->IsAreaAura())) &&
if ((itr->second->IsPermanent() && ((owner_mode && itr->second->IsPassive()) || itr->second->IsAreaAura())) &&
// non deleted and not same aura (any with same spell id)
!itr->second->IsDeleted() && itr->second->GetId() != GetId() &&
// and affected by aura

View file

@ -160,13 +160,13 @@ class MANGOS_DLL_SPEC SpellAuraHolder
~SpellAuraHolder();
private:
SpellEntry const* m_spellProto;
Unit* m_target;
ObjectGuid m_casterGuid;
ObjectGuid m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted
time_t m_applyTime;
SpellEntry const* m_spellProto;
uint8 m_auraSlot; // Aura slot on unit (for show in client)
uint8 m_auraFlags; // Aura info flag (for send data to client)
uint8 m_auraLevel; // Aura level (store caster level for correct show level dep amount)
@ -447,9 +447,8 @@ class MANGOS_DLL_SPEC Aura
bool isAffectedOnSpell(SpellEntry const* spell) const;
bool CanProcFrom(SpellEntry const* spell, uint32 procFlag, uint32 EventProcEx, uint32 procEx, bool active, bool useClassMask) const;
//SpellAuraHolder const* GetHolder() const { return m_spellHolder; }
SpellAuraHolder* GetHolder() { return m_spellAuraHolder; }
SpellAuraHolder* const GetHolder() const { return m_spellAuraHolder; }
SpellAuraHolder const* GetHolder() const { return m_spellAuraHolder; }
bool IsLastAuraOnHolder();

View file

@ -2127,13 +2127,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
return false;
// Shadowflame and Curse of Agony
if (spellInfo_1->SpellIconID == 544 && spellInfo_2->SpellIconID == 3317 ||
spellInfo_2->SpellIconID == 544 && spellInfo_1->SpellIconID == 3317)
if ((spellInfo_1->SpellIconID == 544 && spellInfo_2->SpellIconID == 3317) ||
(spellInfo_2->SpellIconID == 544 && spellInfo_1->SpellIconID == 3317))
return false;
// Shadowflame and Curse of Doom
if (spellInfo_1->SpellIconID == 91 && spellInfo_2->SpellIconID == 3317 ||
spellInfo_2->SpellIconID == 91 && spellInfo_1->SpellIconID == 3317)
if ((spellInfo_1->SpellIconID == 91 && spellInfo_2->SpellIconID == 3317) ||
(spellInfo_2->SpellIconID == 91 && spellInfo_1->SpellIconID == 3317))
return false;
// Metamorphosis, diff effects

View file

@ -2741,7 +2741,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
if (dummySpell->SpellIconID == 138)
{
// only main hand melee auto attack affected and Rune Strike
if ((procFlag & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT) || procSpell && procSpell->Id != 56815)
if ((procFlag & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT) || (procSpell && procSpell->Id != 56815))
return SPELL_AURA_PROC_FAILED;
// triggered_spell_id in spell data
@ -3519,7 +3519,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
// Enlightenment (trigger only from mana cost spells)
case 35095:
{
if (!procSpell || procSpell->powerType != POWER_MANA || procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0 && procSpell->manaCostPerlevel == 0)
if (!procSpell || procSpell->powerType != POWER_MANA || (procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0 && procSpell->manaCostPerlevel == 0))
return SPELL_AURA_PROC_FAILED;
break;
}
@ -3665,7 +3665,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
return SPELL_AURA_PROC_OK;
}
SpellAuraProcResult Unit::HandleProcTriggerDamageAuraProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlags, uint32 procEx, uint32 cooldown)
SpellAuraProcResult Unit::HandleProcTriggerDamageAuraProc(Unit* pVictim, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlags*/, uint32 /*procEx*/, uint32 /*cooldown*/)
{
SpellEntry const* spellInfo = triggeredByAura->GetSpellProto();
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by auratype %u of spell %u)",
@ -3952,7 +3952,7 @@ SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32
return SPELL_AURA_PROC_OK;
}
SpellAuraProcResult Unit::HandleModDamagePercentDoneAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown)
SpellAuraProcResult Unit::HandleModDamagePercentDoneAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
{
SpellEntry const* spellInfo = triggeredByAura->GetSpellProto();
Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER
@ -3991,7 +3991,7 @@ SpellAuraProcResult Unit::HandleModRating(Unit* /*pVictim*/, uint32 /*damage*/,
return SPELL_AURA_PROC_OK;
}
SpellAuraProcResult Unit::HandleSpellMagnetAuraProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
SpellAuraProcResult Unit::HandleSpellMagnetAuraProc(Unit* /*pVictim*/, uint32 damage, Aura* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
{
if (triggeredByAura->GetId() == 8178) // Grounding Totem Effect
{
@ -4005,7 +4005,7 @@ SpellAuraProcResult Unit::HandleSpellMagnetAuraProc(Unit* pVictim, uint32 damage
return SPELL_AURA_PROC_OK;
}
SpellAuraProcResult Unit::HandleManaShieldAuraProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
SpellAuraProcResult Unit::HandleManaShieldAuraProc(Unit* pVictim, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
{
SpellEntry const* dummySpell = triggeredByAura->GetSpellProto();
@ -4077,7 +4077,7 @@ SpellAuraProcResult Unit::HandleModResistanceAuraProc(Unit* /*pVictim*/, uint32
return SPELL_AURA_PROC_OK;
}
SpellAuraProcResult Unit::HandleRemoveByDamageChanceProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
SpellAuraProcResult Unit::HandleRemoveByDamageChanceProc(Unit* /*pVictim*/, uint32 damage, Aura* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
{
// The chance to dispel an aura depends on the damage taken with respect to the casters level.
uint32 max_dmg = getLevel() > 8 ? 25 * getLevel() - 150 : 50;

View file

@ -193,7 +193,7 @@ class PacketFilter
explicit PacketFilter(WorldSession* pSession) : m_pSession(pSession) {}
virtual ~PacketFilter() {}
virtual bool Process(WorldPacket* packet) { return true; }
virtual bool Process(WorldPacket* /*packet*/) { return true; }
virtual bool ProcessLogout() const { return true; }
protected:

View file

@ -189,7 +189,7 @@ namespace Movement
}
MoveSpline::MoveSpline() : m_Id(0), time_passed(0),
vertical_acceleration(0.f), effect_start_time(0), point_Idx(0), point_Idx_offset(0), initialOrientation(0.f)
vertical_acceleration(0.f), initialOrientation(0.f), effect_start_time(0), point_Idx(0), point_Idx_offset(0)
{
splineflags.done = true;
}

View file

@ -99,14 +99,14 @@ namespace Movement
void operator &= (uint32 f) { raw() &= f;}
void operator |= (uint32 f) { raw() |= f;}
void EnableAnimation(uint8 anim) { raw() = raw() & ~(Mask_Animations | Falling | Parabolic) | Animation | anim;}
void EnableParabolic() { raw() = raw() & ~(Mask_Animations | Falling | Animation) | Parabolic;}
void EnableFalling() { raw() = raw() & ~(Mask_Animations | Parabolic | Animation) | Falling;}
void EnableFlying() { raw() = raw() & ~Catmullrom | Flying; }
void EnableCatmullRom() { raw() = raw() & ~Flying | Catmullrom; }
void EnableFacingPoint() { raw() = raw() & ~Mask_Final_Facing | Final_Point;}
void EnableFacingAngle() { raw() = raw() & ~Mask_Final_Facing | Final_Angle;}
void EnableFacingTarget() { raw() = raw() & ~Mask_Final_Facing | Final_Target;}
void EnableAnimation(uint8 anim) { raw() = (raw() & ~(Mask_Animations | Falling | Parabolic)) | Animation | anim;}
void EnableParabolic() { raw() = (raw() & ~(Mask_Animations | Falling | Animation)) | Parabolic;}
void EnableFalling() { raw() = (raw() & ~(Mask_Animations | Parabolic | Animation)) | Falling;}
void EnableFlying() { raw() = (raw() & ~Catmullrom) | Flying; }
void EnableCatmullRom() { raw() = (raw() & ~Flying) | Catmullrom; }
void EnableFacingPoint() { raw() = (raw() & ~Mask_Final_Facing) | Final_Point;}
void EnableFacingAngle() { raw() = (raw() & ~Mask_Final_Facing) | Final_Angle;}
void EnableFacingTarget() { raw() = (raw() & ~Mask_Final_Facing) | Final_Target;}
uint8 animId : 8;
bool done : 1;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12064"
#define REVISION_NR "12065"
#endif // __REVISION_NR_H__