C# Class Aura.Mabi.MabiMath

Datei anzeigen Open project: aura-project/aura

Public Methods

Method 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 method

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
return float

DegreeToByte() public static method

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

DegreeToRadian() public static method

Converts degree to radian.
public static DegreeToRadian ( int degree ) : float
degree int
return float

DirectionToByte() public static method

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

DirectionToRadian() public static method

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

FoodStatBonus() public static method

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
return float

GetNameColor() public static method

Returns the color for the name.
public static GetNameColor ( string name ) : int
name string
return int

RadianToByte() public static method

Converts radian to byte.
public static RadianToByte ( float radian ) : byte
radian float
return byte