Quantcast

Changed to using GetInstanceInfo for zone ids.

Peter Eliasson [07-21-16 - 18:47]
Changed to using GetInstanceInfo for zone ids.
Filename
src/highscore.lua
src/inspect.lua
src/main.lua
diff --git a/src/highscore.lua b/src/highscore.lua
index 996d455..a45eae1 100644
--- a/src/highscore.lua
+++ b/src/highscore.lua
@@ -96,9 +96,9 @@ addon.dbDefaults.realm.modules["highscore"] = {

 -- Constants
 local TRACKED_ZONE_IDS = {
-	994, 	-- Highmaul
-	988, 	-- Blackrock Foundry
-	1026 	-- Hellfire Citadel
+	1228, 	-- Highmaul
+	1205, 	-- Blackrock Foundry
+	1448 	-- Hellfire Citadel
 }

 -- Function that returns a list of keys in `parses` for the top
diff --git a/src/inspect.lua b/src/inspect.lua
index caaf26f..c3d6330 100644
--- a/src/inspect.lua
+++ b/src/inspect.lua
@@ -241,6 +241,8 @@ end
 -- Tries to pre-inspect all guild members of a raid group
 -- to populate the inspectCache for the players.
 function inspect:PreInspectGroup()
+	self:Debug("PreInspectGroup")
+
 	for i=1, GetNumGroupMembers() do

 		local playerName = GetRaidRosterInfo(i);
diff --git a/src/main.lua b/src/main.lua
index 602b527..fdcd630 100644
--- a/src/main.lua
+++ b/src/main.lua
@@ -84,14 +84,18 @@ function addon:UpdateMyGuildName()
 	else
 		self.guildName = nil
 	end
+
+	self:Debug("UpdateMyGuildName", self.guildName)
 end

 -- Sets the current zone to the zone the player
 -- is currently in.
 function addon:UpdateCurrentZone()
-	local zoneId, _ = GetCurrentMapAreaID()
+	local _, _, _, _, _, _, _, zoneId = GetInstanceInfo();
 	local zoneName = GetRealZoneText();
 	self.currentZone = {id = zoneId, name = zoneName};
+
+	self:Debug("UpdateCurrentZone", zoneId, zoneName)
 end

 -- Tests if a player with name playerName is in the same
@@ -139,7 +143,11 @@ function addon:OnEncounterEndSuccess(encounterId, encounterName, difficultyId, r


 	local function handleParses(success, startTime, duration, players)
-		if not success then return end;
+		if not success then
+			self:Debug("Skipping parse, success was false.");
+			return;
+		end
+
 		encounter.startTime = startTime;
 		encounter.duration = duration;