aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.h')
-rw-r--r--src/game/Unit.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 2482648180e..c113587a5ff 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -437,8 +437,8 @@ enum UnitVisibility
VISIBILITY_OFF = 0, // absolute, not detectable, GM-like, can see all other
VISIBILITY_ON = 1,
VISIBILITY_GROUP_STEALTH = 2, // detect chance, seen and can see group members
- VISIBILITY_GROUP_INVISIBILITY = 3, // invisibility, can see and can be seen only another invisible unit or invisible detection unit, set only if not stealthed, and in checks not used (mask used instead)
- VISIBILITY_GROUP_NO_DETECT = 4, // state just at stealth apply for update Grid state. Don't remove, otherwise stealth spells will break
+ //VISIBILITY_GROUP_INVISIBILITY = 3, // invisibility, can see and can be seen only another invisible unit or invisible detection unit, set only if not stealthed, and in checks not used (mask used instead)
+ //VISIBILITY_GROUP_NO_DETECT = 4, // state just at stealth apply for update Grid state. Don't remove, otherwise stealth spells will break
VISIBILITY_RESPAWN = 5 // special totally not detectable visibility for force delete object at respawn command
};
@@ -1135,13 +1135,15 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void SetVisibility(UnitVisibility x);
// common function for visibility checks for player/creatures with detection code
+ virtual bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList) const;
bool isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList = false) const;
bool canDetectInvisibilityOf(Unit const* u) const;
+ bool canDetectStealthOf(Unit const* u, float distance) const;
// virtual functions for all world objects types
bool isVisibleForInState(Player const* u, bool inVisibleList) const;
// function for low level grid visibility checks in player/creature cases
- virtual bool IsVisibleInGridForPlayer(Player* pl) const = 0;
+ virtual bool IsVisibleInGridForPlayer(Player const* pl) const = 0;
bool waterbreath;
AuraList & GetSingleCastAuras() { return m_scAuras; }