aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-25 23:21:10 -0500
committermegamage <none@none>2009-05-25 23:21:10 -0500
commit65a47c4a6b71ae87d43da2d2f2c7fc8b9243b808 (patch)
tree287829b64aa7e60bd08df959b38dd92b319cd9fb /src/game/Unit.cpp
parentd971d0121fafd23504bdfb151dffd0e33b1d7940 (diff)
*Do not destroy unit for owner when it stealth
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index dc0dfb7d102..18cfd1f3424 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10365,7 +10365,8 @@ void Unit::DestroyForNearbyPlayers()
VisitNearbyWorldObject(World::GetMaxVisibleDistance(), searcher);
for(std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
if(*iter != this && (*iter)->GetTypeId() == TYPEID_PLAYER
- && ((Player*)(*iter))->HaveAtClient(this))
+ && ((Player*)(*iter))->HaveAtClient(this)
+ && GetCharmerGUID() != (*iter)->GetGUID()) // TODO: this is for puppet
{
DestroyForPlayer((Player*)(*iter));
((Player*)(*iter))->m_clientGUIDs.erase(GetGUID());