AoE rewrite and bug fixes

Rewrote aoe checks for cone and line aoes and added minimum distance values
Added height checks for commands
Fixed combo effects repeating for every target hit by AoE attacks
Fixed teleport sometimes not raising (I think)
Fixed gear checks in some command scripts
This commit is contained in:
yogurt 2018-07-02 00:45:06 -05:00
parent 8c5375f609
commit cf30eef39e
34 changed files with 483 additions and 330 deletions

View file

@ -657,9 +657,7 @@ namespace FFXIVClassic_Map_Server.Actors
var dX = this.positionX - x;
var dY = this.positionZ - z;
var rot2 = Math.Atan2(dY, dX);
var dRot = Math.PI - rot2 + Math.PI / 2;
// pending move, dont need to unset it
@ -668,10 +666,11 @@ namespace FFXIVClassic_Map_Server.Actors
}
// todo: is this legit?
public bool IsFacing(float x, float z, float angle = 40.0f)
public bool IsFacing(float x, float z, float angle = 90.0f)
{
angle = (float)(Math.PI * angle / 180);
return Math.Abs(Vector3.GetAngle(positionX, positionZ, x, z) - rotation) < angle;
var a = Vector3.GetAngle(positionX, positionZ, x, z);
return new Vector3(x, 0, z).IsWithinCone(GetPosAsVector3(), rotation, angle);
}
public bool IsFacing(Actor target, float angle = 40.0f)