public override void Draw() { ImGui.Text($"{Name} Debug"); ImGui.Separator(); var raptureHotbarModule = SimpleTweaksPlugin.Client.UiModule.RaptureHotbarModule; ImGui.Text("RaptureHotbarModule:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)raptureHotbarModule:X}"); ImGui.SameLine(); ImGui.Text($"{Encoding.ASCII.GetString(raptureHotbarModule.Data->ModuleName, 15)}"); ImGui.Text("ActionManager:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)SimpleTweaksPlugin.Client.ActionManager.Data:X}"); ImGui.Separator(); if (ImGui.BeginTabBar($"###{GetType().Name}_debug_tabs")) { if (ImGui.BeginTabItem("Normal")) { DrawHotbarType(raptureHotbarModule, HotBarType.Normal); ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Cross")) { DrawHotbarType(raptureHotbarModule, HotBarType.Cross); ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Pet")) { DrawHotbarType(raptureHotbarModule, HotBarType.Pet, "Normal Pet", "Cross Pet"); } ImGui.EndTabBar(); } }
public override void Draw() { ImGui.Text($"{Name} Debug"); ImGui.Separator(); var raptureHotbarModule = Framework.Instance()->GetUiModule()->GetRaptureHotbarModule(); ImGui.Text("RaptureHotbarModule:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)raptureHotbarModule:X}"); ImGui.SameLine(); ImGui.Text("ActionManager:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)ActionManager.Instance():X}"); ImGui.Separator(); if (ImGui.BeginTabBar($"###{GetType().Name}_debug_tabs")) { if (ImGui.BeginTabItem("Normal")) { DrawHotbarType(raptureHotbarModule, HotBarType.Normal); ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Cross")) { DrawHotbarType(raptureHotbarModule, HotBarType.Cross); ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Pet")) { DrawHotbarType(raptureHotbarModule, HotBarType.Pet, "Normal Pet", "Cross Pet"); } ImGui.EndTabBar(); } }
public override void Draw() { var retainerManager = RetainerManager.Instance(); ImGui.Text("Retainer Manager: "); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)retainerManager:X}"); if (retainerManager == null) { return; } ImGui.Separator(); for (var i = 0; i < 10; i++) { ImGui.Text($"{retainerManager->DisplayOrder[i]}"); } ImGui.Separator(); DebugManager.PrintOutObject(retainerManager); }
public override void Draw() { var targets = Service.Targets; ImGui.Text("Current Target:"); if (targets.Target != null) { DebugManager.PrintOutObject(targets.Target, (ulong)targets.Target.Address.ToInt64(), new List <string>() { "Target", "Current" }); } if (targets.FocusTarget != null) { DebugManager.PrintOutObject(targets.FocusTarget, (ulong)targets.FocusTarget.Address.ToInt64(), new List <string>() { "Target", "Focus" }); } if (targets.PreviousTarget != null) { DebugManager.PrintOutObject(targets.PreviousTarget, (ulong)targets.PreviousTarget.Address.ToInt64(), new List <string>() { "Target", "Prev" }); } if (targets.MouseOverTarget != null) { DebugManager.PrintOutObject(targets.MouseOverTarget, (ulong)targets.MouseOverTarget.Address.ToInt64(), new List <string>() { "Target", "MouseOver" }); } }
public override void Draw() { var config = Framework.Instance()->GetUiModule()->GetConfigModule(); ImGui.Text("ConfigModule:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong) config:X}"); DebugManager.PrintOutObject(config); var oFields = config->GetOption(0)->GetType().GetFields(BindingFlags.Public | BindingFlags.Instance); var vFields = config->GetValue(0)->GetType().GetFields(BindingFlags.Public | BindingFlags.Instance); if (ImGui.BeginTable("optionsTable", 3 + oFields.Length + vFields.Length, ImGuiTableFlags.Borders | ImGuiTableFlags.RowBg | ImGuiTableFlags.Resizable | ImGuiTableFlags.ScrollY | ImGuiTableFlags.ScrollX, new Vector2(-1, -1))) { ImGui.TableSetupColumn("Index", ImGuiTableColumnFlags.WidthFixed, 40); ImGui.TableSetupColumn("Index", ImGuiTableColumnFlags.WidthFixed, 40); ImGui.TableSetupColumn("Address", ImGuiTableColumnFlags.WidthFixed, 90); foreach (var f in oFields) { ImGui.TableSetupColumn($"{f.Name}"); } foreach (var f in vFields) { ImGui.TableSetupColumn($"{f.Name}"); } ImGui.TableSetupScrollFreeze(1, 1); ImGui.TableHeadersRow(); for (uint i = 0; i < ConfigModule.ConfigOptionCount; i++) { var option = config->GetOption(i); var value = config->GetValue(i); ImGui.TableNextColumn(); ImGui.Text($"{i}"); ImGui.TableNextColumn(); ImGui.Text($"{i:X}"); ImGui.TableNextColumn(); DebugManager.ClickToCopyText($"{(ulong)option:X}"); foreach (var f in oFields) { ImGui.TableNextColumn(); var v = f.GetValue(*option); if (f.FieldType.IsPointer && v is Pointer p) { var ptr = Pointer.Unbox(p); ImGui.Text($"{(ulong)ptr:X}"); } else { ImGui.Text($"{v}"); } } foreach (var f in vFields) { ImGui.TableNextColumn(); var v = f.GetValue(*value); if (f.FieldType.IsPointer && v is Pointer p) { var ptr = Pointer.Unbox(p); ImGui.Text($"{(ulong)ptr:X}"); } else { ImGui.Text($"{v}"); } } ImGui.TableNextRow(); } ImGui.EndTable(); } }
public override void Draw() { var uiModule = Framework.Instance()->GetUiModule(); if (uiModule == null) { ImGui.Text("UIModule unavailable. "); return; } ImGui.Text($"UIModule address - {(long)uiModule:X}"); var atkArrayDataHolder = &uiModule->RaptureAtkModule.AtkModule.AtkArrayDataHolder; ImGui.Text($"AtkArrayDataHolder address - {(long)atkArrayDataHolder:X}"); ImGui.Text( $"ExtendArrayData - array size: {atkArrayDataHolder->ExtendArrayCount} - array ptr: {(long)atkArrayDataHolder->ExtendArrays:X}"); ImGui.Separator(); ImGui.BeginChild("arraySelect", new Vector2(230 * ImGui.GetIO().FontGlobalScale, -1), true); if (ImGui.BeginTabBar("tabs")) { if (ImGui.BeginTabItem("Numbers")) { ImGui.BeginChild("arraySelectNumbers"); for (var i = 0; i < atkArrayDataHolder->NumberArrayCount; i++) { var array = atkArrayDataHolder->NumberArrays[i]; if (array == null) { continue; } if (ImGui.Selectable($"Number Array #{i.ToString().PadLeft(atkArrayDataHolder->NumberArrayCount.ToString().Length, '0')} [{array->AtkArrayData.Size}]", selectedArray == i && selectedType == ArrayType.Numbers)) { selectedType = ArrayType.Numbers; selectedArray = i; } } ImGui.EndChild(); ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Strings")) { ImGui.BeginChild("arraySelectStrings"); for (var i = 0; i < atkArrayDataHolder->StringArrayCount; i++) { var array = atkArrayDataHolder->StringArrays[i]; if (array == null) { continue; } if (ImGui.Selectable($"String Array #{i.ToString().PadLeft(atkArrayDataHolder->StringArrayCount.ToString().Length, '0')} [{array->AtkArrayData.Size}]", selectedArray == i && selectedType == ArrayType.Strings)) { selectedType = ArrayType.Strings; selectedArray = i; } } ImGui.EndChild(); ImGui.EndTabItem(); } ImGui.EndTabBar(); } ImGui.EndChild(); ImGui.SameLine(); ImGui.BeginChild("view", new Vector2(-1), true); if (selectedArray >= 0) { switch (selectedType) { case ArrayType.Numbers: { ImGui.Text($"Number Array #{selectedArray.ToString().PadLeft(atkArrayDataHolder->NumberArrayCount.ToString().Length, '0')}"); var array = atkArrayDataHolder->NumberArrays[selectedArray]; if (array == null) { ImGui.Text("Null"); break; } ImGui.Text("Address:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)array:X}"); ImGui.Separator(); ImGui.BeginChild("numbersArrayView", new Vector2(-1)); if (ImGui.BeginTable("numbersTable", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.RowBg)) { ImGui.TableSetupColumn("#", ImGuiTableColumnFlags.WidthFixed, 50); ImGui.TableSetupColumn("Integer"); ImGui.TableSetupColumn("Hex"); ImGui.TableSetupColumn("Float"); ImGui.TableHeadersRow(); for (var i = 0; i < array->AtkArrayData.Size; i++) { ImGui.TableNextColumn(); ImGui.Text($"{i.ToString().PadLeft(array->AtkArrayData.Size.ToString().Length, '0')}"); ImGui.TableNextColumn(); ImGui.Text($"{array->IntArray[i]}"); ImGui.TableNextColumn(); ImGui.Text($"{array->IntArray[i]:X}"); ImGui.TableNextColumn(); ImGui.Text($"{*(float*)(&array->IntArray[i])}"); } ImGui.EndTable(); } ImGui.EndChild(); break; } case ArrayType.Strings: { ImGui.Text($"String Array #{selectedArray.ToString().PadLeft(atkArrayDataHolder->StringArrayCount.ToString().Length, '0')}"); var array = atkArrayDataHolder->StringArrays[selectedArray]; ImGui.Text("Address:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)array:X}"); ImGui.Separator(); ImGui.BeginChild("stringArrayView", new Vector2(-1)); if (ImGui.BeginTable("stringsTable", 2, ImGuiTableFlags.Borders | ImGuiTableFlags.RowBg)) { ImGui.TableSetupColumn("#", ImGuiTableColumnFlags.WidthFixed, 50); ImGui.TableSetupColumn("String"); ImGui.TableHeadersRow(); for (var i = 0; i < array->AtkArrayData.Size; i++) { ImGui.TableNextColumn(); ImGui.Text($"{i.ToString().PadLeft(array->AtkArrayData.Size.ToString().Length, '0')}"); ImGui.TableNextColumn(); var strPtr = array->StringArray[i]; if (strPtr == null) { ImGui.TextColored(new Vector4(1, 0, 0, 1), "string is null"); } else { try { var str = MemoryHelper.ReadSeStringNullTerminated(new IntPtr(strPtr)); // ImGui.Text($"{str.TextValue}"); foreach (var p in str.Payloads) { ImGui.Text($"{p}"); } } catch (Exception ex) { ImGui.TextColored(new Vector4(1, 0, 0, 1), ex.ToString()); } } } ImGui.EndTable(); } ImGui.EndChild(); break; } } } ImGui.EndChild(); }
public override void Draw() { DebugManager.ClickToCopyText($"{Common.InventoryManagerAddress.ToInt64():X}"); if (ImGui.BeginTabBar("inventoryDebuggingTabs")) { if (ImGui.BeginTabItem("Container/Slot")) { ImGui.PushItemWidth(200); if (ImGui.BeginCombo("###containerSelect", $"{inventoryType} [{(int)inventoryType}]")) { foreach (var i in (InventoryType[])Enum.GetValues(typeof(InventoryType))) { if (ImGui.Selectable($"{i} [{(int) i}]##inventoryTypeSelect", i == inventoryType)) { inventoryType = i; } } ImGui.EndCombo(); } var container = Common.GetContainer(inventoryType); ImGui.PopItemWidth(); if (container != null) { ImGui.Text($"Container Address:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)container:X}"); ImGui.SameLine(); DebugManager.PrintOutObject(*container, (ulong)container, new List <string>()); if (ImGui.TreeNode("Items##containerItems")) { for (var i = 0; i < container->SlotCount; i++) { var item = container->Items[i]; DebugManager.PrintOutObject(item, (ulong)&item, new List <string> { $"Items[{i}]" }, false, $"[{i:00}] {item.Item?.Name ?? "<Not Found>"}"); } ImGui.TreePop(); } } else { ImGui.Text("Container not found."); } ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Sorting")) { var module = SimpleTweaksPlugin.Client.UiModule.ItemOrderModule; ImGui.Text("Item Order Module:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong) module:X}"); ImGui.SameLine(); DebugManager.PrintOutObject(module, (ulong)module, new List <string>()); ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Finder")) { var module = SimpleTweaksPlugin.Client.UiModule.ItemFinderModule; ImGui.Text("ItemFinderModule:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong) module:X}"); ImGui.SameLine(); DebugManager.PrintOutObject(module, (ulong)module, new List <string>()); } ImGui.EndTabBar(); } }
public override void Draw() { var raptureGearsetModule = RaptureGearsetModule.Instance(); ImGui.Text("RaptureGearsetModule:"); ImGui.SameLine(); DebugManager.ClickToCopyText($"{(ulong)raptureGearsetModule:X}"); ImGui.SameLine(); ImGui.Text($"{Encoding.ASCII.GetString(raptureGearsetModule->ModuleName, 15)}"); ImGui.Columns(5); ImGui.Text($"##"); ImGuiExt.SetColumnWidths(35f, 120); ImGui.NextColumn(); ImGui.Text("Address"); ImGui.NextColumn(); ImGui.Text("Name"); ImGui.NextColumn(); ImGui.Text("Items"); ImGuiExt.NextRow(); ImGui.Separator(); ImGui.Separator(); for (var i = 0; i < 101; i++) { var gearset = raptureGearsetModule->Gearset[i]; if (gearset->ID != i) { break; } if (!gearset->Flags.HasFlag(RaptureGearsetModule.GearsetFlag.Exists)) { continue; } ImGui.Text($"{gearset->ID:00}"); ImGui.NextColumn(); DebugManager.ClickToCopyText($"{(ulong) gearset:X}"); ImGui.NextColumn(); ImGui.Text(Encoding.UTF8.GetString(gearset->Name, 0x2F)); ImGui.NextColumn(); ImGui.Text("MainHand"); ImGui.SameLine(); ImGui.Text($"[{gearset->MainHand.ItemID}]"); ImGui.Text("OffHand"); ImGui.SameLine(); ImGui.Text($"[{gearset->OffHand.ItemID}]"); ImGui.Text("Head"); ImGui.SameLine(); ImGui.Text($"[{gearset->Head.ItemID}]"); ImGui.Text("Body"); ImGui.SameLine(); ImGui.Text($"[{gearset->Body.ItemID}]"); ImGui.Text("Hands"); ImGui.SameLine(); ImGui.Text($"[{gearset->Hands.ItemID}]"); ImGui.Text("Belt"); ImGui.SameLine(); ImGui.Text($"[{gearset->Belt.ItemID}]"); ImGui.Text("Legs"); ImGui.SameLine(); ImGui.Text($"[{gearset->Legs.ItemID}]"); ImGui.Text("Feet"); ImGui.SameLine(); ImGui.Text($"[{gearset->Feet.ItemID}]"); ImGui.Text("Ears"); ImGui.SameLine(); ImGui.Text($"[{gearset->Ears.ItemID}]"); ImGui.Text("Neck"); ImGui.SameLine(); ImGui.Text($"[{gearset->Neck.ItemID}]"); ImGui.Text("Wrists"); ImGui.SameLine(); ImGui.Text($"[{gearset->Wrists.ItemID}]"); ImGui.Text("RingRight"); ImGui.SameLine(); ImGui.Text($"[{gearset->RingRight.ItemID}]"); ImGui.Text("SoulStone"); ImGui.SameLine(); ImGui.Text($"[{gearset->SoulStone.ItemID}]"); ImGuiExt.NextRow(); ImGui.Separator(); } ImGui.Columns(); }
private void DrawHotbar(RaptureHotbarModule hotbarModule, HotBar *hotbar) { ImGui.Columns(8); ImGuiExt.SetColumnWidths(35); ImGui.Text($"##"); ImGui.NextColumn(); ImGui.Text("Command"); ImGui.NextColumn(); ImGui.Text("Icon"); ImGui.NextColumn(); ImGui.Text("Name"); ImGui.NextColumn(); ImGui.Text("Cooldown"); ImGui.NextColumn(); ImGuiExt.NextRow(); ImGui.Separator(); ImGui.Separator(); for (var i = 0; i < 16; i++) { var slot = hotbarModule.GetBarSlot(hotbar, i); if (slot == null) { break; } if (slot->CommandType == HotbarSlotType.Empty) { ImGui.PushStyleColor(ImGuiCol.Text, slot->CommandType == HotbarSlotType.Empty ? 0x99999999 : 0xFFFFFFFF); DebugManager.ClickToCopyText($"{i+1:00}", $"{(ulong)slot:X}"); ImGui.NextColumn(); ImGui.Text("Empty"); ImGui.PopStyleColor(); ImGuiExt.NextRow(); ImGui.Separator(); continue; } var adjustedId = slot->CommandType == HotbarSlotType.Action ? SimpleTweaksPlugin.Client.ActionManager.GetAdjustedActionId((int)slot->CommandId) : slot->CommandId; DebugManager.ClickToCopyText($"{i+1:00}", $"{(ulong)slot:X}"); ImGui.NextColumn(); ImGui.Text($"{slot->CommandType} : {slot->CommandId}"); if (slot->CommandType == HotbarSlotType.Action) { ImGui.Text($"Adjusted: {adjustedId}"); } ImGui.NextColumn(); var iconGood = false; if (slot->Icon <= ushort.MaxValue) { var icon = Plugin.IconManager.GetIconTexture((ushort)slot->Icon); if (icon != null) { ImGui.Image(icon.ImGuiHandle, new Vector2(32)); iconGood = true; } } if (!iconGood) { ImGui.GetWindowDrawList().AddRect(ImGui.GetCursorScreenPos(), ImGui.GetCursorScreenPos() + new Vector2(32), 0xFF0000FF, 4); ImGui.Dummy(new Vector2(32)); } ImGui.SameLine(); ImGui.Text($"{slot->IconTypeA} : {slot->IconA}\n{slot->IconTypeB} : {slot->IconB}"); ImGui.NextColumn(); switch (slot->CommandType) { case HotbarSlotType.Empty: { break; } case HotbarSlotType.Action: { var action = Plugin.PluginInterface.Data.Excel.GetSheet <Action>().GetRow(slot->CommandId); if (action == null) { ImGui.TextDisabled("Not Found"); } else { ImGui.TextWrapped($"{action.Name}"); } break; } case HotbarSlotType.Item: { var item = Plugin.PluginInterface.Data.GetExcelSheet <Item>().GetRow(slot->CommandId); if (item == null) { ImGui.TextDisabled("Not Found"); } else { ImGui.TextWrapped($"{item.Name}"); } break; } case HotbarSlotType.CraftAction: { var action = Plugin.PluginInterface.Data.GetExcelSheet <CraftAction>().GetRow(slot->CommandId); if (action == null) { ImGui.TextDisabled("Not Found"); } else { ImGui.TextWrapped($"{action.Name}"); } break; } case HotbarSlotType.GeneralAction: { var action = Plugin.PluginInterface.Data.GetExcelSheet <GeneralAction>().GetRow(slot->CommandId); if (action == null) { ImGui.TextDisabled("Not Found"); } else { ImGui.TextWrapped($"{action.Name}"); } break; } case HotbarSlotType.MainCommand: { var action = Plugin.PluginInterface.Data.GetExcelSheet <MainCommand>().GetRow(slot->CommandId); if (action == null) { ImGui.TextDisabled("Not Found"); } else { ImGui.TextWrapped($"{action.Name}"); } break; } case HotbarSlotType.ExtraCommand: { var rawSheet = Plugin.PluginInterface.Data.Excel.GetSheetRaw("ExtraCommand"); var parser = rawSheet.GetRowParser(slot->CommandId); var name = parser.ReadColumn <SeString>(0); ImGui.Text($"{name}"); break; } case HotbarSlotType.GearSet: { var gearsetModule = SimpleTweaksPlugin.Client.UiModule.RaptureGearsetModule; var gearset = gearsetModule.Gearset[slot->CommandId]; ImGui.Text($"{Encoding.UTF8.GetString(gearset.Name, 0x2F)}"); break; } case HotbarSlotType.Macro: { ImGui.Text($"{(slot->CommandId >= 256 ? "Shared" : "Individual")} #{slot->CommandId%256}"); break; } default: { ImGui.TextDisabled("Name Not Supprorted"); break; } } ImGui.NextColumn(); var cooldownGroup = -1; switch (slot->CommandType) { case HotbarSlotType.Action: { var action = Plugin.PluginInterface.Data.Excel.GetSheet <Action>().GetRow((uint)adjustedId); if (action == null) { ImGui.TextDisabled("Not Found"); break; } cooldownGroup = action.CooldownGroup; break; } case HotbarSlotType.Item: { var item = Plugin.PluginInterface.Data.Excel.GetSheet <Item>().GetRow(slot->CommandId); if (item == null) { ImGui.TextDisabled("Not Found"); break; } var cdg = SimpleTweaksPlugin.Client.ActionManager.GetRecastGroup(2, slot->CommandId); if (cdg < 81) { cooldownGroup = (int)(cdg + 1); } break; } case HotbarSlotType.GeneralAction: { var action = Plugin.PluginInterface.Data.Excel.GetSheet <GeneralAction>().GetRow(slot->CommandId); if (action?.Action == null) { ImGui.TextDisabled("Not Found"); break; } cooldownGroup = action.Action.Value.CooldownGroup; break; } } if (cooldownGroup > 0) { ImGui.Text($"Cooldown Group: {cooldownGroup}"); var cooldown = SimpleTweaksPlugin.Client.ActionManager.GetGroupRecastTime(cooldownGroup); DebugManager.ClickToCopyText($"{(ulong)cooldown:X}"); if (cooldown != null) { ImGui.Text($"{cooldown->IsActive} / {cooldown->Elapsed} / {cooldown->Total}"); } else { ImGui.Text("Failed"); } } ImGuiExt.NextRow(); ImGui.Separator(); } ImGui.Columns(); }