Core/Maps: Adjusted WorldObject::GetGridActivationRange() to never be less than map visibility distance for active objects to ensure equal ranges for activation/deactivation of grids

Port From (https://github.com/TrinityCore/TrinityCore/commit/48cc6f384d2b3ca8f1b1ddcfad70678730573449)
This commit is contained in:
hondacrx
2019-08-15 12:07:22 -04:00
parent f79b8c5885
commit c2dc1c337f
2 changed files with 10 additions and 21 deletions
+2 -7
View File
@@ -647,15 +647,10 @@ namespace Game.Maps
VisitNearbyCellsOf(player, grid_object_update, world_object_update);
// If player is using far sight, visit that object too
// If player is using far sight or mind vision, visit that object too
WorldObject viewPoint = player.GetViewpoint();
if (viewPoint)
{
if (viewPoint.IsTypeId(TypeId.Unit))
VisitNearbyCellsOf(viewPoint.ToCreature(), grid_object_update, world_object_update);
else if (viewPoint.IsTypeId(TypeId.DynamicObject))
VisitNearbyCellsOf(viewPoint.ToDynamicObject(), grid_object_update, world_object_update);
}
VisitNearbyCellsOf(viewPoint, grid_object_update, world_object_update);
// Handle updates for creatures in combat with player and are more than 60 yards away
if (player.IsInCombat())