mirror of
https://github.com/mangosfour/server.git
synced 2025-12-30 10:37:12 +00:00
[11206] Move visibility self/around to new function and use it.
* Fixed wrong visibility changes in some cases at .mod phase uses. * Apply phase change to any owned units (not only pets as before). It also will applied in more safe way for avoid unexpected lost owner at update. * Check view point setting auras targets accessability not only at visibility change but also at phase change. * Replace SetVisibility(GetVisibility()) hack like calls.
This commit is contained in:
parent
bef47ce126
commit
f1899e3b27
6 changed files with 64 additions and 50 deletions
|
|
@ -1710,6 +1710,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
// Visibility system
|
||||
UnitVisibility GetVisibility() const { return m_Visibility; }
|
||||
void SetVisibility(UnitVisibility x);
|
||||
void UpdateVisibilityAndView(); // overwrite WorldObject::UpdateVisibilityAndView()
|
||||
|
||||
// common function for visibility checks for player/creatures with detection code
|
||||
bool isVisibleForOrDetect(Unit const* u, WorldObject const* viewPoint, bool detect, bool inVisibleList = false, bool is3dDistance = true) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue