mirror of
https://git.crafterpika.cc/crafterpika/SplatTool-public.git
synced 2026-08-17 10:42:15 +02:00
a little bit of cleanup
This commit is contained in:
parent
d40ad03bad
commit
f46a4e8283
3 changed files with 48 additions and 49 deletions
|
|
@ -153,21 +153,28 @@ namespace ModMenu {
|
|||
Program.writeUInt32((uint)(p_save_start + 0xA5B4), amount);
|
||||
}
|
||||
|
||||
public static void ChangeEquippedHeadgear(uint WeaponSetID) {
|
||||
public static void ChangeEquippedGear(uint id, string slot) {
|
||||
var p_save_start = Program.readUInt32((uint)(Program.readUInt32(SAVEDATAMGR_ROOT_PTR) + 0xC));
|
||||
Program.writeUInt32((uint)(p_save_start + 0x188), WeaponSetID);
|
||||
}
|
||||
public static void ChangeEquippedClothes(uint ClothesID) {
|
||||
var p_save_start = Program.readUInt32((uint)(Program.readUInt32(SAVEDATAMGR_ROOT_PTR) + 0xC));
|
||||
Program.writeUInt32((uint)(p_save_start + 0x180), ClothesID);
|
||||
}
|
||||
public static void ChangeEquippedShoes(uint ShoesID) {
|
||||
var p_save_start = Program.readUInt32((uint)(Program.readUInt32(SAVEDATAMGR_ROOT_PTR) + 0xC));
|
||||
Program.writeUInt32((uint)(p_save_start + 0x184), ShoesID);
|
||||
}
|
||||
public static void ChangeEquippedWeapon(uint WeaponSetID) {
|
||||
var p_save_start = Program.readUInt32((uint)(Program.readUInt32(SAVEDATAMGR_ROOT_PTR) + 0xC));
|
||||
Program.writeUInt32((uint)(p_save_start + 0x18C), WeaponSetID);
|
||||
switch (slot.ToLower()) {
|
||||
case "headgear":
|
||||
Program.writeUInt32((uint)(p_save_start + 0x188), id);
|
||||
return;
|
||||
|
||||
case "clothes":
|
||||
Program.writeUInt32((uint)(p_save_start + 0x180), id);
|
||||
return;
|
||||
|
||||
case "shoes":
|
||||
Program.writeUInt32((uint)(p_save_start + 0x184), id);
|
||||
return;
|
||||
|
||||
case "weapon":
|
||||
Program.writeUInt32((uint)(p_save_start + 0x18C), id);
|
||||
return;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static T ByteArrayToStructure<T>(byte[] bytes) where T : struct {
|
||||
|
|
|
|||
Loading…
Reference in a new issue