mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
*Fix a crash caused eye of beast.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user