Anyone knows the packet structure of those skills being mentioned above. I mean the packet that send the character to certain coordinate once these skills will be activated.
Public class coords
{
private int _x;
private int _y;
public coords(){}
~coords(){}
public int X
{
get{return this._x;}
set{this._x=value;}
}
public int Y
{
get{return this._y;}
set{this._y=value;}
}
}
private static coords GetTempestBladeCoord(ushort X1, ushort X2, ushort Y1, ushort Y2, byte MaxDistance)
{
coords tmp = new coords();
double dx = X1 - X2, dy = Y1 - Y2;
double angle;
if (dx == 0) angle = 90;
else if (dy == 0) angle = 0;
else angle = Math.Atan(Math.Abs(dy) / Math.Abs(dx)) * 180 / Math.PI;
double dxf = Math.Round(Math.Cos(angle * Math.PI / 180) * (double)MaxDistance);
double dyf = Math.Round(Math.Sin(angle * Math.PI / 180) * (double)MaxDistance);
if (X1 > X2) tmp.X = (int)((double)X1 - dxf);
else tmp.X = (int)((double)X1 + dxf);
if (Y1 > Y2) tmp.Y = (int)((double)Y1 - dyf);
else tmp.Y = (int)((double)Y1 + dyf);
return tmp;
}
coords tmpcoord = GetTempestBladeCoord(myHero.CoordX, maction.AimX, myHero.CoordY, maction.AimY, 10);