summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2017-09-19 11:23:07 +0200
committerYehonal <yehonal.azeroth@gmail.com>2017-09-19 11:23:07 +0200
commit944cfd077eced571e3ac5752a377b5a0934b9ee6 (patch)
tree0d4b677783603d2da89b40a84658393488b025c3
parent787a9238df0069ef7fe27f9b714036c97436483a (diff)
Cleaning unused variables
-rw-r--r--src/game/Battlegrounds/BattlegroundMgr.cpp2
-rw-r--r--src/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/game/Handlers/MiscHandler.cpp2
-rw-r--r--src/game/Spells/Auras/SpellAuras.cpp2
-rw-r--r--src/game/Spells/Spell.cpp2
-rw-r--r--src/game/Spells/SpellEffects.cpp2
-rw-r--r--src/scripts/Commands/cs_misc.cpp2
-rw-r--r--src/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp2
-rw-r--r--src/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp2
-rw-r--r--src/scripts/Events/brewfest.cpp4
-rw-r--r--src/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp2
-rw-r--r--src/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp2
-rw-r--r--src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp2
-rw-r--r--src/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp2
-rw-r--r--src/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp2
-rw-r--r--src/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp2
-rw-r--r--src/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp2
-rw-r--r--src/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp2
-rw-r--r--src/scripts/Outland/BlackTemple/illidari_council.cpp2
-rw-r--r--src/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp4
-rw-r--r--src/scripts/Spells/spell_dk.cpp2
-rw-r--r--src/scripts/Spells/spell_druid.cpp2
23 files changed, 25 insertions, 25 deletions
diff --git a/src/game/Battlegrounds/BattlegroundMgr.cpp b/src/game/Battlegrounds/BattlegroundMgr.cpp
index 6b6d1c6368..f2b53bec3a 100644
--- a/src/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/game/Battlegrounds/BattlegroundMgr.cpp
@@ -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)
diff --git a/src/game/Entities/GameObject/GameObject.cpp b/src/game/Entities/GameObject/GameObject.cpp
index 9628a7f10e..735dfefedd 100644
--- a/src/game/Entities/GameObject/GameObject.cpp
+++ b/src/game/Entities/GameObject/GameObject.cpp
@@ -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;
diff --git a/src/game/Entities/Unit/Unit.cpp b/src/game/Entities/Unit/Unit.cpp
index 16713f49b1..232b24bd2a 100644
--- a/src/game/Entities/Unit/Unit.cpp
+++ b/src/game/Entities/Unit/Unit.cpp
@@ -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);
diff --git a/src/game/Handlers/MiscHandler.cpp b/src/game/Handlers/MiscHandler.cpp
index 35654dc9a3..b8b4acb409 100644
--- a/src/game/Handlers/MiscHandler.cpp
+++ b/src/game/Handlers/MiscHandler.cpp
@@ -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;
diff --git a/src/game/Spells/Auras/SpellAuras.cpp b/src/game/Spells/Auras/SpellAuras.cpp
index 2f051092ad..d1736893f3 100644
--- a/src/game/Spells/Auras/SpellAuras.cpp
+++ b/src/game/Spells/Auras/SpellAuras.cpp
@@ -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);
diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp
index e7d4042ddc..ac6ee95d6f 100644
--- a/src/game/Spells/Spell.cpp
+++ b/src/game/Spells/Spell.cpp
@@ -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
diff --git a/src/game/Spells/SpellEffects.cpp b/src/game/Spells/SpellEffects.cpp
index b244eb5a8e..547a713c4d 100644
--- a/src/game/Spells/SpellEffects.cpp
+++ b/src/game/Spells/SpellEffects.cpp
@@ -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;
diff --git a/src/scripts/Commands/cs_misc.cpp b/src/scripts/Commands/cs_misc.cpp
index 4bf648e95f..f7eb61d7d8 100644
--- a/src/scripts/Commands/cs_misc.cpp
+++ b/src/scripts/Commands/cs_misc.cpp
@@ -445,7 +445,7 @@ public:
if (status)
handler->PSendSysMessage(LANG_LIQUID_STATUS, liquidStatus.level, liquidStatus.depth_level, liquidStatus.entry, liquidStatus.type_flags, status);
- if (Transport* t = object->GetTransport())
+ if (object->GetTransport())
handler->PSendSysMessage("Transport offset: %.2f, %.2f, %.2f, %.2f", object->m_movementInfo.transport.pos.GetPositionX(), object->m_movementInfo.transport.pos.GetPositionY(), object->m_movementInfo.transport.pos.GetPositionZ(), object->m_movementInfo.transport.pos.GetOrientation());
return true;
diff --git a/src/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
index 843aca5bd4..d87fe137be 100644
--- a/src/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
+++ b/src/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
@@ -165,7 +165,7 @@ public:
// pussywizard:
bool reset = true;
if (instance)
- if (Creature* nefarian = instance->instance->GetCreature(instance->GetData64(DATA_NEFARIAN)))
+ if (/*Creature* nefarian = */instance->instance->GetCreature(instance->GetData64(DATA_NEFARIAN)))
reset = false;
if (reset)
_Reset();
diff --git a/src/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
index 94f38b653e..4c4b17e316 100644
--- a/src/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
+++ b/src/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
@@ -323,7 +323,7 @@ public:
spawnPos.m_positionX += 5.0f*cos(4.5f);
spawnPos.m_positionY += 5.0f*sin(4.5f);
for (uint8 i=0; i<5; ++i)
- if (Creature* s = me->SummonCreature(NPC_SCOURGE_ZOMBIE, spawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000))
+ if (me->SummonCreature(NPC_SCOURGE_ZOMBIE, spawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000))
{
spawnPos.m_positionX += 2.5f*cos(4.5f);
spawnPos.m_positionY += 2.5f*sin(4.5f);
diff --git a/src/scripts/Events/brewfest.cpp b/src/scripts/Events/brewfest.cpp
index 4e16b4e75c..18c109ea9a 100644
--- a/src/scripts/Events/brewfest.cpp
+++ b/src/scripts/Events/brewfest.cpp
@@ -1186,7 +1186,7 @@ public:
}
// Check if exhausted
- if (Aura* exh = caster->GetAura(SPELL_RAM_EXHAUSTED))
+ if (caster->GetAura(SPELL_RAM_EXHAUSTED))
{
if (privateLevel)
{
@@ -1397,7 +1397,7 @@ public:
SpellCastResult CheckTarget()
{
if (Unit* caster = GetCaster())
- if (Player* pCaster = caster->ToPlayer())
+ if (caster->ToPlayer())
if (Unit* target = caster->ToPlayer()->GetSelectedUnit())
if (target->GetEntry() == 23487 && target->IsAlive())
return SPELL_CAST_OK;
diff --git a/src/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
index 45ad63d27f..5ac0d97fb1 100644
--- a/src/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
+++ b/src/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
@@ -281,7 +281,7 @@ public:
Events.ScheduleEvent(EVENT_SUMMON_KEEPER, 6000);
Events.SetPhase(0);
- if (Creature* medivh = instance->GetCreature(_medivhGUID))
+ if (instance->GetCreature(_medivhGUID))
{
uint8 position = (_currentRift-1)%4;
instance->SummonCreature(NPC_TIME_RIFT, PortalLocation[position]);
diff --git a/src/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index ea85e7f7f4..a9204522c4 100644
--- a/src/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -1080,7 +1080,7 @@ class spell_halion_clear_debuffs : public SpellScriptLoader
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
- if (Unit* target = GetHitUnit())
+ if (GetHitUnit())
{
GetHitUnit()->RemoveAurasDueToSpell(GetSpellInfo()->Effects[EFFECT_0].CalcValue());
GetHitUnit()->RemoveAurasDueToSpell(GetSpellInfo()->Effects[EFFECT_1].CalcValue());
diff --git a/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index 34604b7cb8..733ab51a15 100644
--- a/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -1810,7 +1810,7 @@ public:
events.RepeatEvent(5000);
break;
case EVENT_SPELL_STRANGULATE:
- if( Unit* target = SelectEnemyCaster(false, 30.0f) )
+ if(SelectEnemyCaster(false, 30.0f))
{
me->CastSpell(me->GetVictim(), SPELL_STRANGULATE, false);
events.RepeatEvent(120000);
diff --git a/src/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 4e4ab4be61..91d95c64ec 100644
--- a/src/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -1871,7 +1871,7 @@ public:
events.ScheduleEvent(2, 4500);
break;
case 3:
- if (Unit* target = SelectTargetFromPlayerList(30.0f, 0, true))
+ if (SelectTargetFromPlayerList(30.0f, 0, true))
me->CastSpell(me->GetVictim(), 70145, false);
events.ScheduleEvent(3, 9000);
break;
diff --git a/src/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 9d60cbdb73..2a46155b29 100644
--- a/src/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -571,7 +571,7 @@ class boss_lady_deathwhisper : public CreatureScript
// helper for summoning wave mobs
void Summon(uint32 entry, const Position& pos)
{
- if (TempSummon* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
+ if (me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
if (TempSummon* trigger = me->SummonCreature(WORLD_TRIGGER, pos, TEMPSUMMON_TIMED_DESPAWN, 2000))
{
trigger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
index 526ef0b4c5..0777a07cd7 100644
--- a/src/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
+++ b/src/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
@@ -150,7 +150,7 @@ public:
if (GameObject* go = instance->GetGameObject(GO_ExitPortalGUID))
go->SetPhaseMask(1, true);
if (Creature* c = instance->GetCreature(NPC_MalygosGUID))
- if (Creature* alexstrasza = c->SummonCreature(NPC_ALEXSTRASZA, 798.0f, 1268.0f, 299.0f, 2.45f ,TEMPSUMMON_TIMED_DESPAWN, 604800000))
+ if (c->SummonCreature(NPC_ALEXSTRASZA, 798.0f, 1268.0f, 299.0f, 2.45f ,TEMPSUMMON_TIMED_DESPAWN, 604800000))
break;
}
if (data == DONE)
diff --git a/src/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp b/src/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp
index e0d197bfcf..70f7887af2 100644
--- a/src/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp
+++ b/src/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp
@@ -455,7 +455,7 @@ public:
}
case EVENT_ABEDNEUM_HEAD: // Third
{
- if (Creature *abedneum = GetAbedneum())
+ if (GetAbedneum())
{
Player *plr = SelectTargetFromPlayerList(100.0f);
if (!plr)
diff --git a/src/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 4e3c970ccb..b758cbe3e4 100644
--- a/src/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -550,7 +550,7 @@ public:
events.ScheduleEvent(EVENT_ELEVATOR_INTERVAL_1, 6000);
break;
case EVENT_ELEVATOR_INTERVAL_1:
- if( Creature* VX001 = me->SummonCreature(NPC_VX001, 2744.65f, 2569.46f, 364.40f, 3.14f, TEMPSUMMON_MANUAL_DESPAWN) )
+ if(me->SummonCreature(NPC_VX001, 2744.65f, 2569.46f, 364.40f, 3.14f, TEMPSUMMON_MANUAL_DESPAWN))
{
if( GameObject *elevator = me->FindNearestGameObject(GO_MIMIRON_ELEVATOR, 100.0f) )
{
diff --git a/src/scripts/Outland/BlackTemple/illidari_council.cpp b/src/scripts/Outland/BlackTemple/illidari_council.cpp
index fecb6f28df..714d8b8945 100644
--- a/src/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -413,7 +413,7 @@ class boss_high_nethermancer_zerevor : public CreatureScript
events.ScheduleEvent(EVENT_SPELL_BLIZZARD, 40000);
break;
case EVENT_SPELL_ARCANE_EXPLOSION:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 10.0f))
+ if (SelectTarget(SELECT_TARGET_RANDOM, 0, 10.0f))
me->CastSpell(me, SPELL_ARCANE_EXPLOSION, false);
events.ScheduleEvent(EVENT_SPELL_ARCANE_EXPLOSION, 10000);
break;
diff --git a/src/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp
index 44be4f14b0..90ea14d659 100644
--- a/src/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp
+++ b/src/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp
@@ -324,7 +324,7 @@ public:
return true;
if (!pPlayer->HasItemCount(ITEM_MAGMA_TOTEM))
return true;
- if (Creature* c = pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
+ if (pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
return true;
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Disturb the stone and summon Lord Ahune.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1337);
@@ -340,7 +340,7 @@ public:
return true;
if (!pPlayer->HasItemCount(ITEM_MAGMA_TOTEM))
return true;
- if (Creature* c = pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
+ if (pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
return true;
if (Creature* c = pGO->SummonCreature(NPC_AHUNE, AhuneSummonPos, TEMPSUMMON_MANUAL_DESPAWN))
diff --git a/src/scripts/Spells/spell_dk.cpp b/src/scripts/Spells/spell_dk.cpp
index ee419992fa..fbbbbbe15a 100644
--- a/src/scripts/Spells/spell_dk.cpp
+++ b/src/scripts/Spells/spell_dk.cpp
@@ -937,7 +937,7 @@ class spell_dk_pet_scaling : public SpellScriptLoader
int32 modifier = 33;
// xinef: impurity
- if (AuraEffect const* impurityEff = owner->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986, 0))
+ if (owner->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986, 0))
modifier = 40;
amount = CalculatePct(std::max<int32>(0, owner->GetTotalAttackPowerValue(BASE_ATTACK)), modifier);
diff --git a/src/scripts/Spells/spell_druid.cpp b/src/scripts/Spells/spell_druid.cpp
index bb2f97d940..cea3cdf484 100644
--- a/src/scripts/Spells/spell_druid.cpp
+++ b/src/scripts/Spells/spell_druid.cpp
@@ -624,7 +624,7 @@ class spell_dru_lifebloom : public SpellScriptLoader
{
if (Unit* target = GetUnitOwner())
{
- if (AuraEffect const* aurEff = GetEffect(EFFECT_1))
+ if (GetEffect(EFFECT_1))
{
Unit* caster = GetCaster();
int32 healAmount = GetSpellInfo()->Effects[EFFECT_1].CalcValue(caster ? caster : target, 0, target) * dispelInfo->GetRemovedCharges();