mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-10-27 06:00:54 +00:00
feat: add /hb debug command for local chat logging
This commit is contained in:
+15
@@ -103,6 +103,21 @@ function HealBot_SlashCmd(cmd)
|
||||
HealBot_AddDebug( "Channel active" );
|
||||
return;
|
||||
end
|
||||
if (cmd=="debug" or cmd=="dbg") then
|
||||
if not HealBot_Config then return; end
|
||||
if HealBot_Config.DebugMode == 1 then
|
||||
HealBot_Config.DebugMode = 0;
|
||||
if DEFAULT_CHAT_FRAME then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cFFFFD100HealBot|r: Debug mode |cFFFF0000DISABLED|r.");
|
||||
end
|
||||
else
|
||||
HealBot_Config.DebugMode = 1;
|
||||
if DEFAULT_CHAT_FRAME then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cFFFFD100HealBot|r: Debug mode |cFF00FF00ENABLED|r.");
|
||||
end
|
||||
end
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
-- HealBot_SendAddonMessage moved to HealBot_Controller_Comms.lua
|
||||
|
||||
@@ -30,8 +30,15 @@ function HealBot_AddChat(msg)
|
||||
end
|
||||
end
|
||||
|
||||
-- HealBot_AddDebug: Prints debug messages to internal chat channel.
|
||||
-- HealBot_AddDebug: Prints debug messages to chat or internal debug channel.
|
||||
function HealBot_AddDebug(msg)
|
||||
if HealBot_Config and HealBot_Config.DebugMode == 1 then
|
||||
if DEFAULT_CHAT_FRAME then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cFFFFD100[HB Debug]|r " .. msg);
|
||||
end
|
||||
return;
|
||||
end
|
||||
|
||||
local chanid = HealBot_Get_DebugChan();
|
||||
if chanid and HealBot_SpamCnt < 3 then
|
||||
HealBot_SpamCnt = HealBot_SpamCnt + 1;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
HealBot_ConfigDefaults = {
|
||||
DebugMode = 0,
|
||||
ShowManaBars=0,
|
||||
ManaBarsHealersOnly=0,
|
||||
Version = HEALBOT_VERSION,
|
||||
|
||||
@@ -21,6 +21,7 @@ function HealBot_Integrations_Toggle()
|
||||
HealBot_Integrations_UnitXP_Active = true;
|
||||
HealBot_AddDebug("UnitXP Integration: ENABLED");
|
||||
else
|
||||
Look at the lines that need translation
|
||||
HealBot_Integrations_UnitXP_Active = false;
|
||||
HealBot_AddDebug("UnitXP Integration: DISABLED");
|
||||
end
|
||||
|
||||
@@ -21,6 +21,7 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
|
||||
* `/hb` - Toggles the main HealBot panel on and off
|
||||
* `/hb options` - Toggles the HealBot options panel on and off
|
||||
* `/hb reset` - Resets the contents of the main HealBot panel
|
||||
* `/hb debug` - Toggles in-game debug message output to the main chat frame
|
||||
|
||||
### Key Features & Current Functionality
|
||||
* **MVC & Observer Architecture:** High-performance, reactive engine that updates frames dynamically on state changes, drastically reducing CPU and memory overhead. Features memory recycling pool and event loop decoupling for zero-stutter combat.
|
||||
@@ -54,6 +55,7 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
|
||||
* **Performance Fix - Frame Rendering** - Eliminated redundant UI layout recalculations in `HealBot_Action_EnableButton`. The UI no longer forces `SetFont`, `SetWidth`, `SetHeight`, and `GetGlobal` lookups on every single combat tick (which previously caused 4,000+ layout updates per second in 40-man raids).
|
||||
* **Performance Fix - Range Checking** - Greatly reduced CPU stutter caused by range calculations. `HealBot_Range_Check` now caches map positioning math and API calls per-frame, preventing the addon from calculating the exact same `math.sqrt` distance up to 5 times per unit during heavy combat.
|
||||
* **Performance Fix - Unit ID Lookup** - Optimized `HealBot_FindUnitID` by pre-allocating raid unit tokens, preventing massive string concatenation and garbage collection spam during high-frequency combat events like `CHAT_MSG_ADDON` (HealComm).
|
||||
* **Debug Output Command** - Added `/hb debug` (or `/hb dbg`) slash command to toggle real-time debug message printing directly into the standard chat frame without requiring custom chat channels.
|
||||
|
||||
**v1.7.3**
|
||||
* **Performance Fix - Table Pooling Part 2** - Fixed remaining un-pooled table allocations in layout updates, macro parsing, nampower integration, and aura tracking by utilizing HealBot_GetTable().
|
||||
|
||||
Reference in New Issue
Block a user