public void ReloadWeapons() { _weapons.Clear(); EquippedWeapon = Gecko.peek((uint)GearAddress.EquippedWeapon + Offset); var weaponData = MemoryUtils.DumpSaveSlots(Gecko, Offset, (uint)GearAddress.Weapons, 5120); // read data from slots var j = 0; while (j < weaponData.Length) { var id = weaponData[j]; // check if an empty save slot if (id.Equals(uint.MaxValue)) { break; } var number = weaponData[j + 1]; var sub = (SubWeapon)weaponData[j + 2]; var special = (SpecialWeapon)weaponData[j + 3]; var turfInked = weaponData[j + 4]; var timestamp = weaponData[j + 7]; var newFlag = weaponData[j + 8] == 0x0; AddWeapon(new Weapon(id, number, sub, special, turfInked, timestamp, newFlag)); // move to next slot j += 10; } }
public void loadValues() { Rank = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Rank + MemoryUtils.Offset)) + 1; Okane = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Okane + MemoryUtils.Offset)); Ude = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Ude + MemoryUtils.Offset)); Mae = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Mae + MemoryUtils.Offset)); Sazae = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Sazae + MemoryUtils.Offset)); Gender = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Gender + MemoryUtils.Offset)); Eyes = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Eyes + MemoryUtils.Offset)); Skin = Convert.ToInt32(Gecko.peek((uint)PlayerAddress.Skin + MemoryUtils.Offset)); Amiibo = Gecko.peek((uint)PlayerAddress.Amiibo + MemoryUtils.Offset); }
public uint GetTimer() { uint time = 0; try { time = Gecko.peek(TimerAddress); } catch (ArgumentOutOfRangeException e) { // ToDo log } return(time); }
public uint GetPointerValaue(uint basePointer, uint offset1, uint offset2) { uint result = 0; try { var pointerValue = Gecko.peek(Gecko.peek(basePointer) + offset1) + offset2; if (pointerValue > 0x1F000000 && pointerValue < 0x21000000) { result = pointerValue; } } catch (ArgumentOutOfRangeException e) { // ToDo log } return(result); }
public void Refresh() { _progression = Gecko.peek(ProgressBitsAddress + Offset); }