changeset 462:94e59c64a328

Initial Patch 7.0 support. All super obvious errors fixed, but probably many minor ones remain.
author MMOSimca <MMOSimca@gmail.com>
date Tue, 01 Dec 2015 19:33:30 -0500
parents 0b9c096d84d9
children 1136b1bc88a1
files Constants.lua Main.lua WoWDBProfiler.toc
diffstat 3 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Constants.lua	Mon Oct 26 22:07:35 2015 -0400
+++ b/Constants.lua	Tue Dec 01 19:33:30 2015 -0500
@@ -595,6 +595,9 @@
 -- Fundamental Constants.
 -----------------------------------------------------------------------
 private.wow_version, private.build_num, _, private.interface_num = _G.GetBuildInfo()
+-- LEGION
+private.isLegion = false
+if private.interface_num == 70000 then private.isLegion = true end
 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
--- a/Main.lua	Mon Oct 26 22:07:35 2015 -0400
+++ b/Main.lua	Tue Dec 01 19:33:30 2015 -0500
@@ -1022,7 +1022,7 @@
         local item_results = { (":"):split(item_string) }
 
         local suffix_id = tonumber(item_results[8]) or 0
-        local unique_id = item_results[9] or 0
+        local unique_id = tonumber(item_results[9]) or 0
         --local level = tonumber(item_results[10])
         --local specialization_id = tonumber(item_results[11])
         --local unknown_upgrade_related_id = tonumber(item_results[12])
@@ -1030,6 +1030,14 @@
         local num_bonus_ids = tonumber(item_results[14]) or 0
         -- upgrade_id is optional since 6.2! can probably be detected using unknown_upgrade_related_id, but it's just as easy to check like this
         local upgrade_id = tonumber(item_results[15 + num_bonus_ids]) or 0
+        
+        -- LEGION
+        if private.isLegion then
+            local unkItemField1 = tonumber(item_results[16 + num_bonus_ids]) or 0
+            local unkItemField2 = tonumber(item_results[17 + num_bonus_ids]) or 0
+            if unkItemField1 > 0 then Debug("unkItemField1 is non-zero, specifically %d.", unkItemField1) end
+            if unkItemField2 > 0 then Debug("unkItemField2 is non-zero, specifically %d.", unkItemField2) end
+        end
 
         -- If there is anything special (non-zero) for this item then we need to make note of everything
         if math.max(suffix_id, instance_difficulty_id, num_bonus_ids, upgrade_id) ~= 0 then
@@ -1190,7 +1198,8 @@
     local COORD_MAX = 5
 
     function WDP:UpdateTargetLocation()
-        if currently_drunk or not _G.UnitExists("target") or _G.UnitPlayerControlled("target") or (_G.UnitIsTapped("target") and not _G.UnitIsDead("target")) then
+        -- LEGION supported here
+        if currently_drunk or not _G.UnitExists("target") or _G.UnitPlayerControlled("target") or not _G.UnitIsDead("target") then
             return
         end
 
--- a/WoWDBProfiler.toc	Mon Oct 26 22:07:35 2015 -0400
+++ b/WoWDBProfiler.toc	Tue Dec 01 19:33:30 2015 -0500
@@ -4,7 +4,7 @@
 ## Author: James D. Callahan III (Torhal)
 ## X-Email: jcallahan@curse.com
 ## SavedVariables: WoWDBProfilerData
-## OptionalDeps: Ace3, LibDeformat-3.0, LibPetJournal-2.0, LibDialog-1.0, LibQTip-1.0
+## OptionalDeps: Ace3, LibDeformat-3.0, LibDialog-1.0, LibQTip-1.0
 
 libs.xml