Core: Remove "unused variable 'xxx'" warnings

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-21 21:14:35 +02:00
parent e7856a831c
commit c15c605a11
5 changed files with 10 additions and 21 deletions
+2 -7
View File
@@ -1861,8 +1861,7 @@ 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. // The player was ported to another map and looses the duel immediately.
// We have to perform this check before the teleport, otherwise the // We have to perform this check before the teleport, otherwise the
// ObjectAccessor won't find the flag. // ObjectAccessor won't find the flag.
if (duel && GetMapId() != mapid) if (duel && GetMapId() != mapid && GetMap()->GetGameObject(GetUInt64Value(PLAYER_DUEL_ARBITER)))
if (GameObject* obj = GetMap()->GetGameObject(GetUInt64Value(PLAYER_DUEL_ARBITER)))
DuelComplete(DUEL_FLED); DuelComplete(DUEL_FLED);
if (GetMapId() == mapid && !m_transport) if (GetMapId() == mapid && !m_transport)
@@ -15022,7 +15021,7 @@ bool Player::CanShareQuest(uint32 quest_id) const
void Player::SetQuestStatus(uint32 quest_id, QuestStatus status) 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]; QuestStatusData& q_status = mQuestStatus[quest_id];
@@ -17499,10 +17498,6 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
return false; return false;
} }
bool isNormalTargetMap = mapEntry->IsRaid()
? (GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
: (GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
uint32 missingQuest = 0; uint32 missingQuest = 0;
if (GetTeam() == ALLIANCE && ar->quest_A && !GetQuestRewardStatus(ar->quest_A)) if (GetTeam() == ALLIANCE && ar->quest_A && !GetQuestRewardStatus(ar->quest_A))
missingQuest = ar->quest_A; missingQuest = ar->quest_A;
+6 -6
View File
@@ -2264,7 +2264,7 @@ void Unit::CalcHealAbsorb(Unit *pVictim, const SpellEntry *healSpell, uint32 &he
int32 RemainingHeal = healAmount; int32 RemainingHeal = healAmount;
// Get unit state (need for some absorb check) // 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 // Need remove expired auras after
bool existExpired = false; bool existExpired = false;
@@ -2275,7 +2275,7 @@ void Unit::CalcHealAbsorb(Unit *pVictim, const SpellEntry *healSpell, uint32 &he
if (!((*i)->GetMiscValue() & healSpell->SchoolMask)) if (!((*i)->GetMiscValue() & healSpell->SchoolMask))
continue; continue;
SpellEntry const* spellProto = (*i)->GetSpellProto(); //SpellEntry const* spellProto = (*i)->GetSpellProto();
// Max Amount can be absorbed by this aura // Max Amount can be absorbed by this aura
int32 currentAbsorb = (*i)->GetAmount(); int32 currentAbsorb = (*i)->GetAmount();
@@ -6839,7 +6839,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (beaconTarget == this) if (beaconTarget == this)
return false; return false;
// check if it was heal by paladin which casted this beacon of light // 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)) if (beaconTarget->IsWithinLOSInMap(pVictim))
{ {
@@ -10736,7 +10736,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
// Lava Burst // Lava Burst
if (spellProto->SpellFamilyFlags[1] & 0x00001000) 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; return true;
break; break;
} }
@@ -11282,7 +11282,7 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con
{ {
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
if (itr->type == spellInfo->EffectMechanic[index]) if (itr->type == mechanic)
return true; return true;
} }
@@ -11690,7 +11690,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId)
if (VehicleId != 0) if (VehicleId != 0)
{ {
if (VehicleEntry const *ve = sVehicleStore.LookupEntry(VehicleId)) if (sVehicleStore.LookupEntry(VehicleId))
{ {
if (CreateVehicleKit(VehicleId)) if (CreateVehicleKit(VehicleId))
-1
View File
@@ -2277,7 +2277,6 @@ bool InstanceMap::CanEnter(Player *player)
// permanent save in the same instance id // permanent save in the same instance id
PlayerList const &playerList = GetPlayers(); PlayerList const &playerList = GetPlayers();
Player *firstInsidePlayer = NULL;
if (!playerList.isEmpty()) if (!playerList.isEmpty())
for (PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i) for (PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i)
-1
View File
@@ -5358,7 +5358,6 @@ SpellCastResult Spell::CheckCast(bool strict)
m_spellInfo->EffectImplicitTargetA[i] != TARGET_GAMEOBJECT_ITEM) m_spellInfo->EffectImplicitTargetA[i] != TARGET_GAMEOBJECT_ITEM)
break; break;
uint32 spellId = m_spellInfo->Id;
if (m_caster->GetTypeId() != TYPEID_PLAYER // only players can open locks, gather etc. if (m_caster->GetTypeId() != TYPEID_PLAYER // only players can open locks, gather etc.
// we need a go target in case of TARGET_GAMEOBJECT // we need a go target in case of TARGET_GAMEOBJECT
|| m_spellInfo->EffectImplicitTargetA[i] == TARGET_GAMEOBJECT && !m_targets.getGOTarget()) || m_spellInfo->EffectImplicitTargetA[i] == TARGET_GAMEOBJECT && !m_targets.getGOTarget())
-4
View File
@@ -1964,10 +1964,6 @@ void SpellMgr::LoadSpellLearnSkills()
else else
dbc_node.value = dbc_node.step * 75; dbc_node.value = dbc_node.step * 75;
dbc_node.maxvalue = 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; mSpellLearnSkills[spell] = dbc_node;
++dbc_count; ++dbc_count;
break; break;