Cleaning unused variables

This commit is contained in:
Yehonal
2017-09-19 11:23:07 +02:00
parent 787a9238df
commit 944cfd077e
23 changed files with 25 additions and 25 deletions

View File

@@ -734,7 +734,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid
*data << uint32(0); // number of bg instances
if (Battleground* bgt = GetBattlegroundTemplate(bgTypeId))
if (PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgt->GetMapId(), player->getLevel()))
if (GetBattlegroundBracketByLevel(bgt->GetMapId(), player->getLevel()))
{
uint32 count = 0;
/*for (BattlegroundClientIdsContainer::const_iterator itr = clientIds.begin(); itr != clientIds.end(); ++itr)

View File

@@ -347,7 +347,7 @@ void GameObject::Update(uint32 diff)
// Bombs
if (goInfo->trap.type == 2)
m_cooldownTime = World::GetGameTimeMS()+10*IN_MILLISECONDS; // Hardcoded tooltip value
else if (Unit* owner = GetOwner())
else if (GetOwner())
m_cooldownTime = World::GetGameTimeMS()+goInfo->trap.startDelay*IN_MILLISECONDS;
m_lootState = GO_READY;

View File

@@ -8835,7 +8835,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
if (!roll_chance_i(aurEff->GetAmount()))
{
// Xinef: dont allow normal proc to override set one
if (Aura* aura = GetAura((trigger_spell_id == 46916) ? 71072 : 71069))
if (GetAura((trigger_spell_id == 46916) ? 71072 : 71069))
return false;
// Xinef: just to be sure
RemoveAurasDueToSpell(70849);

View File

@@ -1927,7 +1927,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recv_data*/)
if (_player->IsInFlight())
return;
if(Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
if(/*Battlefield* bf = */sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
{
// bf->PlayerAskToLeave(_player); FIXME
return;

View File

@@ -1362,7 +1362,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
if (GetSpellInfo()->SpellFamilyFlags[0] & 0x10 && GetEffect(0))
{
// Druid T8 Restoration 4P Bonus
if (AuraEffect const * aurEff = caster->GetAuraEffectDummy(64760))
if (caster->GetAuraEffectDummy(64760))
{
uint32 damage = GetEffect(0)->GetAmount();
damage = target->SpellHealingBonusTaken(caster, GetSpellInfo(), damage, DOT);

View File

@@ -3948,7 +3948,7 @@ void Spell::_handle_finish_phase()
m_caster->HandleProcExtraAttackFor(m_caster->GetVictim());
if (!IsAutoRepeat() && !IsNextMeleeSwingSpell())
if (Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself())
if (m_caster->GetCharmerOrOwnerPlayerOrPlayerItself())
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
// Xinef: Properly clear infinite cooldowns in some cases

View File

@@ -640,7 +640,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
{
uint8 level = m_caster->getLevel();
uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 29.5f), uint32(float(level) * 34.5f));
if (AuraEffect *aurEff = m_caster->GetAuraEffect(64882, EFFECT_0))
if (m_caster->GetAuraEffect(64882, EFFECT_0))
block_value += 225;
damage += CalculatePct(block_value, m_spellInfo->Effects[EFFECT_1].CalcValue());
break;