Quantcast

-Updated TOC for patch 4.1

Xruptor [05-03-11 - 11:59]
-Updated TOC for patch 4.1
-Now also includes World ping as well.  (Special thanks to Comix1234 from wowinterface.com)
Filename
LagBar.lua
LagBar.toc
diff --git a/LagBar.lua b/LagBar.lua
index f9ae78d..8b4873f 100644
--- a/LagBar.lua
+++ b/LagBar.lua
@@ -135,13 +135,28 @@ function LagBar:DrawGUI()
 			--	LagBar_Text:SetText("Ping: "..latency.." ms");
 			--end

-			local framerate = floor(GetFramerate() + 0.5)
-			local framerate_text = format("|cff%s%d|r fps", LagBar_GetThresholdHexColor(framerate / 60), framerate)
+			--ORIGINAL CODE
+			-- local framerate = floor(GetFramerate() + 0.5)
+			-- local framerate_text = format("|cff%s%d|r fps", LagBar_GetThresholdHexColor(framerate / 60), framerate)
+
+			-- local latency = select(3, GetNetStats())
+			-- local latency_text = format("|cff%s%d|r ms", LagBar_GetThresholdHexColor(latency, 1000, 500, 250, 100, 0), latency)
+
+			-- LagBarFrameText:SetText(framerate_text.." | "..latency_text);

-			local latency = select(3, GetNetStats())
-			local latency_text = format("|cff%s%d|r ms", LagBar_GetThresholdHexColor(latency, 1000, 500, 250, 100, 0), latency)

-			LagBarFrameText:SetText(framerate_text.." | "..latency_text);
+			--thanks to comix1234 on wowinterface.com for the update.
+			local framerate = floor(GetFramerate() + 0.5)
+			local framerate_text = format("|cff%s%d|r fps", LagBar_GetThresholdHexColor(framerate / 60), framerate)
+
+			local latencyHome = select(3, GetNetStats())
+			local latency_text = format("|cff%s%d|r ms", LagBar_GetThresholdHexColor(latencyHome, 1000, 500, 250, 100, 0), latencyHome)
+
+			local latencyWorld = select(4, GetNetStats())
+			local latency_text_server = format("|cff%s%d|r ms", LagBar_GetThresholdHexColor(latencyWorld, 1000, 500, 250, 100, 0), latencyWorld)
+
+			LagBarFrameText:SetText(framerate_text.." | "..latency_text.." | "..latency_text_server);
+
 		end

 	end)
diff --git a/LagBar.toc b/LagBar.toc
index 8e88633..fb48a57 100644
--- a/LagBar.toc
+++ b/LagBar.toc
@@ -1,7 +1,7 @@
-## Interface: 40000
+## Interface: 40100
 ## Title: LagBar
 ## Author: Xruptor
-## Version:  2.1
+## Version:  2.2
 ## Notes: Displays a simple bar with some Latency Information.
 ## SavedVariables: LagBar_DB
 LagBar.lua