aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-19 13:08:14 -0600
committermegamage <none@none>2009-02-19 13:08:14 -0600
commit1ab0521ebffbfaa55270a1c1b76896a2fc75100e (patch)
tree7d46a6e8fdbd881bf3bb701ead807fc24776b0d1 /src
parent0a0992506128f285df506a8170ba6158c31ef51b (diff)
*Fix a crash caused eye of beast.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 9ed77d70cb2..dea16ec8f35 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8451,7 +8451,8 @@ void Unit::SetCharm(Unit* pet)
void Unit::AddPlayerToVision(Player* plr)
{
- if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT)
+ if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT
+ && !((Creature*)this)->isPet())
{
setActive(true);
GetMap()->SwitchGridContainers((Creature*)this, true);
@@ -8463,7 +8464,8 @@ void Unit::AddPlayerToVision(Player* plr)
void Unit::RemovePlayerFromVision(Player* plr)
{
m_sharedVision.remove(plr);
- if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT)
+ if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT
+ && !((Creature*)this)->isPet())
{
setActive(false);
GetMap()->SwitchGridContainers((Creature*)this, false);