diff options
| author | megamage <none@none> | 2009-03-20 14:38:53 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-20 14:38:53 -0600 |
| commit | f3a543bef3690dae643653ff97120db17ba13d34 (patch) | |
| tree | 528df51a75e0c38c1e3002107adeed598005b9c7 /src/game/Unit.cpp | |
| parent | 4776c384aa7f13ba094e361082db234ec35bfaae (diff) | |
*Do not delete charminfo for guardian.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 77f0a0eb4c3..94baed9e8d3 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13228,7 +13228,7 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess) } // Pets already have a properly initialized CharmInfo, don't overwrite it. - if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT && !((Creature*)this)->isPet()) + if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT && !((Creature*)this)->HasSummonMask(SUMMON_MASK_GUARDIAN)) { CharmInfo *charmInfo = InitCharmInfo(); if(possess) @@ -13347,9 +13347,9 @@ void Unit::RemoveCharmedOrPossessedBy(Unit *charmer) } } - if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT && !((Creature*)this)->isPet()) + //a guardian should always have charminfo + if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT && !((Creature*)this)->HasSummonMask(SUMMON_MASK_GUARDIAN)) { - //TODO: this will cause crash when a guardian is charmed DeleteCharmInfo(); } |
