diff options
author | megamage <none@none> | 2009-05-03 21:00:08 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-03 21:00:08 -0500 |
commit | de36c2fde3ea3ef6667c540a696ae9b0c57fcab1 (patch) | |
tree | 45c04134b5554a953d0877a55df1ec99912589ad /src/game/Unit.cpp | |
parent | f17b20e9e77268767e1669c5a17863de95b1e9e7 (diff) |
[7741] Allow pets/charmed NPCs to count master's spell cast conditions in quests. Author: ApoC
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0dcf535c4b5..b7a731aaa12 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8074,10 +8074,9 @@ bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit * Cas Unit *Unit::GetOwner() const { - uint64 ownerid = GetOwnerGUID(); - if(!ownerid) - return NULL; - return ObjectAccessor::GetUnit(*this, ownerid); + if(uint64 ownerid = GetOwnerGUID()) + return ObjectAccessor::GetUnit(*this, ownerid); + return NULL; } Unit *Unit::GetCharmer() const |