fix(Core/GridNotifiers): increased visibility for large creatures, part 2 (#2378)

This commit is contained in:
Stoabrogga
2019-11-14 08:04:41 +01:00
committed by GitHub
parent 23b77c1303
commit fae7ae95a3
6 changed files with 37 additions and 13 deletions

View File

@@ -23040,9 +23040,12 @@ void Player::UpdateObjectVisibility(bool forced, bool fromUpdate)
void Player::UpdateVisibilityForPlayer(bool mapChange)
{
Trinity::VisibleNotifier notifier(*this, mapChange);
m_seer->VisitNearbyObject(GetSightRange()+VISIBILITY_INC_FOR_GOBJECTS, notifier);
notifier.SendToSelf();
Trinity::VisibleNotifier notifierNoLarge(*this, mapChange, false); // visit only objects which are not large; default distance
m_seer->VisitNearbyObject(GetSightRange()+VISIBILITY_INC_FOR_GOBJECTS, notifierNoLarge);
notifierNoLarge.SendToSelf();
Trinity::VisibleNotifier notifierLarge(*this, mapChange, true); // visit only large objects; maximum distance
m_seer->VisitNearbyObject(MAX_VISIBILITY_DISTANCE, notifierLarge);
notifierLarge.SendToSelf();
if (mapChange)
m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f);