diff options
| author | azazel <none@none> | 2010-10-16 13:32:30 +0600 |
|---|---|---|
| committer | azazel <none@none> | 2010-10-16 13:32:30 +0600 |
| commit | 3bd1ee0665f8c48bc256fcbe30f447c1fa40bec8 (patch) | |
| tree | 0d16a8f7fafdf330d9d1f2ce7055ee7bf186a1b5 /src/server/game | |
| parent | 88235496944f364bc8f13ef61dbad4639c43f471 (diff) | |
Fix most of the recently introduced warnings
--HG--
branch : trunk
Diffstat (limited to 'src/server/game')
| -rwxr-xr-x | src/server/game/Battlegrounds/Battleground.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Battlegrounds/BattlegroundMgr.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/DungeonFinding/LFGMgr.cpp | 11 | ||||
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 4 | ||||
| -rwxr-xr-x | src/server/game/Spells/SpellScript.cpp | 28 |
5 files changed, 24 insertions, 23 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 43aab1f41a6..8a4d213cb75 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -740,7 +740,7 @@ void Battleground::EndBattleground(uint32 winner) if (sWorld.getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO)) for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); itr++) if (Player* player = sObjectMgr.GetPlayer(itr->first)) - sLog.outArena("Statistics for %s (GUID: %llu, Team: %d, IP: %s): %u damage, %u healing, %u killing blows", player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows); + sLog.outArena("Statistics for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows", player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows); } else { diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 787e5207481..a3c1748c163 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -277,7 +277,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg) itr2 = itr++; if (!bg->IsPlayerInBattleground(itr2->first)) { - sLog.outError("Player %llu has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true)); + sLog.outError("Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true)); continue; } diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 717590b3ec4..44569b2341c 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -347,7 +347,7 @@ void LFGMgr::Update(uint32 diff) LfgGuidList firstNew; while (!m_newToQueue.empty()) { - sLog.outDebug("LFGMgr::Update: checking [" UI64FMTD "] m_newToQueue(%u), m_currentQueue(%u)", m_newToQueue.front(), m_newToQueue.size(), m_currentQueue.size()); + sLog.outDebug("LFGMgr::Update: checking [" UI64FMTD "] m_newToQueue(%u), m_currentQueue(%u)", m_newToQueue.front(), uint32(m_newToQueue.size()), uint32(m_currentQueue.size())); firstNew.push_back(m_newToQueue.front()); @@ -359,7 +359,7 @@ void LFGMgr::Update(uint32 diff) if (proposals.size()) // Group found! { - sLog.outDebug("LFGMgr::Update: Found %u size proposals for [" UI64FMTD "]", m_newToQueue.front()); + sLog.outDebug("LFGMgr::Update: Found %u size proposals for [" UI64FMTD "]", uint32(m_newToQueue.front()), firstNew.front()); LfgProposal* pProposal = (*proposals.begin()); // TODO: Create algorithm to select better group based on GS (uses to be good tank with bad healer and viceversa) @@ -485,7 +485,7 @@ void LFGMgr::AddGuidToNewQueue(uint64 guid) // Add to queue m_newToQueue.push_back(guid); - sLog.outDebug("LFGMgr::AddGuidToNewQueue: [" UI64FMTD "] added to m_newToQueue (size: %u)", guid, m_newToQueue.size()); + sLog.outDebug("LFGMgr::AddGuidToNewQueue: [" UI64FMTD "] added to m_newToQueue (size: %u)", guid, uint32(m_newToQueue.size())); } /// <summary> @@ -525,7 +525,7 @@ void LFGMgr::AddToQueue(uint64 guid, LfgRolesMap* roles, LfgDungeonSet* dungeons for (LfgDungeonSet::const_iterator it = dungeons->begin(); it != dungeons->end(); ++it) pqInfo->dungeons.insert(*it); - sLog.outDebug("LFGMgr::AddToQueue: [" UI64FMTD "] joining with %u members", guid, pqInfo->roles.size()); + sLog.outDebug("LFGMgr::AddToQueue: [" UI64FMTD "] joining with %u members", guid, uint32(pqInfo->roles.size())); m_QueueInfoMap[guid] = pqInfo; AddGuidToNewQueue(guid); } @@ -551,7 +551,8 @@ bool LFGMgr::RemoveFromQueue(uint64 guid) m_QueueInfoMap.erase(it); ret = true; } - sLog.outDebug("LFGMgr::RemoveFromQueue: [" UI64FMTD "] %s - Queue(%u)", guid, before != m_QueueInfoMap.size() ? "Removed": "Not in queue", m_QueueInfoMap.size()); + sLog.outDebug("LFGMgr::RemoveFromQueue: [" UI64FMTD "] %s - Queue(%u)", guid, + before != m_QueueInfoMap.size() ? "Removed" : "Not in queue", uint32(m_QueueInfoMap.size())); return ret; } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f035b298d2f..2e3737c6037 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10450,7 +10450,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 if (bonus->ap_dot_bonus > 0) { WeaponAttackType attType = (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK; - float APbonus = attType == BASE_ATTACK ? pVictim->GetTotalAuraModifier(SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS) : pVictim->GetTotalAuraModifier(SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS); + float APbonus = (float) pVictim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS); APbonus += GetTotalAttackPowerValue(attType); DoneTotal += int32(bonus->ap_dot_bonus * stack * ApCoeffMod * APbonus); } @@ -10461,7 +10461,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 if (bonus->ap_bonus > 0) { WeaponAttackType attType = (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK; - float APbonus = attType == BASE_ATTACK ? pVictim->GetTotalAuraModifier(SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS) : pVictim->GetTotalAuraModifier(SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS); + float APbonus = (float) pVictim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS); APbonus += GetTotalAttackPowerValue(attType); DoneTotal += int32(bonus->ap_bonus * stack * ApCoeffMod * APbonus); } diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index ee2c7836f62..af884e6ebcc 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -255,7 +255,7 @@ Unit * SpellScript::GetHitUnit() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->unitTarget; @@ -265,7 +265,7 @@ Creature * SpellScript::GetHitCreature() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (m_spell->unitTarget) @@ -278,7 +278,7 @@ Player * SpellScript::GetHitPlayer() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (m_spell->unitTarget) @@ -291,7 +291,7 @@ Item * SpellScript::GetHitItem() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->itemTarget; @@ -301,7 +301,7 @@ GameObject * SpellScript::GetHitGObj() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->gameObjTarget; @@ -311,7 +311,7 @@ int32 SpellScript::GetHitDamage() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->m_damage; @@ -321,7 +321,7 @@ void SpellScript::SetHitDamage(int32 damage) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_spell->m_damage = damage; @@ -331,7 +331,7 @@ int32 SpellScript::GetHitHeal() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->m_healing; @@ -341,7 +341,7 @@ void SpellScript::SetHitHeal(int32 heal) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_spell->m_healing = heal; @@ -351,7 +351,7 @@ Aura* SpellScript::GetHitAura() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (!m_spell->m_spellAura) @@ -365,7 +365,7 @@ void SpellScript::PreventHitAura() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } if (m_spell->m_spellAura) @@ -376,7 +376,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_hitPreventEffectMask |= 1 << effIndex; @@ -387,7 +387,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_hitPreventDefaultEffectMask |= 1 << effIndex; @@ -397,7 +397,7 @@ int32 SpellScript::GetEffectValue() { if (!IsInEffectHook()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName, m_scriptSpellId); + sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return 0; } return m_spell->damage; |
