changeset 106:095ee38508e8

Warn if restoring ridonkulous amount of data. Placeholder values for MoP raids.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Sun, 05 Aug 2012 19:08:53 +0000
parents 646c9b41aaed
children 35b55c6f5551
files abbreviations.lua bossmods.lua core.lua
diffstat 3 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/abbreviations.lua	Sun Aug 05 16:59:24 2012 +0000
+++ b/abbreviations.lua	Sun Aug 05 19:08:53 2012 +0000
@@ -36,7 +36,13 @@
 local addon = select(2,...)
 if addon.NOLOAD then return end
 
+-- Currently indexed by GetInstanceInfo() values.
 addon.instance_abbrev = {
+	-------- MoP
+	["Mogu'shan Vaults"] = "MV",
+	["Heart of Fear"] = "HoF",
+	["Terrace of Endless Spring"] = "ToES",
+
 	-------- Cata
 	["Baradin Hold"] = "BH",
 	["The Bastion of Twilight"] = "BoT",
@@ -52,7 +58,13 @@
 	["Vault of Archavon"] = "VoA",
 }
 
+-- Currently indexed by "boss name" values, as generated by whatever boss mod
+-- is in use; see specific boss mod handling code to see how they get it.
 addon.boss_abbrev = {
+	-------- MoP
+	-- MV
+	["Will of the Emperor"] = "Talk to the Open Hand",
+
 	-------- Cata
 	-- BoT
 	["Halfus Wyrmbreaker"] = "Halfass Wyrmbreaker",
--- a/bossmods.lua	Sun Aug 05 16:59:24 2012 +0000
+++ b/bossmods.lua	Sun Aug 05 19:08:53 2012 +0000
@@ -58,6 +58,11 @@
 	local function DBMBossCallback (self, reason, mod, ...)
 		if (not self.rebroadcast) and (not self.enabled) then return end
 
+		-- Behavior based on the first arg to DBM:NewMod.  Old style is just
+		-- a boss name, which is set as mod.id and *should* also be set as
+		-- combatinfo.name.  New style is the "encounter ID", fed through the
+		-- EJ_GetEncounterInfo API to get the name, and then stripped down
+		-- to the first comma (if any).
 		local name
 		if mod.combatInfo and mod.combatInfo.name then
 			name = mod.combatInfo.name
--- a/core.lua	Sun Aug 05 16:59:24 2012 +0000
+++ b/core.lua	Sun Aug 05 19:08:53 2012 +0000
@@ -1838,6 +1838,12 @@
 				"and 5-player mode not active.  |cffff0505NOT tracking loot|r;",
 				"use 'enable' to activate loot tracking, or 'clear' to erase",
 				"previous data, or 'help' to read about saved-texts commands.")
+		if #g_loot > 400 then
+			self:Print("|cffff0505Crikey!|r  You are carrying around a lot of",
+				"stored loot data.  You should seriously consider clearing it",
+				"out, as some of the text generation routines can choke the",
+				"game client if they run for too long.")
+		end
 		return
 	end
 	self.rebroadcast = true  -- hardcode to true; this used to be more complicated