-- Ensure DrustWaypoints is defined
if not DrustWaypoints or type(DrustWaypoints) ~= "table" then
    DrustWaypoints = {}
    --print("Warning: DrustWaypoints table is missing or not loaded. Using an empty table.")
end

-- Debug: Ensure Waypoints parts exist
if not DrustWaypointsPart1 then
    print("Error: DrustWaypointsPart1 is not defined.")
end

if not DrustWaypointsPart2 then
    print("Error: DrustWaypointsPart2 is not defined.")
end

-- Merge Waypoint Parts
for _, part in ipairs({DrustWaypointsPart1, DrustWaypointsPart2}) do
    if part and type(part) == "table" then
        for _, achievement in ipairs(part) do
            table.insert(DrustWaypoints, achievement)
        end
    else
        print("Warning: One of the DrustWaypoints parts is missing or invalid.")
    end
end


-- Debugging to confirm the merge
print("DrustWaypoints initialized with " .. #DrustWaypoints .. " achievements.")

local metaTracker = LibStub("MetaTracker")
metaTracker:RegisterExpansion(DrustWaypoints, "Farewell to Arms")