changeset 330:267e7100407c WoD

Misc WoD fixes, including 'region' support, many WoD loot containers, and changed 1/0 flags to booleans. Also bumped TOC.
author MMOSimca <MMOSimca@gmail.com>
date Fri, 22 Aug 2014 03:45:27 -0400
parents 84817627cb22
children 5ef583564381
files Constants.lua Main.lua WoWDBProfiler.toc
diffstat 3 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Constants.lua	Wed Aug 06 04:39:26 2014 -0400
+++ b/Constants.lua	Fri Aug 22 03:45:27 2014 -0400
@@ -16,6 +16,9 @@
 -- Constants.
 -----------------------------------------------------------------------
 private.wow_version, private.build_num = _G.GetBuildInfo()
+private.region = GetCVar("portal"):sub(0,2):upper()
+-- PTR/Beta return "public-test", but they are properly called "XX"
+if private.region == "PU" then private.region = "XX" end
 
 private.UNIT_TYPES = {
     PLAYER = "Player",
@@ -105,6 +108,7 @@
 
 private.LOOT_SPELL_ID_TO_ITEM_ID_MAP = {
     [142397] = 98134, -- Heroic Cache of Treasures
+    [142901] = 98546, -- Bulging Heroic Cache of Treasures
     [143506] = 98095, -- Brawler's Pet Supplies
     [143507] = 94207, -- Fabled Pandaren Pet Supplies
     [143508] = 89125, -- Sack of Pet Supplies
@@ -116,6 +120,11 @@
     [147598] = 104014, -- Pouch of Timeless Coins
     [149222] = 105911, -- Pouch of Enduring Wisdom
     [149223] = 105912, -- Oversized Pouch of Enduring Wisdom
+    [168178] = 114116, -- Bag of Salvaged Goods
+    [168179] = 114119, -- Heafty Salvaged Crate
+    [168180] = 114120, -- Lofty Salvaged Chest
+    [171513] = 116414, -- Pet Supplies
+    [175767] = 118697, -- Big Bag of Pet Supplies
 }
 
 private.RAID_FINDER_BOSS_IDS = {
--- a/Main.lua	Wed Aug 06 04:39:26 2014 -0400
+++ b/Main.lua	Fri Aug 22 03:45:27 2014 -0400
@@ -217,7 +217,7 @@
             _G.TradeSkillFrame.filterTbl.hasSkillUp = false
             _G.TradeSkillOnlyShowSkillUps(false)
         end
-        _G.SetTradeSkillInvSlotFilter(0, 1, 1)
+        _G.SetTradeSkillInvSlotFilter(0, true, true)
         _G.TradeSkillUpdateFilterBar()
         _G.TradeSkillFrame_Update()
 
@@ -292,7 +292,7 @@
 end -- do-block
 
 
--- constant for duplicate boss data; a dirty hack to get around world bosses that cannot be identified individually and cannot be linked on wowdb because they are not in a raid
+-- Constant for duplicate boss data; a dirty hack to get around world bosses that cannot be identified individually and cannot be linked on wowdb because they are not in a raid
 local DUPLICATE_WORLD_BOSS_IDS = {
     [71952] = { 71953, 71954, 71955, },
 }
@@ -874,6 +874,7 @@
         end
     end
     raw_db.build_num = build_num
+    raw_db.region = private.region
     raw_db.version = DB_VERSION
 
     private.InitializeCommentSystem()
@@ -991,6 +992,7 @@
         upgrade_id = tonumber(upgrade_id)
         instance_difficulty_id = tonumber(instance_difficulty_id)
         num_bonus_ids = tonumber(num_bonus_ids)
+        suffix_id = tonumber(suffix_id)
         if (not num_bonus_ids) or (num_bonus_ids == 0) then
             if (suffix_id and suffix_id ~= 0) or (instance_difficulty_id and instance_difficulty_id ~= 0) then
                 item = DBEntry("items", item_id)
@@ -1013,7 +1015,7 @@
             end
             
             for bonus_index = 1, num_bonus_ids do
-                item.bonus_ids[bonus_ids[bonus_index]] = true
+                item.bonus_ids[tonumber(bonus_ids[bonus_index])] = true
             end
         else
             Debug("RecordItemData: Item_system is supposed to be 0 or positive, instead it was %s.", item_system)
@@ -2400,9 +2402,9 @@
     local used = _G.GetTrainerServiceTypeFilter("used")
 
     -- Clear the trainer filters
-    _G.SetTrainerServiceTypeFilter("available", 1)
-    _G.SetTrainerServiceTypeFilter("unavailable", 1)
-    _G.SetTrainerServiceTypeFilter("used", 1)
+    _G.SetTrainerServiceTypeFilter("available", true)
+    _G.SetTrainerServiceTypeFilter("unavailable", true)
+    _G.SetTrainerServiceTypeFilter("used", true)
 
     for index = 1, _G.GetNumTrainerServices(), 1 do
         local spell_name, rank_name, _, _, required_level = _G.GetTrainerServiceInfo(index)
@@ -2434,9 +2436,9 @@
         end
     end
     -- Reset the filters to what they were before
-    _G.SetTrainerServiceTypeFilter("available", available or 0)
-    _G.SetTrainerServiceTypeFilter("unavailable", unavailable or 0)
-    _G.SetTrainerServiceTypeFilter("used", used or 0)
+    _G.SetTrainerServiceTypeFilter("available", available or false)
+    _G.SetTrainerServiceTypeFilter("unavailable", unavailable or false)
+    _G.SetTrainerServiceTypeFilter("used", used or false)
 end
 
 
--- a/WoWDBProfiler.toc	Wed Aug 06 04:39:26 2014 -0400
+++ b/WoWDBProfiler.toc	Fri Aug 22 03:45:27 2014 -0400
@@ -1,4 +1,4 @@
-## Interface: 50400
+## Interface: 60000
 ## Title: WoWDB Profiler
 ## Notes: WoW datamining tool.
 ## Author: James D. Callahan III (Torhal)