示例#1
0
        //Set the persona's stat stored in personaSlot
        public static bool SetPersonaStat(int personaSlot, PersonaStat personaStat, int statValue)
        {
            long address = GetPersonaStatAddress(personaSlot, personaStat);
            byte value   = Convert.ToByte(statValue);

            return(MemLib.writeMemory("0x" + address.ToString("X"), "byte", "0x" + value.ToString("X").PadLeft(2, '0')));
        }
示例#2
0
        //Get the persona's stat stored in personaSlot
        public static int GetPersonaStat(int personaSlot, PersonaStat personaStat)
        {
            long address = GetPersonaStatAddress(personaSlot, personaStat);
            int  value   = MemLib.readByte("0x" + address.ToString("X"));

            return(value);
        }
示例#3
0
        //Get the address of a persona's stat at personaSlot
        public static long GetPersonaStatAddress(int personaSlot, PersonaStat personaStat)
        {
            long address = (GetPersonaAddress(personaSlot) + 0x19) + (long)personaStat;

            return(address);
        }