C# Class FFACETools.FFACE.NavigatorTools

Class container to impliment Pyrolol's navigation system
Afficher le fichier Open project: golfandsurf/Campah

Private Properties

Свойство Type Description
MathMod double
MathMod float
MathMod int
SetNPCDegrees bool
SetNPCPosH bool
SetPlayerDegrees bool
SetPlayerPosH bool
StartRunning void
StopRunning void

Méthodes publiques

Méthode Description
DegreesToPosH ( double Degrees ) : float

Converts degrees to FFXI PosH Radians heading.

DistanceTo ( Position position ) : double

Calculates the distance to the passed destination

DistanceTo ( double X, double Z ) : double

Calculates the distance to the passed destination

DistanceTo ( double X, double Y, double Z ) : double

Calculates the distance to the passed destination taking height into account.

DistanceTo ( int ID ) : double

Calculates the distance to the passed NPC

FaceHeading ( Position position ) : bool

Faces to destination as given by position

FaceHeading ( double X, double Z ) : bool

Faces to destination as given by X,Z

FaceHeading ( double X, double Y, double Z ) : bool

Faces to destination as given by X,Y,Z

FaceHeading ( float PosH, HeadingType headingType ) : bool

Faces the given heading in the passed HeadingType

FaceHeading ( int ID ) : bool

Faces NPC/PC with matching ID

GetPlayerPosHInDegrees ( ) : double

Will get the players heading (as radians) in degrees, and north as 0

Goto ( Position position, bool KeepRunning ) : void

Will move the player to the passed STATIC ONLY destination. (will not stop trying)

Goto ( Position position, bool KeepRunning, int timeOut ) : void

Will move the player to the passed STATIC ONLY destination or stop within a specified time.

Goto ( dPoint x, dPoint z, bool KeepRunning ) : void

Will move the player to the passed destination (will not stop trying)

Goto ( dPoint x, dPoint z, bool KeepRunning, int timeOut ) : void

Will move the player to the passed destination or stop within a specified time.

Goto ( dPoint x, dPoint y, dPoint z, bool KeepRunning ) : void

Will move the player to the passed destination (will not stop trying)

Goto ( dPoint x, dPoint y, dPoint z, bool KeepRunning, int timeOut ) : void

Will move the player to the passed destination or stop within a specified time.

Goto ( float X, float Z, bool KeepRunning ) : void

Will move the player to the passed STATIC ONLY destination (Will not stop trying)

Goto ( float X, float Z, bool KeepRunning, int timeOut ) : void

Will move the player to the passed STATIC ONLY destination or stop within a specified time.

Goto ( float X, float Y, float Z, bool KeepRunning ) : void

Will move the player to the passed STATIC ONLY destination. (Will not stop trying)

Goto ( float X, float Y, float Z, bool KeepRunning, int timeOut ) : void

Will move the player to the passed STATIC ONLY destination or stop within a specified time.

GotoNPC ( int ID ) : void

Will go to the passed NPC's location (will not stop trying)

GotoNPC ( int ID, int timeOut ) : void

Will go to the passed NPC's location or stop within a specified time.

GotoTarget ( ) : void

Will go to the current target's location (will not stop trying)

GotoTarget ( int timeOut ) : void

Will go to the current target's location or stop within a specified time.

HeadingError ( double Origin, double Target ) : double

Calculate Heading Error between Origin and Target relative to Origin (how many degrees to adjust, negative is left, positive is right)

HeadingTo ( Position position, HeadingType headingType ) : float

Gets heading from player to Position as selected HeadingType

HeadingTo ( double X, double Z, HeadingType headingType ) : float

Gets heading from player to Position as selected HeadingType

HeadingTo ( double X, double Y, double Z, HeadingType headingType ) : float

Gets heading from player to Position as selected HeadingType

HeadingTo ( int ID, HeadingType headingType ) : float

Gets heading from player to NPC/PC as selected HeadingType

IsRunning ( ) : bool

Whether we're currently moving or not

NavigatorTools ( FFACE fface ) : System

Contructor to start navigation system

PosHToDegrees ( float PosH ) : double

Converts FFXI PosH Radians headings into degrees (0-North, 270-West, 90-East, 180-South

Reset ( ) : void

Resets status of running and sends the KeyUp command to Windower

SetViewMode ( ViewMode newMode ) : void

Sets players ViewMode by pressing Numpad 5 if passed ViewMode is not already set.

Private Methods

Méthode Description
MathMod ( double a, double b ) : double

Returns modulo of a to b with sign matching divisor (C# Modulo returns modulo with sign matching dividend)

MathMod ( float a, float b ) : float

Returns modulo of a to b with sign matching divisor (C# Modulo returns modulo with sign matching dividend)

MathMod ( int a, int b ) : int

Returns modulo of a to b with sign matching divisor (C# Modulo returns modulo with sign matching dividend)

SetNPCDegrees ( int index, double degrees ) : bool

Set NPCs PosH as Degrees (calls FFACE SetNPCPosH directly after converting Degrees to Radians)

SetNPCPosH ( int index, float value ) : bool

Set NPCs PosH as Radians (calls FFACE SetNPCPosH directly)

SetPlayerDegrees ( double degrees ) : bool

Set the Player PosH (directly calls FFACE)

SetPlayerPosH ( float value ) : bool

Sets the Player PosH (directly calls FFACE)

StartRunning ( ) : void

Will start moving the player to the destination

StopRunning ( ) : void

Will stop moving the player

Method Details

DegreesToPosH() public méthode

Converts degrees to FFXI PosH Radians heading.
public DegreesToPosH ( double Degrees ) : float
Degrees double Degrees (can be any value, will be forced into 0-359.999 range)
Résultat float

DistanceTo() public méthode

Calculates the distance to the passed destination
public DistanceTo ( Position position ) : double
position Position Coordinates of destination as a Position class
Résultat double

DistanceTo() public méthode

Calculates the distance to the passed destination
public DistanceTo ( double X, double Z ) : double
X double X coordinate of destination
Z double Z coordinate of destination
Résultat double

DistanceTo() public méthode

Calculates the distance to the passed destination taking height into account.
public DistanceTo ( double X, double Y, double Z ) : double
X double X coordinate of destination
Y double Y coordinate of destination
Z double Z coordinate of destination
Résultat double

DistanceTo() public méthode

Calculates the distance to the passed NPC
public DistanceTo ( int ID ) : double
ID int ID of the NPC/PC
Résultat double

FaceHeading() public méthode

Faces to destination as given by position
public FaceHeading ( Position position ) : bool
position Position Destination to face as a Position class.
Résultat bool

FaceHeading() public méthode

Faces to destination as given by X,Z
public FaceHeading ( double X, double Z ) : bool
X double X coordinate of destination
Z double Z coordinate of destination
Résultat bool

FaceHeading() public méthode

Faces to destination as given by X,Y,Z
public FaceHeading ( double X, double Y, double Z ) : bool
X double X coordinate of destination
Y double Y coordinate of destination (not used, here for consistency)
Z double Z coordinate of destination
Résultat bool

FaceHeading() public méthode

Faces the given heading in the passed HeadingType
public FaceHeading ( float PosH, HeadingType headingType ) : bool
PosH float Heading to set on player.
headingType HeadingType HeadingType indicating the type of the value.
Résultat bool

FaceHeading() public méthode

Faces NPC/PC with matching ID
public FaceHeading ( int ID ) : bool
ID int ID of NPC/PC to face
Résultat bool

GetPlayerPosHInDegrees() public méthode

Will get the players heading (as radians) in degrees, and north as 0
public GetPlayerPosHInDegrees ( ) : double
Résultat double

Goto() public méthode

Will move the player to the passed STATIC ONLY destination. (will not stop trying)
public Goto ( Position position, bool KeepRunning ) : void
position Position Position of destination (will not live update as it runs)
KeepRunning bool Whether to keep moving after reaching the destination
Résultat void

Goto() public méthode

Will move the player to the passed STATIC ONLY destination or stop within a specified time.
public Goto ( Position position, bool KeepRunning, int timeOut ) : void
position Position Position of destination (will not live update as it runs)
KeepRunning bool Whether to keep moving after reaching the destination
timeOut int Time out in milliseconds
Résultat void

Goto() public méthode

Will move the player to the passed destination (will not stop trying)
public Goto ( dPoint x, dPoint z, bool KeepRunning ) : void
x dPoint Function returning X coordinate of the destination
z dPoint Function returning Z coordinate of the destination
KeepRunning bool Whether to keep moving after reaching the destination
Résultat void

Goto() public méthode

Will move the player to the passed destination or stop within a specified time.
public Goto ( dPoint x, dPoint z, bool KeepRunning, int timeOut ) : void
x dPoint Function returning X coordinate of the destination
z dPoint Function returning Z coordinate of the destination
KeepRunning bool Whether to keep moving after reaching the destination
timeOut int Time out in milliseconds
Résultat void

Goto() public méthode

Will move the player to the passed destination (will not stop trying)
public Goto ( dPoint x, dPoint y, dPoint z, bool KeepRunning ) : void
x dPoint Function returning X coordinate of the destination
y dPoint Function returning Y coordinate of the destination
z dPoint Function returning Z coordinate of the destination
KeepRunning bool Whether to keep moving after reaching the destination
Résultat void

Goto() public méthode

Will move the player to the passed destination or stop within a specified time.
public Goto ( dPoint x, dPoint y, dPoint z, bool KeepRunning, int timeOut ) : void
x dPoint Function returning X coordinate of the destination
y dPoint Function returning Y coordinate of the destination
z dPoint Function returning Z coordinate of the destination
KeepRunning bool Whether to keep moving after reaching the destination
timeOut int Time out in milliseconds
Résultat void

Goto() public méthode

Will move the player to the passed STATIC ONLY destination (Will not stop trying)
public Goto ( float X, float Z, bool KeepRunning ) : void
X float
Z float
KeepRunning bool Whether to keep moving after reaching the destination
Résultat void

Goto() public méthode

Will move the player to the passed STATIC ONLY destination or stop within a specified time.
public Goto ( float X, float Z, bool KeepRunning, int timeOut ) : void
X float
Z float
KeepRunning bool Whether to keep moving after reaching the destination
timeOut int Time out in milliseconds
Résultat void

Goto() public méthode

Will move the player to the passed STATIC ONLY destination. (Will not stop trying)
public Goto ( float X, float Y, float Z, bool KeepRunning ) : void
X float
Y float
Z float
KeepRunning bool Whether to keep moving after reaching the destination
Résultat void

Goto() public méthode

Will move the player to the passed STATIC ONLY destination or stop within a specified time.
public Goto ( float X, float Y, float Z, bool KeepRunning, int timeOut ) : void
X float
Y float
Z float
KeepRunning bool Whether to keep moving after reaching the destination
timeOut int Time out in milliseconds
Résultat void

GotoNPC() public méthode

Will go to the passed NPC's location (will not stop trying)
public GotoNPC ( int ID ) : void
ID int ID of the NPC
Résultat void

GotoNPC() public méthode

Will go to the passed NPC's location or stop within a specified time.
public GotoNPC ( int ID, int timeOut ) : void
ID int ID of the NPC
timeOut int Time out in milliseconds
Résultat void

GotoTarget() public méthode

Will go to the current target's location (will not stop trying)
public GotoTarget ( ) : void
Résultat void

GotoTarget() public méthode

Will go to the current target's location or stop within a specified time.
public GotoTarget ( int timeOut ) : void
timeOut int Time out in milliseconds
Résultat void

HeadingError() public méthode

Calculate Heading Error between Origin and Target relative to Origin (how many degrees to adjust, negative is left, positive is right)
public HeadingError ( double Origin, double Target ) : double
Origin double Origin's (typically player's) current heading in degrees (can use negative values)
Target double Target heading we're finding we may be off from (can use negative values)
Résultat double

HeadingTo() public méthode

Gets heading from player to Position as selected HeadingType
public HeadingTo ( Position position, HeadingType headingType ) : float
position Position Position containing coordinates to get heading to.
headingType HeadingType Heading type for the return value.
Résultat float

HeadingTo() public méthode

Gets heading from player to Position as selected HeadingType
public HeadingTo ( double X, double Z, HeadingType headingType ) : float
X double X coordinate of Position to get heading to.
Z double Z coordinate of Position to get heading to.
headingType HeadingType Heading type for the return value.
Résultat float

HeadingTo() public méthode

Gets heading from player to Position as selected HeadingType
public HeadingTo ( double X, double Y, double Z, HeadingType headingType ) : float
X double X coordinate of Position to get heading to.
Y double Y coordinate of Position to get heading to.
Z double Z coordinate of Position to get heading to.
headingType HeadingType Heading type for the return value.
Résultat float

HeadingTo() public méthode

Gets heading from player to NPC/PC as selected HeadingType
public HeadingTo ( int ID, HeadingType headingType ) : float
ID int ID of NPC/PC
headingType HeadingType Heading type for the return value.
Résultat float

IsRunning() public méthode

Whether we're currently moving or not
public IsRunning ( ) : bool
Résultat bool

NavigatorTools() public méthode

Contructor to start navigation system
public NavigatorTools ( FFACE fface ) : System
fface FFACE
Résultat System

PosHToDegrees() public méthode

Converts FFXI PosH Radians headings into degrees (0-North, 270-West, 90-East, 180-South
public PosHToDegrees ( float PosH ) : double
PosH float FFXI PosH Radians to convert to degrees
Résultat double

Reset() public méthode

Resets status of running and sends the KeyUp command to Windower
public Reset ( ) : void
Résultat void

SetViewMode() public méthode

Sets players ViewMode by pressing Numpad 5 if passed ViewMode is not already set.
public SetViewMode ( ViewMode newMode ) : void
newMode ViewMode ViewMode to set it to.
Résultat void