Quantcast

world ping no longer showing when hidden

Mikeprod [04-09-17 - 11:26]
world ping no longer showing when hidden
Filename
.gitmodules
Libs/LibArtifactData-1.0
Libs/LibArtifactData-1.0/.docmeta
Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
Libs/LibArtifactData-1.0/LibArtifactData-1.0.toc
Libs/LibArtifactData-1.0/README.md
Libs/LibArtifactData-1.0/pkgmeta.yaml
Libs/LibDataBroker-1.1
Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua
Libs/LibDataBroker-1.1/README.textile
modules/system.lua
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..abdc476
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "Libs/LibDataBroker-1.1"]
+	path = Libs/LibDataBroker-1.1
+	url = https://github.com/tekkub/libdatabroker-1-1.git
+[submodule "Libs/LibArtifactData-1.0"]
+	path = Libs/LibArtifactData-1.0
+	url = https://github.com/Rainrider/LibArtifactData-1.0.git
diff --git a/Libs/LibArtifactData-1.0 b/Libs/LibArtifactData-1.0
new file mode 160000
index 0000000..3e228e2
--- /dev/null
+++ b/Libs/LibArtifactData-1.0
@@ -0,0 +1 @@
+Subproject commit 3e228e2c0c679c53553ad29f8292d85008f517a2
diff --git a/Libs/LibArtifactData-1.0/.docmeta b/Libs/LibArtifactData-1.0/.docmeta
deleted file mode 100644
index 8b21e72..0000000
--- a/Libs/LibArtifactData-1.0/.docmeta
+++ /dev/null
@@ -1,4 +0,0 @@
--
-  type: markdown
-  input-file: README.md
-  output-page: Main
diff --git a/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua b/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
deleted file mode 100644
index 9e80b50..0000000
--- a/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
+++ /dev/null
@@ -1,525 +0,0 @@
-local MAJOR, MINOR = "LibArtifactData-1.0", 15
-
-assert(_G.LibStub, MAJOR .. " requires LibStub")
-local lib = _G.LibStub:NewLibrary(MAJOR, MINOR)
-if not lib then return end
-
-lib.callbacks = lib.callbacks or _G.LibStub("CallbackHandler-1.0"):New(lib)
-
-local Debug = function() end
-if _G.AdiDebug then
-	Debug = _G.AdiDebug:Embed({}, MAJOR)
-end
-
--- local store
-local artifacts = {}
-local equippedID, viewedID, activeID
-artifacts.knowledgeLevel = 0
-artifacts.knowledgeMultiplier = 1
-
--- constants
-local _G                       = _G
-local BACKPACK_CONTAINER       = _G.BACKPACK_CONTAINER
-local BANK_CONTAINER           = _G.BANK_CONTAINER
-local INVSLOT_MAINHAND         = _G.INVSLOT_MAINHAND
-local LE_ITEM_CLASS_ARMOR      = _G.LE_ITEM_CLASS_ARMOR
-local LE_ITEM_CLASS_WEAPON     = _G.LE_ITEM_CLASS_WEAPON
-local LE_ITEM_QUALITY_ARTIFACT = _G.LE_ITEM_QUALITY_ARTIFACT
-local NUM_BAG_SLOTS            = _G.NUM_BAG_SLOTS
-local NUM_BANKBAGSLOTS         = _G.NUM_BANKBAGSLOTS
-
--- blizzard api
-local aUI                              = _G.C_ArtifactUI
-local Clear                            = aUI.Clear
-local GetArtifactInfo                  = aUI.GetArtifactInfo
-local GetArtifactKnowledgeLevel        = aUI.GetArtifactKnowledgeLevel
-local GetArtifactKnowledgeMultiplier   = aUI.GetArtifactKnowledgeMultiplier
-local GetContainerItemInfo             = _G.GetContainerItemInfo
-local GetContainerNumSlots             = _G.GetContainerNumSlots
-local GetCostForPointAtRank            = aUI.GetCostForPointAtRank
-local GetCurrencyInfo                  = _G.GetCurrencyInfo
-local GetEquippedArtifactInfo          = aUI.GetEquippedArtifactInfo
-local GetInventoryItemEquippedUnusable = _G.GetInventoryItemEquippedUnusable
-local GetItemInfo                      = _G.GetItemInfo
-local GetNumObtainedArtifacts          = aUI.GetNumObtainedArtifacts
-local GetNumPurchasableTraits          = _G.MainMenuBar_GetNumArtifactTraitsPurchasableFromXP
-local GetNumRelicSlots                 = aUI.GetNumRelicSlots
-local GetPowerInfo                     = aUI.GetPowerInfo
-local GetPowers                        = aUI.GetPowers
-local GetRelicInfo                     = aUI.GetRelicInfo
-local GetRelicSlotType                 = aUI.GetRelicSlotType
-local GetSpellInfo                     = _G.GetSpellInfo
-local HasArtifactEquipped              = _G.HasArtifactEquipped
-local IsAtForge                        = aUI.IsAtForge
-local IsViewedArtifactEquipped         = aUI.IsViewedArtifactEquipped
-local SocketContainerItem              = _G.SocketContainerItem
-local SocketInventoryItem              = _G.SocketInventoryItem
-
--- lua api
-local select   = _G.select
-local strmatch = _G.string.match
-local tonumber = _G.tonumber
-
-local private = {} -- private space for the event handlers
-
-lib.frame = lib.frame or _G.CreateFrame("Frame")
-local frame = lib.frame
-frame:UnregisterAllEvents() -- deactivate old versions
-frame:SetScript("OnEvent", function(_, event, ...) private[event](event, ...) end)
-frame:RegisterEvent("PLAYER_ENTERING_WORLD")
-
-local function CopyTable(tbl)
-	if not tbl then return {} end
-	local copy = {};
-	for k, v in pairs(tbl) do
-		if ( type(v) == "table" ) then
-			copy[k] = CopyTable(v);
-		else
-			copy[k] = v;
-		end
-	end
-	return copy;
-end
-
-local function PrepareForScan()
-	frame:UnregisterEvent("ARTIFACT_UPDATE")
-	_G.UIParent:UnregisterEvent("ARTIFACT_UPDATE")
-
-	local ArtifactFrame = _G.ArtifactFrame
-	if ArtifactFrame and not ArtifactFrame:IsShown() then
-		ArtifactFrame:UnregisterEvent("ARTIFACT_UPDATE")
-	end
-end
-
-local function RestoreStateAfterScan()
-	frame:RegisterEvent("ARTIFACT_UPDATE")
-	_G.UIParent:RegisterEvent("ARTIFACT_UPDATE")
-
-	local ArtifactFrame = _G.ArtifactFrame
-	if ArtifactFrame and not ArtifactFrame:IsShown() then
-		Clear()
-		ArtifactFrame:RegisterEvent("ARTIFACT_UPDATE")
-	end
-end
-
-local function InformEquippedArtifactChanged(artifactID)
-	if artifactID ~= equippedID then
-		Debug("ARTIFACT_EQUIPPED_CHANGED", artifactID, equippedID)
-		lib.callbacks:Fire("ARTIFACT_EQUIPPED_CHANGED", artifactID, equippedID)
-		equippedID = artifactID
-	end
-end
-
-local function InformActiveArtifactChanged(artifactID)
-	local oldActiveID = activeID
-	if artifactID and not GetInventoryItemEquippedUnusable("player", INVSLOT_MAINHAND) then
-		activeID = artifactID
-	else
-		activeID = nil
-	end
-	if oldActiveID ~= activeID then
-		Debug("ARTIFACT_ACTIVE_CHANGED", activeID, oldActiveID)
-		lib.callbacks:Fire("ARTIFACT_ACTIVE_CHANGED", activeID, oldActiveID)
-	end
-end
-
-local function InformTraitsChanged(artifactID)
-	Debug("ARTIFACT_TRAITS_CHANGED", artifactID, artifacts[artifactID].traits)
-	lib.callbacks:Fire("ARTIFACT_TRAITS_CHANGED", artifactID, CopyTable(artifacts[artifactID].traits))
-end
-
-local function StoreArtifact(artifactID, name, icon, unspentPower, numRanksPurchased, numRanksPurchasable, power, maxPower, traits, relics, tier)
-	if not artifacts[artifactID] then
-		artifacts[artifactID] = {
-			name = name,
-			icon = icon,
-			unspentPower = unspentPower,
-			numRanksPurchased = numRanksPurchased,
-			numRanksPurchasable = numRanksPurchasable,
-			power = power,
-			maxPower = maxPower,
-			powerForNextRank = maxPower - power,
-			traits = traits,
-			relics = relics,
-			tier = tier or 1,
-		}
-		Debug("ARTIFACT_ADDED", artifactID, name)
-		lib.callbacks:Fire("ARTIFACT_ADDED", artifactID)
-	else
-		local current = artifacts[artifactID]
-		current.unspentPower = unspentPower
-		current.numRanksPurchased = numRanksPurchased -- numRanksPurchased does not include bonus traits from relics
-		current.numRanksPurchasable = numRanksPurchasable
-		current.power = power
-		current.maxPower = maxPower
-		current.powerForNextRank = maxPower - power
-		current.traits = traits
-		current.relics = relics
-		current.tier = tier or 1
-	end
-end
-
-local function ScanTraits(artifactID)
-	local traits = {}
-	local powers = GetPowers()
-
-	for i = 1, #powers do
-		local traitID = powers[i]
-		local info, _, currentRank, maxRank, bonusRanks, _, _, _, isStart, isGold, isFinal = GetPowerInfo(traitID)
-		local isPatch72 = type(info) == "table" -- NOTE: patch 7.2 compat
-		local spellID = isPatch72 and info.spellID or info
-		if (currentRank or info.currentRank) > 0 then
-			local name, _, icon = GetSpellInfo(spellID)
-			traits[#traits + 1] = {
-				traitID = traitID,
-				spellID = spellID,
-				name = name,
-				icon = icon,
-				currentRank = currentRank or info.currentRank,
-				maxRank = maxRank or info.maxRank,
-				bonusRanks = bonusRanks or info.maxRank,
-				isGold = isGold or isPatch72 and info.isGold,
-				isStart = isStart or isPatch72 and info.isStart,
-				isFinal = isFinal or isPatch72 and info.isFinal,
-				maxRanksFromTier = isPatch72 and info.numMaxRankBonusFromTier or 0,
-				tier = isPatch72 and info.tier or 1,
-			}
-		end
-	end
-
-	if artifactID then
-		artifacts[artifactID].traits = traits
-	end
-
-	return traits
-end
-
-local function ScanRelics(artifactID)
-	local relics = {}
-	for i = 1, GetNumRelicSlots() do
-		local slotType = GetRelicSlotType(i)
-		local lockedReason, name, icon, link = GetRelicInfo(i)
-		local isLocked = lockedReason and true or false
-		local itemID
-		if name then
-			itemID = strmatch(link, "item:(%d+):")
-		end
-
-		relics[i] = { type = slotType, isLocked = isLocked, name = name, icon = icon, itemID = itemID, link = link }
-	end
-
-	if artifactID then
-		artifacts[artifactID].relics = relics
-	end
-
-	return relics
-end
-
-local function GetArtifactKnowledge()
-	local lvl = GetArtifactKnowledgeLevel()
-	local mult = GetArtifactKnowledgeMultiplier()
-	if artifacts.knowledgeMultiplier ~= mult or artifacts.knowledgeLevel ~= lvl then
-		artifacts.knowledgeLevel = lvl
-		artifacts.knowledgeMultiplier = mult
-		Debug("ARTIFACT_KNOWLEDGE_CHANGED", lvl, mult)
-		lib.callbacks:Fire("ARTIFACT_KNOWLEDGE_CHANGED", lvl, mult)
-	end
-end
-
-local function GetViewedArtifactData()
-	GetArtifactKnowledge()
-	local itemID, _, name, icon, unspentPower, numRanksPurchased, _, _, _, _, _, _, tier = GetArtifactInfo() -- TODO: appearance stuff needed? altItemID ? NOTE: 7.2 compat
-	if not itemID then
-		Debug("|cffff0000ERROR:|r", "GetArtifactInfo() returned nil.")
-		return
-	end
-	viewedID = itemID
-	Debug("GetViewedArtifactData", name, itemID)
-	local numRanksPurchasable, power, maxPower = GetNumPurchasableTraits(numRanksPurchased, unspentPower, tier)
-	local traits = ScanTraits()
-	local relics = ScanRelics()
-	StoreArtifact(itemID, name, icon, unspentPower, numRanksPurchased, numRanksPurchasable, power, maxPower, traits, relics, tier)
-
-	if IsViewedArtifactEquipped() then
-		InformEquippedArtifactChanged(itemID)
-		InformActiveArtifactChanged(itemID)
-	end
-end
-
-local function ScanEquipped()
-	if HasArtifactEquipped() then
-		PrepareForScan()
-		SocketInventoryItem(INVSLOT_MAINHAND)
-		GetViewedArtifactData()
-		Clear()
-		RestoreStateAfterScan()
-		frame:UnregisterEvent("UNIT_INVENTORY_CHANGED")
-	end
-end
-
-local function ScanContainer(container, numObtained)
-	for slot = 1, GetContainerNumSlots(container) do
-		local _, _, _, quality, _, _, _, _, _, itemID = GetContainerItemInfo(container, slot)
-		if quality == LE_ITEM_QUALITY_ARTIFACT then
-			local classID = select(12, GetItemInfo(itemID))
-			if classID == LE_ITEM_CLASS_WEAPON or classID == LE_ITEM_CLASS_ARMOR then
-				Debug("ARTIFACT_FOUND", "in", container, slot)
-				SocketContainerItem(container, slot)
-				GetViewedArtifactData()
-				Clear()
-				if numObtained <= lib:GetNumObtainedArtifacts() then break end
-			end
-		end
-	end
-end
-
-local function IterateContainers(from, to, numObtained)
-	PrepareForScan()
-	for container = from, to do
-		ScanContainer(container, numObtained)
-		if numObtained <= lib:GetNumObtainedArtifacts() then break end
-	end
-	RestoreStateAfterScan()
-end
-
-local function ScanBank(numObtained)
-	if numObtained > lib:GetNumObtainedArtifacts() then
-		PrepareForScan()
-		ScanContainer(BANK_CONTAINER, numObtained)
-		RestoreStateAfterScan()
-	end
-	if numObtained > lib:GetNumObtainedArtifacts() then
-		IterateContainers(NUM_BAG_SLOTS + 1, NUM_BAG_SLOTS + NUM_BANKBAGSLOTS, numObtained)
-	end
-end
-
-function private.PLAYER_ENTERING_WORLD(event)
-	frame:UnregisterEvent(event)
-	frame:RegisterUnitEvent("UNIT_INVENTORY_CHANGED", "player")
-	frame:RegisterEvent("BAG_UPDATE_DELAYED")
-	frame:RegisterEvent("BANKFRAME_OPENED")
-	frame:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
-	frame:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
-	frame:RegisterEvent("ARTIFACT_CLOSE")
-	frame:RegisterEvent("ARTIFACT_XP_UPDATE")
-	frame:RegisterUnitEvent("PLAYER_SPECIALIZATION_CHANGED", "player")
-end
-
--- bagged artifact data becomes obtainable
-function private.BAG_UPDATE_DELAYED(event)
-	local numObtained = GetNumObtainedArtifacts()
-	if numObtained <= 0 then return end
-
-	-- prevent double-scanning if UNIT_INVENTORY_CHANGED fired first
-	-- UNIT_INVENTORY_CHANGED does not fire after /reload
-	if not equippedID and HasArtifactEquipped() then
-		ScanEquipped()
-	end
-
-	if numObtained > lib:GetNumObtainedArtifacts() then
-		IterateContainers(BACKPACK_CONTAINER, NUM_BAG_SLOTS, numObtained)
-	end
-
-	frame:UnregisterEvent(event)
-end
-
--- equipped artifact data becomes obtainable
-function private.UNIT_INVENTORY_CHANGED(event)
-	ScanEquipped(event)
-end
-
-function private.ARTIFACT_CLOSE()
-	viewedID = nil
-end
-
-function private.ARTIFACT_UPDATE(event, newItem)
-	Debug(event, newItem)
-	if newItem then
-		GetViewedArtifactData()
-	else
-		if not GetNumRelicSlots() then
-			Debug("|cffff0000ERROR:|r", "artifact data unobtainable.")
-			return
-		end
-		local newRelics = ScanRelics()
-		local oldRelics = artifacts[viewedID].relics
-
-		for i = 1, #newRelics do
-			local newRelic = newRelics[i]
-			-- TODO: test third slot unlock
-			if newRelic.isLocked ~= oldRelics[i].isLocked or newRelic.itemID ~= oldRelics[i].itemID then
-				oldRelics[i] = newRelic
-				Debug("ARTIFACT_RELIC_CHANGED", viewedID, i, newRelic)
-				lib.callbacks:Fire("ARTIFACT_RELIC_CHANGED", viewedID, i, CopyTable(newRelic))
-				-- if a relic changed, so did the traits
-				ScanTraits(viewedID)
-				InformTraitsChanged(viewedID)
-				break
-			end
-		end
-	end
-end
-
-function private.ARTIFACT_XP_UPDATE(event)
-	-- at the forge the player can purchase traits even for unequipped artifacts
-	local GetInfo = IsAtForge() and GetArtifactInfo or GetEquippedArtifactInfo
-	local itemID, _, _, _, unspentPower, numRanksPurchased, _, _, _, _, _, _, tier = GetInfo() -- NOTE: 7.2 compat
-	local numRanksPurchasable, power, maxPower = GetNumPurchasableTraits(numRanksPurchased, unspentPower, tier)
-
-	local artifact = artifacts[itemID]
-	if not artifact then
-		return lib.ForceUpdate()
-	end
-
-	local diff = unspentPower - artifact.unspentPower
-
-	if numRanksPurchased ~= artifact.numRanksPurchased then
-		-- both learning traits and artifact respec trigger ARTIFACT_XP_UPDATE
-		-- however respec has a positive diff and learning traits has a negative one
-		ScanTraits(itemID)
-		InformTraitsChanged(itemID)
-	end
-
-	if diff ~= 0 then
-		artifact.unspentPower = unspentPower
-		artifact.power = power
-		artifact.maxPower = maxPower
-		artifact.numRanksPurchased = numRanksPurchased
-		artifact.numRanksPurchasable = numRanksPurchasable
-		artifact.powerForNextRank = maxPower - power
-		Debug(event, itemID, diff, unspentPower, power, maxPower, maxPower - power, numRanksPurchasable)
-		lib.callbacks:Fire("ARTIFACT_POWER_CHANGED", itemID, diff, unspentPower, power, maxPower, maxPower - power, numRanksPurchasable)
-	end
-end
-
-function private.BANKFRAME_OPENED()
-	local numObtained = GetNumObtainedArtifacts()
-	if numObtained > lib:GetNumObtainedArtifacts() then
-		ScanBank(numObtained)
-	end
-end
-
-function private.CURRENCY_DISPLAY_UPDATE(event)
-	local _, lvl = GetCurrencyInfo(1171)
-	if lvl ~= artifacts.knowledgeLevel then
-		artifacts.knowledgeLevel = lvl
-		Debug("ARTIFACT_DATA_MISSING", event, lvl)
-		lib.callbacks:Fire("ARTIFACT_DATA_MISSING", "knowledge", lvl)
-	end
-end
-
-function private.PLAYER_EQUIPMENT_CHANGED(event, slot)
-	if slot == INVSLOT_MAINHAND then
-		local itemID = GetEquippedArtifactInfo()
-
-		if itemID and not artifacts[itemID] then
-			ScanEquipped(event)
-		end
-
-		InformEquippedArtifactChanged(itemID)
-		InformActiveArtifactChanged(itemID)
-	end
-end
-
--- needed in case the game fails to switch artifacts
-function private.PLAYER_SPECIALIZATION_CHANGED(event)
-	local itemID = GetEquippedArtifactInfo()
-	Debug(event, itemID)
-	InformActiveArtifactChanged(itemID)
-end
-
-function lib.GetActiveArtifactID()
-	return activeID
-end
-
-function lib.GetArtifactInfo(_, artifactID)
-	artifactID = artifactID or equippedID
-	return artifactID, CopyTable(artifacts[artifactID])
-end
-
-function lib.GetAllArtifactsInfo()
-	return CopyTable(artifacts)
-end
-
-function lib.GetNumObtainedArtifacts()
-	local numArtifacts = 0
-	for artifact in pairs(artifacts) do
-		if tonumber(artifact) then
-			numArtifacts = numArtifacts + 1
-		end
-	end
-
-	return numArtifacts
-end
-
-function lib.GetArtifactTraits(_, artifactID)
-	artifactID = artifactID or equippedID
-	for itemID, data in pairs(artifacts) do
-		if itemID == artifactID then
-			return artifactID, CopyTable(data.traits)
-		end
-	end
-end
-
-function lib.GetArtifactRelics(_, artifactID)
-	artifactID = artifactID or equippedID
-	for itemID, data in pairs(artifacts) do
-		if itemID == artifactID then
-			return artifactID, CopyTable(data.relics)
-		end
-	end
-end
-
-function lib.GetArtifactPower(_, artifactID)
-	artifactID = artifactID or equippedID
-	for itemID, data in pairs(artifacts) do
-		if itemID == artifactID then
-			return artifactID, data.unspentPower, data.power, data.maxPower, data.powerForNextRank, data.numRanksPurchased, data.numRanksPurchasable
-		end
-	end
-end
-
-function lib.GetArtifactKnowledge()
-	return artifacts.knowledgeLevel, artifacts.knowledgeMultiplier
-end
-
-function lib.GetAcquiredArtifactPower(_, artifactID)
-	local total = 0
-
-	if artifactID then
-		local data = artifacts[artifactID]
-		total = total + data.unspentPower
-		local rank = 1
-		while rank < data.numRanksPurchased do
-			total = total + GetCostForPointAtRank(rank, data.tier)
-			rank = rank + 1
-		end
-
-		return total
-	end
-
-	for itemID, data in pairs(artifacts) do
-		if tonumber(itemID) then
-			total = total + data.unspentPower
-			local rank = 1
-			while rank < data.numRanksPurchased do
-				total = total + GetCostForPointAtRank(rank, data.tier)
-				rank = rank + 1
-			end
-		end
-	end
-
-	return total
-end
-
-function lib.ForceUpdate()
-	if _G.ArtifactFrame and _G.ArtifactFrame:IsShown() then
-		Debug("ForceUpdate", "aborted because ArtifactFrame is open.")
-		return
-	end
-	local numObtained = GetNumObtainedArtifacts()
-	if numObtained > 0 then
-		ScanEquipped("FORCE_UPDATE")
-		IterateContainers(BACKPACK_CONTAINER, NUM_BAG_SLOTS, numObtained)
-	end
-end
diff --git a/Libs/LibArtifactData-1.0/LibArtifactData-1.0.toc b/Libs/LibArtifactData-1.0/LibArtifactData-1.0.toc
deleted file mode 100644
index f3dc72c..0000000
--- a/Libs/LibArtifactData-1.0/LibArtifactData-1.0.toc
+++ /dev/null
@@ -1,13 +0,0 @@
-## Interface: 70200
-## Title: Lib: ArtifactData-1.0
-## Notes: Provides data about all artifacts in the player's possession.
-## Author: Rainrider
-## X-Category: Library
-## Version: @project-version@
-## LoadOnDemand: 1
-## OptionalDeps: AdiDebug
-
-LibStub\LibStub.lua
-CallbackHandler-1.0\CallbackHandler-1.0.lua
-
-LibArtifactData-1.0.lua
diff --git a/Libs/LibArtifactData-1.0/README.md b/Libs/LibArtifactData-1.0/README.md
deleted file mode 100644
index 2eaf1d3..0000000
--- a/Libs/LibArtifactData-1.0/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## Description
-
-LibArtifactData-1.0 is a data store for addons that need the player's artifacts data. It has a simple API for data access and uses CallbackHandler-1.0 to propagate data changes.
-
-## Why to use
-
-The stock UI provides much of the artifact data only when an artifact is viewed and only for that one artifact. If an addon requires that data prior to the player opening the Artifact UI, or for all artifacts at once, it has to unregister the events the UI uses (so that it doesn't tamper with other UI elements), simulate a shift-right click on the artifact, collect the data and then restore the default state. However this would make the ARTIFACT_UPDATE event fire, upon which all addons listening to it will scan for data anew. This leads to duplicated efforts and possibly some pointless scans, since ARTIFACT_UPDATE does not automatically mean that the data actually changed.
-
-LibArtifactData-1.0 tries to leverage this behavior by keeping the data for all artifacts accessible all the time and informs interested addons about changes when they actually occur.
-
-## Limitations
-
-Data about artifacts placed in the bank is not available until the player opens the bank. LibArtifactData-1.0 can detect such a case and inform addons that some of the data is missing.
-
-Currently LibArtifactData-1.0 does not collect appearance data.
-
-## Feedback
-
-If you have problems using the library, run into any issues or have a feature request, please use the [issue tracker](https://github.com/Rainrider/LibArtifactData-1.0/issues).
-
-## Further reading
-  1. [How to use](https://github.com/Rainrider/LibArtifactData-1.0/wiki/How-to-use)
-  2. [API](https://github.com/Rainrider/LibArtifactData-1.0/wiki/API)
-  3. [Events](https://github.com/Rainrider/LibArtifactData-1.0/wiki/Events)
-  4. [Data structure](https://github.com/Rainrider/LibArtifactData-1.0/wiki/Data-structure)
diff --git a/Libs/LibArtifactData-1.0/pkgmeta.yaml b/Libs/LibArtifactData-1.0/pkgmeta.yaml
deleted file mode 100644
index 2ad3071..0000000
--- a/Libs/LibArtifactData-1.0/pkgmeta.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-package-as: LibArtifactData-1.0
-
-externals:
-  LibStub:
-    url: svn://svn.wowace.com/wow/libstub/mainline/trunk
-    tag: latest
-  CallbackHandler-1.0:
-    url: svn://svn.wowace.com/wow/callbackhandler/mainline/trunk/CallbackHandler-1.0
-    tag: latest
-
-enable-nolib-creation: no
diff --git a/Libs/LibDataBroker-1.1 b/Libs/LibDataBroker-1.1
new file mode 160000
index 0000000..1a63ede
--- /dev/null
+++ b/Libs/LibDataBroker-1.1
@@ -0,0 +1 @@
+Subproject commit 1a63ede0248c11aa1ee415187c1f9c9489ce3e02
diff --git a/Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua b/Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua
deleted file mode 100644
index bd6f02c..0000000
--- a/Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua
+++ /dev/null
@@ -1,89 +0,0 @@
-assert(LibStub, "LibDataBroker-1.1 requires LibStub")
-assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0")
-
-local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4)
-if not lib then return end
-oldminor = oldminor or 0
-
-
-lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib)
-lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {}
-local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks
-
-if oldminor < 2 then
-	lib.domt = {
-		__metatable = "access denied",
-		__index = function(self, key) return attributestorage[self] and attributestorage[self][key] end,
-	}
-end
-
-if oldminor < 3 then
-	lib.domt.__newindex = function(self, key, value)
-		if not attributestorage[self] then attributestorage[self] = {} end
-		if attributestorage[self][key] == value then return end
-		attributestorage[self][key] = value
-		local name = namestorage[self]
-		if not name then return end
-		callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self)
-		callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self)
-		callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self)
-		callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self)
-	end
-end
-
-if oldminor < 2 then
-	function lib:NewDataObject(name, dataobj)
-		if self.proxystorage[name] then return end
-
-		if dataobj then
-			assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table")
-			self.attributestorage[dataobj] = {}
-			for i,v in pairs(dataobj) do
-				self.attributestorage[dataobj][i] = v
-				dataobj[i] = nil
-			end
-		end
-		dataobj = setmetatable(dataobj or {}, self.domt)
-		self.proxystorage[name], self.namestorage[dataobj] = dataobj, name
-		self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj)
-		return dataobj
-	end
-end
-
-if oldminor < 1 then
-	function lib:DataObjectIterator()
-		return pairs(self.proxystorage)
-	end
-
-	function lib:GetDataObjectByName(dataobjectname)
-		return self.proxystorage[dataobjectname]
-	end
-
-	function lib:GetNameByDataObject(dataobject)
-		return self.namestorage[dataobject]
-	end
-end
-
-if oldminor < 4 then
-	local next = pairs(attributestorage)
-	function lib:pairs(dataobject_or_name)
-		local t = type(dataobject_or_name)
-		assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)")
-
-		local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
-		assert(attributestorage[dataobj], "Data object not found")
-
-		return next, attributestorage[dataobj], nil
-	end
-
-	local ipairs_iter = ipairs(attributestorage)
-	function lib:ipairs(dataobject_or_name)
-		local t = type(dataobject_or_name)
-		assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)")
-
-		local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
-		assert(attributestorage[dataobj], "Data object not found")
-
-		return ipairs_iter, attributestorage[dataobj], 0
-	end
-end
diff --git a/Libs/LibDataBroker-1.1/README.textile b/Libs/LibDataBroker-1.1/README.textile
deleted file mode 100644
index ef16fed..0000000
--- a/Libs/LibDataBroker-1.1/README.textile
+++ /dev/null
@@ -1,13 +0,0 @@
-LibDataBroker is a small WoW addon library designed to provide a "MVC":http://en.wikipedia.org/wiki/Model-view-controller interface for use in various addons.
-LDB's primary goal is to "detach" plugins for TitanPanel and FuBar from the display addon.
-Plugins can provide data into a simple table, and display addons can receive callbacks to refresh their display of this data.
-LDB also provides a place for addons to register "quicklaunch" functions, removing the need for authors to embed many large libraries to create minimap buttons.
-Users who do not wish to be "plagued" by these buttons simply do not install an addon to render them.
-
-Due to it's simple generic design, LDB can be used for any design where you wish to have an addon notified of changes to a table.
-
-h2. Links
-
-* "API documentation":http://github.com/tekkub/libdatabroker-1-1/wikis/api
-* "Data specifications":http://github.com/tekkub/libdatabroker-1-1/wikis/data-specifications
-* "Addons using LDB":http://github.com/tekkub/libdatabroker-1-1/wikis/addons-using-ldb
diff --git a/modules/system.lua b/modules/system.lua
index cf6e32d..468965f 100644
--- a/modules/system.lua
+++ b/modules/system.lua
@@ -40,7 +40,7 @@ function SystemModule:Refresh()
     return
   end

-  local iconSize = db.text.fontSize + db.general.barPadding
+  local iconSize = db.text.fontSize --+ db.general.barPadding

   self.fpsIcon:SetTexture(xb.constants.mediaPath..'datatexts\\fps')
   self.fpsIcon:SetSize(iconSize, iconSize)
@@ -59,21 +59,29 @@ function SystemModule:Refresh()
   self.pingIcon:SetVertexColor(db.color.normal.r, db.color.normal.g, db.color.normal.b, db.color.normal.a)

   self.pingText:SetFont(xb:GetFont(db.text.fontSize))
-  self.worldPingText:SetFont(xb:GetFont(db.text.fontSize))
-
+  if db.modules.system.showWorld then
+	self.worldPingText:SetFont(xb:GetFont(db.text.fontSize))
+  end
   self.fpsText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
   self.pingText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
-  self.worldPingText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
-
+  if db.modules.system.showWorld then
+	self.worldPingText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
+  end
   if self.fpsFrame:IsMouseOver() then
     self.fpsText:SetTextColor(unpack(xb:HoverColors()))
   end
   if self.pingFrame:IsMouseOver() then
     self.pingText:SetTextColor(unpack(xb:HoverColors()))
-    self.worldPingText:SetTextColor(unpack(xb:HoverColors()))
+	if db.modules.system.showWorld then
+		self.worldPingText:SetTextColor(unpack(xb:HoverColors()))
+	end
   end

-  self.worldPingText:SetText('000'..MILLISECONDS_ABBR)
+  if db.modules.system.showWorld then
+	self.worldPingText:SetText('000'..MILLISECONDS_ABBR)
+  else
+	self.worldPingText:SetText('')
+  end
   self.pingText:SetText('000'..MILLISECONDS_ABBR) -- get the widest we can be

   local pingWidest = self.pingText:GetStringWidth() + 5
@@ -116,7 +124,9 @@ function SystemModule:UpdateTexts()
   self.fpsText:SetText(floor(GetFramerate())..FPS_ABBR)
   local _, _, homePing, worldPing = GetNetStats()
   self.pingText:SetText(L['L']..": "..floor(homePing)..MILLISECONDS_ABBR)
-  self.worldPingText:SetText(L['W']..": "..floor(worldPing)..MILLISECONDS_ABBR)
+  if xb.db.profile.modules.system.showWorld then
+	self.worldPingText:SetText(L['W']..": "..floor(worldPing)..MILLISECONDS_ABBR)
+  end
 end

 function SystemModule:CreateFrames()
@@ -127,7 +137,9 @@ function SystemModule:CreateFrames()
   self.pingFrame = self.pingFrame or CreateFrame('BUTTON', nil, self.systemFrame)
   self.pingIcon = self.pingIcon or self.pingFrame:CreateTexture(nil, 'OVERLAY')
   self.pingText = self.pingText or self.pingFrame:CreateFontString(nil, 'OVERLAY')
-  self.worldPingText = self.worldPingText or self.pingFrame:CreateFontString(nil, 'OVERLAY')
+  if xb.db.profile.modules.system.showWorld then
+	self.worldPingText = self.worldPingText or self.pingFrame:CreateFontString(nil, 'OVERLAY')
+  end
 end

 function SystemModule:HoverFunction()
@@ -137,7 +149,9 @@ function SystemModule:HoverFunction()
   end
   if self.pingFrame:IsMouseOver() then
     self.pingText:SetTextColor(unpack(xb:HoverColors()))
-    self.worldPingText:SetTextColor(unpack(xb:HoverColors()))
+	if xb.db.profile.modules.system.showWorld then
+		self.worldPingText:SetTextColor(unpack(xb:HoverColors()))
+	end
   end
   if xb.db.profile.modules.system.showTooltip and not self.fpsFrame:IsMouseOver() then
     self:ShowTooltip()
@@ -149,7 +163,9 @@ function SystemModule:LeaveFunction()
   local db = xb.db.profile
   self.fpsText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
   self.pingText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
-  self.worldPingText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
+  if xb.db.profile.modules.system.showWorld then
+	self.worldPingText:SetTextColor(db.color.inactive.r, db.color.inactive.g, db.color.inactive.b, db.color.inactive.a)
+  end
   if xb.db.profile.modules.system.showTooltip then
     GameTooltip:Hide()
   end