Open Killyana opened 5 years ago
For instances and battlegrounds these visibility distances are most definitely different. In SotA sniffs, when you arrive on boats, I saw objects with Gigantic AOI property (sigils, e.g. 192685) appearing as far away as 1450 yards, maybe even further. NPCs with Large AOI flag (23472, verifiable through CreatureDifficulty dumps Kinzcool posted recently) became visible as far as 1080 yards. One could make some sort of sniff analyzer that would read parsed packets sequentially, keep track of player's position, and record which objects became visible at what distance, which should allow us to reliably figure out the distances for all these different areas of interest.
Yeah, it's not really clear at this point. Who said there may not be a specific distance difference for a specific bg or instances?
Anything here left after https://github.com/TrinityCore/TrinityCore/commit/b0db728c49f0b70d2c4f18270c389e4445161b7f ?
I still don't know how the visibility distance is calculated in instances, maybe unit visibility+200, without being able to test in retail, it's hard to say.
float WorldObject::GetVisibilityRange() const
{
if (IsVisibilityOverridden() && !ToPlayer())
return *m_visibilityDistanceOverride;
else if (IsFarVisible() && !ToPlayer())
return MAX_VISIBILITY_DISTANCE;
else if (GetMap())
return GetMap()->GetVisibilityRange();
return MAX_VISIBILITY_DISTANCE;
}
Return after judgment? Please forgive my english
What do you mean @w5860363
@Kittnz Trying to find out why, because that's what happened last yea https://github.com/TrinityCore/TrinityCore/issues/21351
Checking MoP+ sniffs and videos for visibility stuff is useless, they changed all values and they are no longer valid for 3.3.5 or even Cata. All we need is check distance from instance start to farthest created creature \ object from packets when player entered instance. And ignore creatures \ objects with not default visibility type. This way I checked Sethekk Halls and got 100 yards. Nothing like 170.
SWP - 100 (434), both objects and creatures
Description: The visibility distance calculation is wrong for gobs and creatures.
For this reason we get some weird result like this: https://imgur.com/a/88vi0XA and visibility distance is different from retail.
Visibility range: 100 - (Visibility.Distance.Continents) 170 - (Visibility.Distance.Instances) 533 - (Visibility.Distance.BGArenas)
visibilityDistanceType:
define VISIBILITY_DISTANCE_GIGANTIC 400.0f
define VISIBILITY_DISTANCE_LARGE 200.0f
define VISIBILITY_DISTANCE_NORMAL 100.0f
define VISIBILITY_DISTANCE_SMALL 50.0f
define VISIBILITY_DISTANCE_TINY 25.0f
The visibility distance must be calculated like this for gobs: Final Visibility range = Visibility range + radius of the gob + visibilityDistanceType
*visibilityDistanceType=0 the gob doesn't have any related data
Example: https://woehead.way-of-elendil.fr/?object=194484
This gob has: radius =200 visibility=200 and it' spawned into an instance so default view distance=170
This means final visibility distance= 200+200+170 =570m ( this is confirmed on retail)
For creature the radius could probably be ignored and just use this formula: visibility= visibilityDistanceType + default distance
This also explains the Tiny and small visibility distance used by some gobs.
Branch(es): both
TC rev. hash/commit: rev. 717e050edb73