Markers: client-side world object system using CreateGameObject. Places M2 models at arbitrary world positions via Lua commands (/mark test, /mark pos). Includes embedded addon, xyz.m2/blp assets served from DLL memory, position helpers from unit movement struct, and object lifecycle management (create, cleanup, reposition, alpha, animation). Framecrash: stub module with reference to crash at 0x007A2452. Console: debug output via AllocConsole/WriteConsoleA, compiles out entirely in non-Debug builds. Used by markers and file serve logging. Build: markers added to feature flag matrix and all-variants step. Main: conditional markers import, Lua function registration, embedded addon + asset file serving, console init/deinit lifecycle. Outline README: added misc planned features and debug mode notes.
47 lines
1.5 KiB
Lua
47 lines
1.5 KiB
Lua
-- Markers addon (embedded in DLL, loaded from memory)
|
|
-- Part of WeirdUtils - only loaded when markers module is compiled
|
|
|
|
MARKERS_VERSION = 1
|
|
|
|
BINDING_HEADER_MARKERS = "Markers"
|
|
|
|
local frame = CreateFrame("Frame")
|
|
frame:RegisterEvent("ADDON_LOADED")
|
|
frame:RegisterEvent("PLAYER_LOGIN")
|
|
|
|
frame:SetScript("OnEvent", function()
|
|
if event == "PLAYER_LOGIN" then
|
|
DEFAULT_CHAT_FRAME:AddMessage("|cff00ff00Markers|r v" .. MARKERS_VERSION .. " loaded")
|
|
end
|
|
end)
|
|
|
|
SLASH_MARKERS1 = "/markers"
|
|
SLASH_MARKERS2 = "/mark"
|
|
SlashCmdList["MARKERS"] = function(msg)
|
|
msg = string.lower(msg or "")
|
|
|
|
if msg == "" or msg == "help" then
|
|
DEFAULT_CHAT_FRAME:AddMessage("|cff00ff00Markers|r commands:")
|
|
DEFAULT_CHAT_FRAME:AddMessage(" /mark test - Toggle test marker at player position")
|
|
DEFAULT_CHAT_FRAME:AddMessage(" /mark pos - Show player position")
|
|
DEFAULT_CHAT_FRAME:AddMessage(" /mark on - Create test marker")
|
|
DEFAULT_CHAT_FRAME:AddMessage(" /mark off - Destroy test marker")
|
|
|
|
elseif msg == "test" or msg == "toggle" then
|
|
TestMarkerToggle()
|
|
|
|
elseif msg == "on" or msg == "create" then
|
|
TestMarkerCreate()
|
|
|
|
elseif msg == "off" or msg == "destroy" then
|
|
TestMarkerDestroy()
|
|
|
|
elseif msg == "pos" or msg == "position" then
|
|
local x, y, z = GetPlayerPosition()
|
|
DEFAULT_CHAT_FRAME:AddMessage(string.format("Position: %.2f, %.2f, %.2f", x, y, z))
|
|
|
|
else
|
|
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000Unknown command:|r " .. msg)
|
|
end
|
|
end
|