Core/Auras: If the creature whose model is used for SPELL_AURA_TRANSFORM is a trigger, apply trigger model rules to the creature as well
This commit is contained in:
@@ -21157,19 +21157,23 @@ void Player::UpdateTriggerVisibility()
|
||||
if (m_clientGUIDs.empty())
|
||||
return;
|
||||
|
||||
if (!IsInWorld())
|
||||
return;
|
||||
|
||||
UpdateData udata;
|
||||
WorldPacket packet;
|
||||
for (ClientGUIDs::iterator itr=m_clientGUIDs.begin(); itr != m_clientGUIDs.end(); ++itr)
|
||||
for (ClientGUIDs::iterator itr = m_clientGUIDs.begin(); itr != m_clientGUIDs.end(); ++itr)
|
||||
{
|
||||
if (IS_CREATURE_GUID(*itr))
|
||||
{
|
||||
Creature *obj = IsInWorld() ? GetMap()->GetCreature(*itr) : NULL;
|
||||
if (!obj || !obj->isTrigger())
|
||||
Creature *obj = GetMap()->GetCreature(*itr);
|
||||
if (!obj || !(obj->isTrigger() || obj->HasAuraType(SPELL_AURA_TRANSFORM))) // can transform into triggers
|
||||
continue;
|
||||
|
||||
obj->BuildCreateUpdateBlockForPlayer(&udata, this);
|
||||
}
|
||||
}
|
||||
|
||||
udata.BuildPacket(&packet);
|
||||
GetSession()->SendPacket(&packet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user