Move permission checks DLL-side: canSetMarkers, senderHasPermission, senderInGroup
Replace Lua-side permission checks with direct memory reads in the DLL. All marker mutation functions now verify sender identity against the raid roster / party leader GUID without touching Lua state. - Add getPlayerGUID (0x468550), getNameFromGUID (name cache at 0xc0e228) - Add canSetMarkers: checks local player is leader/officer via roster - Add senderHasPermission: verifies sender name against roster ranks - Add senderInGroup: weaker check for sync relay (any rank) - WorldMarker/ClearWorldMarker return 1/nil for addon feedback - SetMarkerDef/ClearMarkerDef take sender name param, verify DLL-side - SetMarkerDefSync: dual check (local=leader + sender in group) - CanSetMarkers() Lua function for addon broadcast decisions - Remove Lua-side canSetMarkers/senderHasPermission from Markers.lua - Add offsets: LEADER_GUID, RAID_ROSTER_ARRAY, RAID_MEMBER_COUNT, etc.
This commit is contained in:
+2
-2
@@ -111,12 +111,12 @@ fn registerLuaFunctions() void {
|
||||
if (build_opts.markers and markers.isActive()) {
|
||||
registerFunction("WorldMarker", @intFromPtr(&markers.luaWorldMarker));
|
||||
registerFunction("ClearWorldMarker", @intFromPtr(&markers.luaClearWorldMarker));
|
||||
registerFunction("GetPlayerPosition", @intFromPtr(&markers.luaGetPlayerPosition));
|
||||
registerFunction("DistanceToMark", @intFromPtr(&markers.luaDistanceToMark));
|
||||
registerFunction("SetMarkerDef", @intFromPtr(&markers.luaSetMarkerDef));
|
||||
registerFunction("SetMarkerDefSync", @intFromPtr(&markers.luaSetMarkerDefSync));
|
||||
registerFunction("ClearMarkerDef", @intFromPtr(&markers.luaClearMarkerDef));
|
||||
registerFunction("GetMarkerDef", @intFromPtr(&markers.luaGetMarkerDef));
|
||||
registerFunction("GetCurrentAreaId", @intFromPtr(&markers.luaGetCurrentAreaId));
|
||||
registerFunction("CanSetMarkers", @intFromPtr(&markers.luaCanSetMarkers));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user