C# Class Aura.Mabi.MabiMath

Afficher le fichier Open project: aura-project/aura

Méthodes publiques

Méthode Description
ByteToRadian ( byte direction ) : float

Converts Mabi's byte direction into a radian.

While entity packets use a byte from 0-255 for the direction, props are using radian floats.

DegreeToByte ( int degree ) : byte

Converts degree into Mabi's byte direction.

DegreeToRadian ( int degree ) : float

Converts degree to radian.

DirectionToByte ( double x, double y ) : byte

Converts vector direction into Mabi's byte direction.

DirectionToRadian ( double x, double y ) : float

Converts vector direction into a radian.

FoodStatBonus ( double boost, double hunger, double hungerFilled, int age ) : float

Calculates the stat bonus for eating food.

Formula: (Stat Boost * Hunger Filled) / (Hunger Fill * 20 * Current Age of Character) Reference: http://wiki.mabinogiworld.com/view/Food_List

GetNameColor ( string name ) : int

Returns the color for the name.

RadianToByte ( float radian ) : byte

Converts radian to byte.

Method Details

ByteToRadian() public static méthode

Converts Mabi's byte direction into a radian.
While entity packets use a byte from 0-255 for the direction, props are using radian floats.
public static ByteToRadian ( byte direction ) : float
direction byte
Résultat float

DegreeToByte() public static méthode

Converts degree into Mabi's byte direction.
public static DegreeToByte ( int degree ) : byte
degree int
Résultat byte

DegreeToRadian() public static méthode

Converts degree to radian.
public static DegreeToRadian ( int degree ) : float
degree int
Résultat float

DirectionToByte() public static méthode

Converts vector direction into Mabi's byte direction.
public static DirectionToByte ( double x, double y ) : byte
x double
y double
Résultat byte

DirectionToRadian() public static méthode

Converts vector direction into a radian.
public static DirectionToRadian ( double x, double y ) : float
x double
y double
Résultat float

FoodStatBonus() public static méthode

Calculates the stat bonus for eating food.
Formula: (Stat Boost * Hunger Filled) / (Hunger Fill * 20 * Current Age of Character) Reference: http://wiki.mabinogiworld.com/view/Food_List
public static FoodStatBonus ( double boost, double hunger, double hungerFilled, int age ) : float
boost double
hunger double
hungerFilled double
age int
Résultat float

GetNameColor() public static méthode

Returns the color for the name.
public static GetNameColor ( string name ) : int
name string
Résultat int

RadianToByte() public static méthode

Converts radian to byte.
public static RadianToByte ( float radian ) : byte
radian float
Résultat byte