//Set the value of a persona's statistic public static void SetPersonaStat(int personaSlot, PersonaStats personaStat, int personaStatValue) { uint address = GetPersonaStatAddress(personaSlot, personaStat); byte value = Convert.ToByte(personaStatValue); API.WriteByte(address, value); }
//Get the value of a persona's statistic public static int GetPersonaStat(int personaSlot, PersonaStats personaStat) { uint address = GetPersonaStatAddress(personaSlot, personaStat); byte value = API.ReadByte(address); return(Convert.ToInt16(value)); }
//Returns the address of a persona's statistic public static uint GetPersonaStatAddress(int personaSlot, PersonaStats personaStat) { return(GetPersonaAddress(personaSlot) + (uint)personaStat); }