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
This commit is contained in:
Trista committed 2012-12-17 10:39:54 +02:00
1 parent aa40ddd603
commit 5a52acbe40
1 file changed
+4 -11
@@ -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);
}
}
};