aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-10-30 11:32:10 -0500
committermegamage <none@none>2008-10-30 11:32:10 -0500
commitdaec9868d96501b69cdcc6d37e4900874ae96cd7 (patch)
treed3872ba78e27fdd078f78d9b96cc5ec0a6e8b92e /src/game/Unit.cpp
parentf2f73ff19f0a3eba028cf1b0a615988ef3218b3b (diff)
[svn] Enable linked spells: cast spells/remove auras when spells casted/spells hitting/auras removed. Add new table "spell_linked_spell". Some illustrations provided in sql.
Let trigger creature cast AOE spells when summoned. Illustration provided in sql. Let active creatures always visible if possible. (seems does not work for now, need to find out why) --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 2dae05b5411..3fed7edc22e 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8571,7 +8571,10 @@ bool Unit::isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList)
else
{
// Units far than max visible distance for creature or not in our map are not visible too
- if (!IsWithinDistInMap(u,World::GetMaxVisibleDistanceForCreature()+(inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f)))
+ // Active unit should always be visibile
+ if (!IsWithinDistInMap(u, u->isActive()
+ ? (MAX_VISIBILITY_DISTANCE - (inVisibleList ? 0.0f : World::GetVisibleUnitGreyDistance()))
+ : (World::GetMaxVisibleDistanceForCreature() + (inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f))))
return false;
}
}