Quantcast

ShowReportWindow now also takes the ids for guild, zone, diff, encounter so those can also be displayed in the report message.

Peter Eliasson [01-26-15 - 18:44]
ShowReportWindow now also takes the ids for guild, zone, diff, encounter so those can also be displayed in the report message.
Filename
src/gui.lua
src/report.lua
diff --git a/src/gui.lua b/src/gui.lua
index 5362090..9c8d688 100644
--- a/src/gui.lua
+++ b/src/gui.lua
@@ -174,7 +174,12 @@ function gui:CreateActionContainer()
 	reportBtn:SetDisabled(true);
 	reportBtn:SetRelativeWidth(0.5);
 	reportBtn:SetCallback("OnClick", function()
-		addon.report:ShowReportWindow(self.displayedParses);
+		addon.report:ShowReportWindow(
+			self.selectedGuild,
+			self.selectedZone,
+			self.selectedDifficulty,
+			self.selectedEncounter,
+			self.displayedParses);
 	end);

 	actionContainer:AddChild(purgeBtn);
diff --git a/src/report.lua b/src/report.lua
index 26588ad..d9e5976 100644
--- a/src/report.lua
+++ b/src/report.lua
@@ -12,7 +12,13 @@ addon.report = report;
 local AceGUI = LibStub("AceGUI-3.0");


-function report:ShowReportWindow(parses)
+function report:ShowReportWindow(guildId, zoneId, difficultyId, encounterId, parses)
+	self:Debug(
+		addon.highscore:GetGuildNameById(guildId),
+		addon.highscore:GetZoneNameById(zoneId),
+		addon.highscore:GetDifficultyNameById(difficultyId),
+		addon.highscore:GetEncounterNameById(encounterId)
+	);
 	self.parses = parses;

 	-- Using Frame instead of Window because ElvUI does not