*Fix a crash caused eye of beast.
--HG-- branch : trunk
This commit is contained in:
+4
-2
@@ -8451,7 +8451,8 @@ void Unit::SetCharm(Unit* pet)
|
|||||||
|
|
||||||
void Unit::AddPlayerToVision(Player* plr)
|
void Unit::AddPlayerToVision(Player* plr)
|
||||||
{
|
{
|
||||||
if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT)
|
if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT
|
||||||
|
&& !((Creature*)this)->isPet())
|
||||||
{
|
{
|
||||||
setActive(true);
|
setActive(true);
|
||||||
GetMap()->SwitchGridContainers((Creature*)this, true);
|
GetMap()->SwitchGridContainers((Creature*)this, true);
|
||||||
@@ -8463,7 +8464,8 @@ void Unit::AddPlayerToVision(Player* plr)
|
|||||||
void Unit::RemovePlayerFromVision(Player* plr)
|
void Unit::RemovePlayerFromVision(Player* plr)
|
||||||
{
|
{
|
||||||
m_sharedVision.remove(plr);
|
m_sharedVision.remove(plr);
|
||||||
if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT)
|
if (m_sharedVision.empty() && GetTypeId() == TYPEID_UNIT
|
||||||
|
&& !((Creature*)this)->isPet())
|
||||||
{
|
{
|
||||||
setActive(false);
|
setActive(false);
|
||||||
GetMap()->SwitchGridContainers((Creature*)this, false);
|
GetMap()->SwitchGridContainers((Creature*)this, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user