View Single Post
09/22/21, 09:12 PM   #8
AlbinoPython
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 24
Sharlikran's life is gonna get a little easier
Code:
function GetSkyshards()
  local Skyshards = {}
  local ZoneId = GetZoneId(GetUnitZoneIndex("player"))
  for i = 1, GetNumSkyshardsInZone(ZoneId) do -- This may start at 0 idk rn
    local ShardId = GetZoneSkyshardId(ZoneId, i)
    local X, Y, _OnCurrentMap = GetNormalizedPositionForSkyshardId(ShardId)
    if X >= 0 and X <= 1 and Y >= 0 and Y <= 1 then
      local Status = GetSkyshardDiscoveryStatus(ShardId)
      if Status == SKYSHARD_DISCOVERY_STATUS_ACQUIRED then
        -- Discovered
      else
        -- Undiscovered
      end
    end
  end

  return Skyshards
end
  Reply With Quote