} // @ public bool SetPlayerDegrees(double degrees) /// <summary> /// Set NPCs PosH as Degrees (calls FFACE SetNPCPosH directly after converting Degrees to Radians) /// </summary> /// <param name="index">index of NPC to modify</param> /// <param name="degrees">Degrees to set to, will be converted to be within 0-360, negatives are valid too</param> /// <returns>true on success, false otherwise</returns> private bool SetNPCDegrees(int index, double degrees) { if (FFACE.SetNPCPosH(_InstanceID, index, DegreesToPosH(degrees)) != 0.0f) { return(true); } return(false); } // @ private bool SetNPCDegrees(int index, double degrees)
} // @ public bool SetPlayerPosH(float value) /// <summary> /// Set NPCs PosH as Radians (calls FFACE SetNPCPosH directly) /// </summary> /// <param name="index">index of NPC to modify</param> /// <param name="value">FFXI Radians value to set</param> /// <returns>true on success, false otherwise</returns> private bool SetNPCPosH(int index, float value) { if (FFACE.SetNPCPosH(_InstanceID, index, value) != 0.0f) { return(true); } return(false); } // @ private bool SetNPCPosH(int index, float value)
} // @ private bool SetNPCPosH(int index, float value) #endregion #region SetPlayerDegrees, SetNPCDegrees methods /// <summary> /// Set the Player PosH (directly calls FFACE) /// </summary> /// <param name="degrees">Degrees to set the PosH to (0/360 North), Negative valuees valid as well.</param> /// <returns>true on success, false otherwise</returns> public bool SetPlayerDegrees(double degrees) { if (FFACE.SetNPCPosH(_InstanceID, _FFACE.Player.ID, DegreesToPosH(degrees)) != 0.0f) { return(true); } return(false); } // @ public bool SetPlayerDegrees(double degrees)
} // @ private double GetPlayerPosHInDegrees() #endregion #region Set* Methods (all private) #region SetPlayerPosH, SetNPCPosH (using FFXI Radians) /// <summary> /// Sets the Player PosH (directly calls FFACE) /// </summary> /// <param name="value">FFXI Radians to set PosH to.</param> /// <returns>true on success, false otherwise</returns> public bool SetPlayerPosH(float value) { if (FFACE.SetNPCPosH(_InstanceID, _FFACE.Player.ID, value) != 0.0f) { return(true); } return(false); } // @ public bool SetPlayerPosH(float value)
} // @ public bool FaceHeading(double X, double Y, double Z) /// <summary> /// Faces the given heading in the passed HeadingType /// </summary> /// <param name="PosH">Heading to set on player.</param> /// <param name="headingType">HeadingType indicating the type of the value.</param> /// <returns>true on success, false otherwise</returns> public bool FaceHeading(float PosH, HeadingType headingType) { if (headingType == HeadingType.Degrees) { PosH = DegreesToPosH(PosH); } if (FFACE.SetNPCPosH(_InstanceID, _FFACE.Player.ID, PosH) != 0.0f) { return(true); } return(false); } // @ public bool FaceHeading(float PosH, HeadingType headingType)