Rename sync functions and drop redundant GetMarkerDef

Rename SetMarkerDef → SetMarkerSync, ClearMarkerDef → ClearMarkerSync
to clarify their purpose. Remove GetMarkerDef from the table since
GetWorldMarker is now a public global.
This commit is contained in:
MarcelineVQ
2026-03-07 14:13:41 -08:00
parent 1e8091fcb5
commit 9d51ff1c77
2 changed files with 8 additions and 9 deletions
+5 -5
View File
@@ -18,7 +18,7 @@ BINDING_HEADER_WORLDMARKERS = "World Markers"
--
-- Permission model: ALL permission checks are enforced DLL-side.
-- WorldMarker/ClearWorldMarker: DLL checks local player is leader/assist.
-- SetMarkerDef/ClearMarkerDef: DLL checks sender name against roster.
-- SetMarkerSync/ClearMarkerSync: DLL checks sender name against roster.
-- CanSetWorldMarker(): DLL returns 1 if local player has permission.
-- =============================================================================
@@ -236,7 +236,7 @@ local function onAddonMessage(prefix, message, channel, sender)
end
local idx, x, y, z, areaId = parseMarkerFields(parts)
if idx then
WorldMarkers.SetMarkerDef(idx, x, y, z, areaId, sender)
WorldMarkers.SetMarkerSync(idx, x, y, z, areaId, sender)
end
return
end
@@ -244,15 +244,15 @@ local function onAddonMessage(prefix, message, channel, sender)
if cmd == "P" then
local idx, x, y, z, areaId = parseMarkerFields(parts)
if idx then
WorldMarkers.SetMarkerDef(idx, x, y, z, areaId, sender)
WorldMarkers.SetMarkerSync(idx, x, y, z, areaId, sender)
end
elseif cmd == "C" then
local idx = tonumber(parts[2])
if idx then
WorldMarkers.ClearMarkerDef(idx, sender)
WorldMarkers.ClearMarkerSync(idx, sender)
end
elseif cmd == "CA" then
WorldMarkers.ClearMarkerDef(sender)
WorldMarkers.ClearMarkerSync(sender)
end
end