diff options
author | Spp <none@none> | 2010-08-21 21:14:35 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-08-21 21:14:35 +0200 |
commit | c15c605a114179a8b39500b5ef1717c791f60d4f (patch) | |
tree | 39471ba95b8d42ea561e7aa123be522ad4748d69 /src | |
parent | e7856a831cad86e9f129db822f0693bd8caa37a7 (diff) |
Core: Remove "unused variable 'xxx'" warnings
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 11 | ||||
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 14 | ||||
-rw-r--r-- | src/server/game/Maps/Map.cpp | 1 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 1 | ||||
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 4 |
5 files changed, 10 insertions, 21 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index de1bc8788ff..9fcf5339522 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1861,9 +1861,8 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati // The player was ported to another map and looses the duel immediately. // We have to perform this check before the teleport, otherwise the // ObjectAccessor won't find the flag. - if (duel && GetMapId() != mapid) - if (GameObject* obj = GetMap()->GetGameObject(GetUInt64Value(PLAYER_DUEL_ARBITER))) - DuelComplete(DUEL_FLED); + if (duel && GetMapId() != mapid && GetMap()->GetGameObject(GetUInt64Value(PLAYER_DUEL_ARBITER))) + DuelComplete(DUEL_FLED); if (GetMapId() == mapid && !m_transport) { @@ -15022,7 +15021,7 @@ bool Player::CanShareQuest(uint32 quest_id) const void Player::SetQuestStatus(uint32 quest_id, QuestStatus status) { - if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id)) + if (sObjectMgr.GetQuestTemplate(quest_id)) { QuestStatusData& q_status = mQuestStatus[quest_id]; @@ -17499,10 +17498,6 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report return false; } - bool isNormalTargetMap = mapEntry->IsRaid() - ? (GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL) - : (GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL); - uint32 missingQuest = 0; if (GetTeam() == ALLIANCE && ar->quest_A && !GetQuestRewardStatus(ar->quest_A)) missingQuest = ar->quest_A; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 470deccbccc..2d349b770e7 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2264,7 +2264,7 @@ void Unit::CalcHealAbsorb(Unit *pVictim, const SpellEntry *healSpell, uint32 &he int32 RemainingHeal = healAmount; // Get unit state (need for some absorb check) - uint32 unitflag = pVictim->GetUInt32Value(UNIT_FIELD_FLAGS); + //uint32 unitflag = pVictim->GetUInt32Value(UNIT_FIELD_FLAGS); // Need remove expired auras after bool existExpired = false; @@ -2275,7 +2275,7 @@ void Unit::CalcHealAbsorb(Unit *pVictim, const SpellEntry *healSpell, uint32 &he if (!((*i)->GetMiscValue() & healSpell->SchoolMask)) continue; - SpellEntry const* spellProto = (*i)->GetSpellProto(); + //SpellEntry const* spellProto = (*i)->GetSpellProto(); // Max Amount can be absorbed by this aura int32 currentAbsorb = (*i)->GetAmount(); @@ -6839,7 +6839,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger if (beaconTarget == this) return false; // check if it was heal by paladin which casted this beacon of light - if (Aura const * aura = beaconTarget->GetAura(53563, pVictim->GetGUID())) + if (beaconTarget->GetAura(53563, pVictim->GetGUID())) { if (beaconTarget->IsWithinLOSInMap(pVictim)) { @@ -10736,7 +10736,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM // Lava Burst if (spellProto->SpellFamilyFlags[1] & 0x00001000) { - if (AuraEffect const* flameShock = pVictim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 0x10000000, 0,0, GetGUID())) + if (pVictim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 0x10000000, 0,0, GetGUID())) return true; break; } @@ -11282,7 +11282,7 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con { SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) - if (itr->type == spellInfo->EffectMechanic[index]) + if (itr->type == mechanic) return true; } @@ -11688,9 +11688,9 @@ void Unit::Mount(uint32 mount, uint32 VehicleId) this->ToPlayer()->UnsummonPetTemporaryIfAny(); } - if (VehicleId !=0) + if (VehicleId != 0) { - if (VehicleEntry const *ve = sVehicleStore.LookupEntry(VehicleId)) + if (sVehicleStore.LookupEntry(VehicleId)) { if (CreateVehicleKit(VehicleId)) diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 824717453da..8b955782b7f 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2277,7 +2277,6 @@ bool InstanceMap::CanEnter(Player *player) // permanent save in the same instance id PlayerList const &playerList = GetPlayers(); - Player *firstInsidePlayer = NULL; if (!playerList.isEmpty()) for (PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 812576a5493..5b199560db0 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5358,7 +5358,6 @@ SpellCastResult Spell::CheckCast(bool strict) m_spellInfo->EffectImplicitTargetA[i] != TARGET_GAMEOBJECT_ITEM) break; - uint32 spellId = m_spellInfo->Id; if (m_caster->GetTypeId() != TYPEID_PLAYER // only players can open locks, gather etc. // we need a go target in case of TARGET_GAMEOBJECT || m_spellInfo->EffectImplicitTargetA[i] == TARGET_GAMEOBJECT && !m_targets.getGOTarget()) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index d959f2f0136..4f7ad15230d 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1964,10 +1964,6 @@ void SpellMgr::LoadSpellLearnSkills() else dbc_node.value = dbc_node.step * 75; dbc_node.maxvalue = dbc_node.step * 75; - - // FIXME: db_node not used... remove it? - SpellLearnSkillNode const* db_node = GetSpellLearnSkill(spell); - mSpellLearnSkills[spell] = dbc_node; ++dbc_count; break; |