aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-21 16:23:18 -0600
committermegamage <none@none>2008-12-21 16:23:18 -0600
commitfb0d8e77a15692d10ca249fab219e88f42e0c6dc (patch)
treef7db7305e1c97f6224e7111f780f3aa3ace328dd
parentca2b3b3d15ac1613d009248b28a126b48ea6b11b (diff)
*Fix the bug that stealth players cannot see self.
--HG-- branch : trunk
-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 e956557ff2a..ec0380f206b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9981,7 +9981,8 @@ void Unit::SetVisibility(UnitVisibility x)
Trinity::UnitListSearcher<Trinity::AnyUnitInObjectRangeCheck> searcher(targets, check);
VisitNearbyWorldObject(World::GetMaxVisibleDistance(), searcher);
for(std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
- if((*iter)->GetTypeId() == TYPEID_PLAYER)
+ if(*iter != this && (*iter)->GetTypeId() == TYPEID_PLAYER
+ && ((Player*)(*iter))->HaveAtClient(this))
{
DestroyForPlayer((Player*)(*iter));
((Player*)(*iter))->m_clientGUIDs.erase(GetGUID());