From 5a52acbe40c2a455419b43bbfdda82709a1cbe80 Mon Sep 17 00:00:00 2001 From: Trista Date: Mon, 17 Dec 2012 10:39:54 +0200 Subject: Core/Quest: Optimize and clean more last commit * thx to @Gacko and @click for pointing out problems and give suggestiosn * Sorry for the mess, forgot I can make more changes after initial change, this should be final... * https://github.com/TrinityCore/TrinityCore/commit/48141bbfa6887095f5b4a687ca3bde516c751771 --- src/server/scripts/Northrend/sholazar_basin.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index f732497f278..5bf45452d34 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -1016,20 +1016,13 @@ public: if (target == me) return; - if (spell->Id == SPELL_DEVOUR_WIND) + if (spell->Id == SPELL_DEVOUR_WIND && me->GetCharmerOrOwnerPlayerOrPlayerItself()) { - if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself()) - { - me->UpdateEntry(NPC_HAIPHOON_AIR); - } + me->UpdateEntry(NPC_HAIPHOON_AIR); } - - if (spell->Id == SPELL_DEVOUR_WATER) + else if (spell->Id == SPELL_DEVOUR_WATER && me->GetCharmerOrOwnerPlayerOrPlayerItself()) { - if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself()) - { - me->UpdateEntry(NPC_HAIPHOON_WATER); - } + me->UpdateEntry(NPC_HAIPHOON_WATER); } } }; -- cgit v1.2.3