From 9eb01d63bd4cd3c2c297db4bcf1899debba0ee49 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sun, 18 Aug 2013 13:54:20 +0200 Subject: Core: Fix warnings --- src/server/game/Spells/Spell.cpp | 6 +++--- src/server/scripts/Spells/spell_hunter.cpp | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index be88179b168..539b38bdac4 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3052,12 +3052,12 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered if (Player* player = m_caster->ToPlayer()) { - if (!m_caster->ToPlayer()->GetCommandStatus(CHEAT_CASTTIME)) + if (!player->GetCommandStatus(CHEAT_CASTTIME)) { - m_caster->ToPlayer()->SetSpellModTakingSpell(this, true); + player->SetSpellModTakingSpell(this, true); // calculate cast time (calculated after first CheckCast check to prevent charge counting for first CheckCast fail) m_casttime = m_spellInfo->CalcCastTime(this); - m_caster->ToPlayer()->SetSpellModTakingSpell(this, false); + player->SetSpellModTakingSpell(this, false); } else m_casttime = 0; // Set cast time to 0 if .cheat casttime is enabled. diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index b8f29f276ae..b93efe3b0f2 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -149,7 +149,6 @@ class spell_hun_ascpect_of_the_viper : public SpellScriptLoader void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { // Hunter T7 4P Bonus - Unit* target = GetTarget(); if (GetTarget()->HasAura(SPELL_HUNTER_VIPER_ATTACK_SPEED)) GetTarget()->RemoveAurasDueToSpell(SPELL_HUNTER_VICIOUS_VIPER); } -- cgit v1.2.3