Full state of the live install: prodigeomix fork content plus local OctoWoW patches (MC/Onyxia/ZG/Karazhan timers, Golemagg, Thaurissan, aura-scan perf, world markers), and the BWL changes from raid feedback: - Razorgore: exact egg count via SuperWoW cast events, count synced - Firemaw: Flame Buffet timer on by default, retimed from logs - Blackwing Alchemist: assist marking, no Skull/Cross or mob marks, mark follows the fire chain - Wyrmguard/Overseer: vulnerability read from the buff, one bar per mob with its raid mark and click-to-target - Bars: BigWigs_SetBarRaidMark event to show a raid mark beside a bar Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
348 lines
11 KiB
Diff
348 lines
11 KiB
Diff
From 4ac4e84bfe28f860749e8f468ee5096198dadced Mon Sep 17 00:00:00 2001
|
|
From: Hapto <alex-88-3@hotmail.fr>
|
|
Date: Sun, 18 Oct 2026 01:53:09 +0200
|
|
Subject: [PATCH] Add World Markers plugin (worldmarkers.dll) with a module API
|
|
|
|
New plugin Plugins/WorldMarkers.lua lets boss modules place ground
|
|
markers through WeirdUtils' worldmarkers.dll:
|
|
|
|
self:WorldMarker(index, unit) / self:WorldMarker(index, x, y, z)
|
|
self:TimedWorldMarker(duration, index, ...)
|
|
self:ClearWorldMarker(index), self:ClearWorldMarkers()
|
|
self:CanPlaceWorldMarkers()
|
|
|
|
The DLL syncs markers to the group, so only one client places them:
|
|
the raid leader by default ("assist" option lets any leader/assist
|
|
place). Requires the DLL and leader/assist permission; silently does
|
|
nothing otherwise. Markers placed by a module are cleared when the
|
|
fight ends (option). Includes a Test button under Plugins > World
|
|
Markers. No boss module uses it yet.
|
|
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Claude-Session: https://claude.ai/code/session_01WJLQrM2ob1poW3peUyML4T
|
|
---
|
|
BigWigs.toc | 1 +
|
|
Core.lua | 33 ++++++
|
|
Plugins/WorldMarkers.lua | 246 +++++++++++++++++++++++++++++++++++++++
|
|
3 files changed, 280 insertions(+)
|
|
create mode 100644 Plugins/WorldMarkers.lua
|
|
|
|
diff --git a/BigWigs.toc b/BigWigs.toc
|
|
index c18192a..2a5dc4e 100644
|
|
--- a/BigWigs.toc
|
|
+++ b/BigWigs.toc
|
|
@@ -65,6 +65,7 @@ Plugins\Sound.lua
|
|
Plugins\RaidWarn.lua
|
|
Plugins\BossBlock.lua
|
|
Plugins\RaidIcon.lua
|
|
+Plugins\WorldMarkers.lua
|
|
Plugins\Range.lua
|
|
Plugins\CommonAuras.lua
|
|
Plugins\Version.lua
|
|
diff --git a/Core.lua b/Core.lua
|
|
index af07d4b..02efb35 100644
|
|
--- a/Core.lua
|
|
+++ b/Core.lua
|
|
@@ -481,6 +481,10 @@ function BigWigs.modulePrototype:Disengage()
|
|
|
|
self:RemoveProximity()
|
|
|
|
+ if BigWigsWorldMarkers then
|
|
+ BigWigsWorldMarkers:OnFightEnd(self)
|
|
+ end
|
|
+
|
|
if self.initialPlayerMarks then
|
|
for player in pairs(self.initialPlayerMarks) do
|
|
self:RestoreInitialRaidTargetForPlayer(player)
|
|
@@ -988,6 +992,35 @@ function BigWigs.modulePrototype:RemoveIcon()
|
|
self:TriggerEvent("BigWigs_RemoveRaidIcon")
|
|
end
|
|
|
|
+-- World Markers (worldmarkers.dll, see Plugins/WorldMarkers.lua)
|
|
+-- index: 1 blue square, 2 green triangle, 3 purple diamond, 4 red cross, 5 yellow star
|
|
+-- self:WorldMarker(index, unit) or self:WorldMarker(index, x, y, z)
|
|
+function BigWigs.modulePrototype:WorldMarker(index, a, b, c)
|
|
+ if BigWigsWorldMarkers then
|
|
+ return BigWigsWorldMarkers:Place(self, index, a, b, c)
|
|
+ end
|
|
+end
|
|
+-- same, cleared automatically after `duration` seconds
|
|
+function BigWigs.modulePrototype:TimedWorldMarker(duration, index, a, b, c)
|
|
+ if BigWigsWorldMarkers then
|
|
+ return BigWigsWorldMarkers:PlaceTimed(self, duration, index, a, b, c)
|
|
+ end
|
|
+end
|
|
+function BigWigs.modulePrototype:ClearWorldMarker(index)
|
|
+ if BigWigsWorldMarkers then
|
|
+ BigWigsWorldMarkers:Clear(self, index)
|
|
+ end
|
|
+end
|
|
+function BigWigs.modulePrototype:ClearWorldMarkers()
|
|
+ if BigWigsWorldMarkers then
|
|
+ BigWigsWorldMarkers:ClearOwner(self)
|
|
+ end
|
|
+end
|
|
+-- true if this client would actually place markers (dll loaded, option on, allowed placer)
|
|
+function BigWigs.modulePrototype:CanPlaceWorldMarkers()
|
|
+ return BigWigsWorldMarkers and BigWigsWorldMarkers:CanPlace() or false
|
|
+end
|
|
+
|
|
function BigWigs.modulePrototype:WarningSign(icon, duration, force, text)
|
|
self:TriggerEvent("BigWigs_ShowWarningSign", "Interface\\Icons\\" .. icon, duration, force, text)
|
|
end
|
|
diff --git a/Plugins/WorldMarkers.lua b/Plugins/WorldMarkers.lua
|
|
new file mode 100644
|
|
index 0000000..291015d
|
|
--- /dev/null
|
|
+++ b/Plugins/WorldMarkers.lua
|
|
@@ -0,0 +1,246 @@
|
|
+assert(BigWigs, "BigWigs not found!")
|
|
+
|
|
+-- World Markers plugin
|
|
+--
|
|
+-- Lets boss modules place ground markers through worldmarkers.dll
|
|
+-- (WeirdUtils, https://codeberg.org/MarcelineVQ/WeirdUtils).
|
|
+-- The DLL syncs placed markers to the whole group itself, so only one
|
|
+-- BigWigs user needs to place them: by default the raid/party leader.
|
|
+--
|
|
+-- DLL API used:
|
|
+-- WorldMarker(index) -- at cursor (not used by modules)
|
|
+-- WorldMarker(index, unit) -- at a unit's position
|
|
+-- WorldMarker(index, x, y, z) -- at world coordinates
|
|
+-- ClearWorldMarker([index]) -- clear one / all
|
|
+-- GetWorldMarker(index) -- x, y, z, areaId
|
|
+-- CanSetWorldMarker() -- 1 if we are leader/assist
|
|
+-- Marker indexes: 1 blue square, 2 green triangle, 3 purple diamond,
|
|
+-- 4 red cross, 5 yellow star.
|
|
+--
|
|
+-- Module API (see Core.lua):
|
|
+-- self:WorldMarker(index, unit) / (index, x, y, z)
|
|
+-- self:TimedWorldMarker(duration, index, unit) / (duration, index, x, y, z)
|
|
+-- self:ClearWorldMarker(index)
|
|
+-- self:ClearWorldMarkers() -- every marker this module placed
|
|
+-- self:CanPlaceWorldMarkers()
|
|
+-- Markers placed by a module are cleared automatically when it disengages.
|
|
+
|
|
+local L = AceLibrary("AceLocale-2.2"):new("BigWigsWorldMarkers")
|
|
+
|
|
+L:RegisterTranslations("enUS", function()
|
|
+ return {
|
|
+ ["World Markers"] = true,
|
|
+ ["worldmarkers"] = true,
|
|
+ ["Options for World Markers (requires worldmarkers.dll)."] = true,
|
|
+
|
|
+ ["place"] = true,
|
|
+ ["Place World Markers"] = true,
|
|
+ ["Let boss modules place World Markers for mechanics. Only works for the raid leader or assists, and needs worldmarkers.dll."] = true,
|
|
+
|
|
+ ["placer"] = true,
|
|
+ ["Who places markers"] = true,
|
|
+ ["Markers are synced to the whole raid by the DLL, so only one person needs to place them. 'leader': only the raid leader places them. 'assist': any leader or assist with this option places them."] = true,
|
|
+ ["leader"] = true,
|
|
+ ["assist"] = true,
|
|
+
|
|
+ ["clear"] = true,
|
|
+ ["Clear on fight end"] = true,
|
|
+ ["Clear markers placed by a boss module when the fight ends (kill or wipe)."] = true,
|
|
+
|
|
+ ["test"] = true,
|
|
+ ["Test"] = true,
|
|
+ ["Place the blue square on yourself for 5 seconds."] = true,
|
|
+
|
|
+ ["worldmarkers.dll is not loaded."] = true,
|
|
+ ["You are not allowed to place World Markers (leader/assist only)."] = true,
|
|
+ }
|
|
+end)
|
|
+
|
|
+----------------------------------
|
|
+-- Module Declaration --
|
|
+----------------------------------
|
|
+
|
|
+BigWigsWorldMarkers = BigWigs:NewModule(L["World Markers"])
|
|
+BigWigsWorldMarkers.revision = 1
|
|
+BigWigsWorldMarkers.defaultDB = {
|
|
+ place = true,
|
|
+ placer = "leader",
|
|
+ clear = true,
|
|
+}
|
|
+BigWigsWorldMarkers.consoleCmd = L["worldmarkers"]
|
|
+BigWigsWorldMarkers.consoleOptions = {
|
|
+ type = "group",
|
|
+ name = L["World Markers"],
|
|
+ desc = L["Options for World Markers (requires worldmarkers.dll)."],
|
|
+ args = {
|
|
+ [L["place"]] = {
|
|
+ type = "toggle",
|
|
+ name = L["Place World Markers"],
|
|
+ desc = L["Let boss modules place World Markers for mechanics. Only works for the raid leader or assists, and needs worldmarkers.dll."],
|
|
+ order = 1,
|
|
+ get = function() return BigWigsWorldMarkers.db.profile.place end,
|
|
+ set = function(v) BigWigsWorldMarkers.db.profile.place = v end,
|
|
+ },
|
|
+ [L["placer"]] = {
|
|
+ type = "text",
|
|
+ name = L["Who places markers"],
|
|
+ desc = L["Markers are synced to the whole raid by the DLL, so only one person needs to place them. 'leader': only the raid leader places them. 'assist': any leader or assist with this option places them."],
|
|
+ order = 2,
|
|
+ get = function() return BigWigsWorldMarkers.db.profile.placer end,
|
|
+ set = function(v) BigWigsWorldMarkers.db.profile.placer = v end,
|
|
+ validate = { "leader", "assist" },
|
|
+ },
|
|
+ [L["clear"]] = {
|
|
+ type = "toggle",
|
|
+ name = L["Clear on fight end"],
|
|
+ desc = L["Clear markers placed by a boss module when the fight ends (kill or wipe)."],
|
|
+ order = 3,
|
|
+ get = function() return BigWigsWorldMarkers.db.profile.clear end,
|
|
+ set = function(v) BigWigsWorldMarkers.db.profile.clear = v end,
|
|
+ },
|
|
+ [L["test"]] = {
|
|
+ type = "execute",
|
|
+ name = L["Test"],
|
|
+ desc = L["Place the blue square on yourself for 5 seconds."],
|
|
+ order = 4,
|
|
+ func = function() BigWigsWorldMarkers:Test() end,
|
|
+ },
|
|
+ }
|
|
+}
|
|
+
|
|
+-- index -> module that placed it (or true for the test marker)
|
|
+local placedBy = {}
|
|
+
|
|
+------------------------------
|
|
+-- Helpers --
|
|
+------------------------------
|
|
+
|
|
+function BigWigsWorldMarkers:IsAvailable()
|
|
+ return type(WorldMarker) == "function" and type(ClearWorldMarker) == "function"
|
|
+end
|
|
+
|
|
+local function hasPermission()
|
|
+ if type(CanSetWorldMarker) == "function" then
|
|
+ local ok = CanSetWorldMarker()
|
|
+ return ok and ok ~= 0
|
|
+ end
|
|
+ return IsRaidLeader() or IsRaidOfficer() or IsPartyLeader()
|
|
+end
|
|
+
|
|
+local function isLeader()
|
|
+ if GetNumRaidMembers() > 0 then
|
|
+ return IsRaidLeader()
|
|
+ end
|
|
+ return IsPartyLeader()
|
|
+end
|
|
+
|
|
+function BigWigsWorldMarkers:CanPlace()
|
|
+ if not self.db.profile.place or not self:IsAvailable() then
|
|
+ return false
|
|
+ end
|
|
+ if GetNumRaidMembers() == 0 and GetNumPartyMembers() == 0 then
|
|
+ return false
|
|
+ end
|
|
+ if not hasPermission() then
|
|
+ return false
|
|
+ end
|
|
+ if self.db.profile.placer ~= "assist" and not isLeader() then
|
|
+ return false
|
|
+ end
|
|
+ return true
|
|
+end
|
|
+
|
|
+local function validIndex(index)
|
|
+ return type(index) == "number" and index >= 1 and index <= 5
|
|
+end
|
|
+
|
|
+local function timerId(index)
|
|
+ return "BigWigsWorldMarkerClear" .. index
|
|
+end
|
|
+
|
|
+------------------------------
|
|
+-- Placement --
|
|
+------------------------------
|
|
+
|
|
+-- Place marker `index` at a unit ("player", "raid12", "target", ...) or at x, y, z.
|
|
+-- Returns x, y, z, areaId on success, nil otherwise.
|
|
+function BigWigsWorldMarkers:Place(owner, index, a, b, c)
|
|
+ if not validIndex(index) or not self:CanPlace() then
|
|
+ return nil
|
|
+ end
|
|
+
|
|
+ local x, y, z, areaId
|
|
+ if type(a) == "number" and type(b) == "number" and type(c) == "number" then
|
|
+ x, y, z, areaId = WorldMarker(index, a, b, c)
|
|
+ elseif type(a) == "string" then
|
|
+ if not UnitExists(a) then
|
|
+ return nil
|
|
+ end
|
|
+ x, y, z, areaId = WorldMarker(index, a)
|
|
+ else
|
|
+ return nil
|
|
+ end
|
|
+
|
|
+ -- the DLL returns nil (no permission) or a single negative code (failed)
|
|
+ if x == nil or (y == nil and type(x) == "number" and x < 0) then
|
|
+ return nil
|
|
+ end
|
|
+
|
|
+ self:CancelScheduledEvent(timerId(index))
|
|
+ placedBy[index] = owner or true
|
|
+ return x, y, z, areaId
|
|
+end
|
|
+
|
|
+function BigWigsWorldMarkers:PlaceTimed(owner, duration, index, a, b, c)
|
|
+ local x, y, z, areaId = self:Place(owner, index, a, b, c)
|
|
+ if x and type(duration) == "number" and duration > 0 then
|
|
+ self:ScheduleEvent(timerId(index), self.Clear, duration, self, owner, index)
|
|
+ end
|
|
+ return x, y, z, areaId
|
|
+end
|
|
+
|
|
+-- Clear marker `index` if `owner` placed it (owner nil: clear regardless).
|
|
+function BigWigsWorldMarkers:Clear(owner, index)
|
|
+ if not validIndex(index) or not self:IsAvailable() then
|
|
+ return
|
|
+ end
|
|
+ if owner and placedBy[index] ~= owner then
|
|
+ return
|
|
+ end
|
|
+ self:CancelScheduledEvent(timerId(index))
|
|
+ if placedBy[index] and hasPermission() then
|
|
+ ClearWorldMarker(index)
|
|
+ end
|
|
+ placedBy[index] = nil
|
|
+end
|
|
+
|
|
+-- Clear every marker placed by `owner`.
|
|
+function BigWigsWorldMarkers:ClearOwner(owner)
|
|
+ for index = 1, 5 do
|
|
+ if placedBy[index] == owner then
|
|
+ self:Clear(owner, index)
|
|
+ end
|
|
+ end
|
|
+end
|
|
+
|
|
+function BigWigsWorldMarkers:OnFightEnd(owner)
|
|
+ if self.db.profile.clear then
|
|
+ self:ClearOwner(owner)
|
|
+ end
|
|
+end
|
|
+
|
|
+function BigWigsWorldMarkers:Test()
|
|
+ if not self:IsAvailable() then
|
|
+ BigWigs:Print(L["worldmarkers.dll is not loaded."])
|
|
+ return
|
|
+ end
|
|
+ if not hasPermission() then
|
|
+ BigWigs:Print(L["You are not allowed to place World Markers (leader/assist only)."])
|
|
+ return
|
|
+ end
|
|
+ local x = WorldMarker(1, "player")
|
|
+ if x and not (type(x) == "number" and x < 0) then
|
|
+ placedBy[1] = true
|
|
+ self:ScheduleEvent(timerId(1), self.Clear, 5, self, true, 1)
|
|
+ end
|
|
+end
|
|
--
|
|
2.43.0
|
|
|