From 68c08c6c736ff0e1e4c2d57a0c34fa68a1f9d52d Mon Sep 17 00:00:00 2001 From: Peter Eliasson Date: Thu, 21 Jul 2016 20:47:12 +0200 Subject: [PATCH] Changed to using GetInstanceInfo for zone ids. --- src/highscore.lua | 6 +++--- src/inspect.lua | 2 ++ src/main.lua | 12 ++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) 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; -- 1.7.9.5