mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
fix(Core/GridNotifiers): increased visibility for large creatures, part 2 (#2378)
This commit is contained in:
@@ -23,6 +23,8 @@ void VisibleNotifier::Visit(GameObjectMapType &m)
|
||||
{
|
||||
for (GameObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
if (i_largeOnly != iter->GetSource()->IsVisibilityOverridden())
|
||||
continue;
|
||||
vis_guids.erase(iter->GetSource()->GetGUID());
|
||||
i_player.UpdateVisibilityOf(iter->GetSource(), i_data, i_visibleNow);
|
||||
}
|
||||
@@ -35,6 +37,9 @@ void VisibleNotifier::SendToSelf()
|
||||
if (Transport* transport = i_player.GetTransport())
|
||||
for (Transport::PassengerSet::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end();++itr)
|
||||
{
|
||||
if (i_largeOnly != (*itr)->IsVisibilityOverridden())
|
||||
continue;
|
||||
|
||||
if (vis_guids.find((*itr)->GetGUID()) != vis_guids.end())
|
||||
{
|
||||
vis_guids.erase((*itr)->GetGUID());
|
||||
@@ -59,6 +64,9 @@ void VisibleNotifier::SendToSelf()
|
||||
|
||||
for (Player::ClientGUIDs::const_iterator it = vis_guids.begin();it != vis_guids.end(); ++it)
|
||||
{
|
||||
if (i_largeOnly != ObjectAccessor::GetWorldObject(i_player, *it)->IsVisibilityOverridden())
|
||||
continue;
|
||||
|
||||
// pussywizard: static transports are removed only in RemovePlayerFromMap and here if can no longer detect (eg. phase changed)
|
||||
if (IS_TRANSPORT_GUID(*it))
|
||||
if (GameObject* staticTrans = i_player.GetMap()->GetGameObject(*it))
|
||||
@@ -84,7 +92,11 @@ void VisibleNotifier::SendToSelf()
|
||||
i_player.GetSession()->SendPacket(&packet);
|
||||
|
||||
for (std::vector<Unit*>::const_iterator it = i_visibleNow.begin(); it != i_visibleNow.end(); ++it)
|
||||
{
|
||||
if (i_largeOnly != (*it)->IsVisibilityOverridden())
|
||||
continue;
|
||||
i_player.GetInitialVisiblePackets(*it);
|
||||
}
|
||||
}
|
||||
|
||||
void VisibleChangesNotifier::Visit(PlayerMapType &m)
|
||||
|
||||
Reference in New Issue
Block a user