Rename embedded addons to WeirdUtils_<name> namespace
Prefix all addon folder names with WeirdUtils_ to avoid collisions with real addons. Rename SavedVariables global from UI_MinimapIcons to WeirdUtils_MinimapIconsSettings.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
## Interface: 11200
|
||||
## Title: Interact
|
||||
## Title: WeirdUtils_Interact
|
||||
## Notes: Nearest NPC/object interaction and bulk looting
|
||||
## Version: 1.0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Interface: 11200
|
||||
## Title: LogSessions
|
||||
## Title: WeirdUtils_LogSessions
|
||||
## Notes: Session-based combat and chat log management
|
||||
## Version: 1.0
|
||||
|
||||
|
||||
+6
-6
@@ -144,12 +144,12 @@ const EmbedModule = struct {
|
||||
};
|
||||
|
||||
const embed_modules = [_]EmbedModule{
|
||||
.{ .option = "screenshot", .addon_name = "Screenshot", .addon_files_opt = "screenshot_addon_files" },
|
||||
.{ .option = "interact", .addon_name = "Interact", .addon_files_opt = "interact_addon_files" },
|
||||
.{ .option = "outline", .addon_name = "Outline", .addon_files_opt = "outline_addon_files" },
|
||||
.{ .option = "worldmarkers", .addon_name = "WorldMarkers", .addon_files_opt = "worldmarkers_addon_files", .asset_files_opt = "worldmarkers_asset_files" },
|
||||
.{ .option = "logsessions", .addon_name = "LogSessions", .addon_files_opt = "logsessions_addon_files" },
|
||||
.{ .option = "minimapicons", .addon_name = "MinimapIcons", .addon_files_opt = "minimapicons_addon_files", .asset_files_opt = "minimapicons_asset_files" },
|
||||
.{ .option = "screenshot", .addon_name = "WeirdUtils_Screenshot", .addon_files_opt = "screenshot_addon_files" },
|
||||
.{ .option = "interact", .addon_name = "WeirdUtils_Interact", .addon_files_opt = "interact_addon_files" },
|
||||
.{ .option = "outline", .addon_name = "WeirdUtils_Outline", .addon_files_opt = "outline_addon_files" },
|
||||
.{ .option = "worldmarkers", .addon_name = "WeirdUtils_WorldMarkers", .addon_files_opt = "worldmarkers_addon_files", .asset_files_opt = "worldmarkers_asset_files" },
|
||||
.{ .option = "logsessions", .addon_name = "WeirdUtils_LogSessions", .addon_files_opt = "logsessions_addon_files" },
|
||||
.{ .option = "minimapicons", .addon_name = "WeirdUtils_MinimapIcons", .addon_files_opt = "minimapicons_addon_files", .asset_files_opt = "minimapicons_asset_files" },
|
||||
};
|
||||
|
||||
/// Extract filename from a path like "markers/addon/Foo.lua" → "Foo.lua"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Interface: 11200
|
||||
## Title: WorldMarkers
|
||||
## Title: WeirdUtils_WorldMarkers
|
||||
## Notes: Client-side world markers
|
||||
## Version: 1.0
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ Dynamic arrays (each: capacity/count/data_ptr/growth at 3 dword intervals):
|
||||
|
||||
`LoadAddonTOC` reads the TOC file via `LoadFileWithTextureResourceFallback`, which our `loadFileDetour` already intercepts. So calling `LoadAddonTOC("MinimapIcons")` will:
|
||||
1. Hit our file hook, serve the embedded TOC content
|
||||
2. Parse `## SavedVariablesPerCharacter: UI_MinimapIcons`
|
||||
2. Parse `## SavedVariablesPerCharacter: WeirdUtils_MinimapIconsSettings`
|
||||
3. Register the addon in the hash table with the variable name at +0x78/7c/80
|
||||
|
||||
Hook `SetupAddonProcessing` (0x0051c740). After calling the original (which runs `ProcessAddonDirectory` and initializes the addon system), call `LoadAddonTOC` for each DLL-embedded addon. This ensures:
|
||||
|
||||
@@ -112,7 +112,7 @@ local NPC_CATEGORIES = {
|
||||
-- NPC tracking state (persisted per-character via SavedVariablesPerCharacter)
|
||||
-- =============================================================================
|
||||
|
||||
local activeNpcCategories = {} -- name -> 1/nil, loaded from UI_MinimapIcons
|
||||
local activeNpcCategories = {} -- name -> 1/nil, loaded from WeirdUtils_MinimapIconsSettings
|
||||
|
||||
-- Sync DLL tracking state with addon toggle state.
|
||||
-- Each category gets its own DLL call. Categories with a subnameFilter
|
||||
@@ -172,7 +172,7 @@ end
|
||||
-- Dropdown menu
|
||||
-- =============================================================================
|
||||
|
||||
local dropdown = CreateFrame("Frame", "MinimapIconsDropDown", UIParent, "UIDropDownMenuTemplate")
|
||||
local dropdown = CreateFrame("Frame", "WeirdUtils_MinimapIconsDropDown", UIParent, "UIDropDownMenuTemplate")
|
||||
|
||||
UIDropDownMenu_Initialize(dropdown, function()
|
||||
-- Spell tracking section
|
||||
@@ -232,7 +232,7 @@ UIDropDownMenu_Initialize(dropdown, function()
|
||||
else
|
||||
activeNpcCategories[catName] = 1
|
||||
end
|
||||
UI_MinimapIcons = activeNpcCategories
|
||||
WeirdUtils_MinimapIconsSettings = activeNpcCategories
|
||||
updateDllTracking()
|
||||
end
|
||||
UIDropDownMenu_AddButton(info)
|
||||
@@ -317,15 +317,15 @@ events:RegisterEvent("PLAYER_AURAS_CHANGED")
|
||||
|
||||
events:SetScript("OnEvent", function()
|
||||
if event == "VARIABLES_LOADED" then
|
||||
if UI_MinimapIcons then
|
||||
activeNpcCategories = UI_MinimapIcons
|
||||
if WeirdUtils_MinimapIconsSettings then
|
||||
activeNpcCategories = WeirdUtils_MinimapIconsSettings
|
||||
else
|
||||
for _, cat in ipairs(NPC_CATEGORIES) do
|
||||
if cat.default then
|
||||
activeNpcCategories[cat.name] = 1
|
||||
end
|
||||
end
|
||||
UI_MinimapIcons = activeNpcCategories
|
||||
WeirdUtils_MinimapIconsSettings = activeNpcCategories
|
||||
end
|
||||
updateDllTracking()
|
||||
elseif event == "PLAYER_LOGIN" or event == "SPELLS_CHANGED" then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Interface: 11200
|
||||
## Title: MinimapIcons
|
||||
## Title: WeirdUtils_MinimapIcons
|
||||
## Notes: Minimap tracking spell dropdown
|
||||
## Version: 1.0
|
||||
## SavedVariablesPerCharacter: UI_MinimapIcons
|
||||
## SavedVariablesPerCharacter: WeirdUtils_MinimapIconsSettings
|
||||
|
||||
MinimapIcons.lua
|
||||
@@ -1,5 +1,5 @@
|
||||
## Interface: 11200
|
||||
## Title: Outline
|
||||
## Title: WeirdUtils_Outline
|
||||
## Notes: Screen-space outline rendering for targets, raid marks, and corpses
|
||||
## Version: 1.0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Interface: 11200
|
||||
## Title: Screenshot
|
||||
## Title: WeirdUtils_Screenshot
|
||||
## Notes: PNG screenshot capture with configurable compression
|
||||
## Version: 1.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user