[svn] Add SpellExtraInfoMap. Currently support:
Limited-number-of-players spell; shared damage spell; target-in-line cone spell (e.g. dark glare). Change angle of cone spells from 120 degree to 60 degree. --HG-- branch : trunk
This commit is contained in:
1 parent
6fc23ef45e
commit
55c25d894e
8 files changed
+146
-24
No files matched your search
@@ -3448,6 +3448,15 @@ bool Unit::isInBack(Unit const* target, float distance, float arc) const
|
||||
return IsWithinDistInMap(target, distance) && !HasInArc( 2 * M_PI - arc, target );
|
||||
}
|
||||
|
||||
bool Unit::isInLine(Unit const* target, float distance) const
|
||||
{
|
||||
if(!HasInArc(M_PI, target) || !IsWithinDistInMap(target, distance)) return false;
|
||||
float width = (GetObjectSize() / 2 + target->GetObjectSize()) / 2;
|
||||
float angle = GetAngle(target);
|
||||
angle -= GetOrientation();
|
||||
return abs(sin(angle)) * distance < width;
|
||||
}
|
||||
|
||||
bool Unit::isInAccessablePlaceFor(Creature const* c) const
|
||||
{
|
||||
if(IsInWater())
|
||||
|
||||
Reference in new issue
Block a user