private GameStructs.Decoration[] GetMantleDecorations(Int64 BaseAddress) { GameStructs.Decoration[] Decorations = new GameStructs.Decoration[2]; for (int DecorationIndex = 0; DecorationIndex < 2; DecorationIndex++) { GameStructs.Decoration dummy = new GameStructs.Decoration() { ID = GameStructs.ConvertToMax(Scanner.READ_UINT(BaseAddress + (DecorationIndex * 0x4))) }; Decorations[DecorationIndex] = dummy; } return(Decorations); }
private GameStructs.Decoration[] GetDecorationsFromGear(Int64 BaseAddress, int GearIndex) { GameStructs.Decoration[] Decorations = new GameStructs.Decoration[3]; for (int DecorationIndex = 0; DecorationIndex < 3; DecorationIndex++) { GameStructs.Decoration dummy = new GameStructs.Decoration() { ID = GameStructs.ConvertToZero(Scanner.READ_UINT(BaseAddress + 0x30 + (0x3 * GearIndex * 4) + (0x4 * DecorationIndex))) }; Decorations[DecorationIndex] = dummy; } return(Decorations); }
static string BuildDecorationStringStructure(GameStructs.Decoration[] Decorations, int Amount = 3, bool isWeapon = false, bool HasDecorationExtraSlot = false) { StringBuilder stringStructure = new StringBuilder(); // Shift the jewel to the third slot if it's empty, since Honey uses the // Awakening slot always in the third slot if (isWeapon && HasDecorationExtraSlot && Decorations[2].ID == int.MaxValue) { Decorations[2].ID = Decorations[1].ID; Decorations[1].ID = int.MaxValue; } for (int DecoIndex = 0; DecoIndex < Amount; DecoIndex++) { GameStructs.Decoration deco = Decorations[DecoIndex]; string decorationHoneyID = deco.ID == int.MaxValue ? "0" : HoneyGearData.SelectSingleNode($"//Honey/Gear/Jewels/Jewel[@ID='{deco.ID}']/@HoneyID")?.Value; stringStructure.Append("," + decorationHoneyID); } return(stringStructure.ToString()); }