changeset 102:4d1520186ea4

7.2.5 changes - Fixed order hall panel not initializing on fresh install
author Nenue
date Thu, 25 May 2017 17:24:00 -0400
parents b68af1e44bdc
children 9f664a0ef8a8
files ClassPlan.lua ClassPlan.xml ClassPlanShipments.lua MapFrame.lua MapFrame.xml QuestPOI.lua WorldPlan.lua WorldPlan.toc WorldQuests.lua
diffstat 9 files changed, 100 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/ClassPlan.lua	Thu May 18 16:44:05 2017 -0400
+++ b/ClassPlan.lua	Thu May 25 17:24:00 2017 -0400
@@ -55,6 +55,7 @@
   Queued = {},
   Timers = {},
   ReportChunks = {},
+  maxItems = 12
 }
 ClassPlanHandlerBase = {
   numBlocks = 0,
@@ -101,15 +102,24 @@
       originalScript(minimap, button)
     end
   end)
+  local OnStopped = function()
+    print('Fade.OnStop()')
+    self.isAnimating = nil
+    self:SetShown(self.data.IsShown)
+  end
+
+  self.FadeOut:SetScript('OnStop', OnStopped)
   self.FadeOut:SetScript('OnFinished', function()
-    self:Hide()
-    self.data.IsShown = nil
+    print('FadeOut.OnFinished()')
     self.isAnimating = nil
+    self:SetShown(false)
   end)
   self.FadeIn:SetScript('OnPlay', function()
+    print('FadeIn.OnPlay()')
     self.isAnimating = true
-    self:SetShown(true)
+    self.data.IsShown = true
   end)
+  self.FadeIn:SetScript('OnStop', OnStopped)
 
   --hooksecurefunc(C_Garrison, 'RequestLandingPageShipmentInfo', function()
   --  WorldPlan:print("Requesting shipments data.")
@@ -303,10 +313,15 @@
 
 
 function ClassPlan:Toggle()
-  if self:IsShown() then
+  print('Toggle()', self:IsVisible(), self:IsShown())
+  if self:IsVisible() then
+    print('fade out')
+    self.data.IsShown = false
     self.FadeOut:Play()
   else
+    print('fade in')
     self.data.IsShown = true
+    self:SetShown(true)
     self.FadeIn:Play()
   end
 end
@@ -342,6 +357,7 @@
 
 function ClassPlan:OnHide()
   print('|cFF00FFFFHide()')
+  self.isAnimating = nil
 end
 
 function ClassPlan:Reanchor()
--- a/ClassPlan.xml	Thu May 18 16:44:05 2017 -0400
+++ b/ClassPlan.xml	Thu May 25 17:24:00 2017 -0400
@@ -26,7 +26,7 @@
       <AnimationGroup parentKey="FadeIn" setToFinalAlpha="true">
         <Alpha parentKey="AlphaFade" fromAlpha="0" toAlpha="1" duration=".3" order="1" />
       </AnimationGroup>
-      <AnimationGroup parentKey="FadeOut">
+      <AnimationGroup parentKey="FadeOut" setToFinalAlpha="true">
 
         <Alpha parentKey="AlphaFade" fromAlpha="1" toAlpha="0" duration=".3" order="1" />
       </AnimationGroup>
--- a/ClassPlanShipments.lua	Thu May 18 16:44:05 2017 -0400
+++ b/ClassPlanShipments.lua	Thu May 25 17:24:00 2017 -0400
@@ -107,12 +107,13 @@
       AddShipmentInfo(AK_NOTES, name, texture, shipmentCapacity, shipmentsReady, shipmentsTotal, creationTime, duration, timeleftString)
     end
 
-    local talentTrees = CG_GetTalentTrees(garrisonType, select(3, UnitClass("player")));
+    local talentTrees = C_Garrison.GetTalentTreeIDsByClassID(garrisonType, select(3, UnitClass("player")));
     -- this is a talent that has completed, but has not been seen in the talent UI yet.
     local completeTalentID = CG_GetCompleteTalent(garrisonType);
-    --print('Talents:')
+    print('Talents:')
     if (talentTrees) then
-      for treeIndex, tree in ipairs(talentTrees) do
+      for treeIndex, treeID in ipairs(talentTrees) do
+        local _, _, tree = C_Garrison.GetTalentTreeInfoForID(garrisonType, treeID);
         for talentIndex, talent in ipairs(tree) do
           local showTalent = false;
           if (talent.isBeingResearched) or (talent.id == completeTalentID) then
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MapFrame.lua	Thu May 25 17:24:00 2017 -0400
@@ -0,0 +1,36 @@
+--
+-- Created by IntelliJ IDEA.
+-- User: Nick
+-- Date: 5/24/2017
+-- Time: 9:27 PM
+-- To change this template use File | Settings | File Templates.
+--
+
+WorldPlanMapFrameMixin = {
+  defaults = {
+    anchors = {
+      point = 'LEFT',
+      x = 50,
+    },
+    size = {
+      x = 800,
+      y = 600
+    }
+  }
+
+}
+local Module = WorldPlanMapFrameMixin
+
+function Module:OnLoad()
+  WorldPlan:AddHandler(self)
+
+
+end
+
+function Module:Setup()
+  self:ApplySettings()
+end
+
+function Module:ApplySettings()
+
+end
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MapFrame.xml	Thu May 25 17:24:00 2017 -0400
@@ -0,0 +1,13 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+    <Script file="MapFrame.lua" />
+
+    <Frame name="WorldPlanMapFrame" mixin="WorldPlanMapFrameMixin">
+        <Scripts>
+            <OnShow method="OnShow" />
+            <OnHide method="OnHide" />
+            <OnUpdate method="OnUpdate" />
+        </Scripts>
+    </Frame>
+
+</Ui>
\ No newline at end of file
--- a/QuestPOI.lua	Thu May 18 16:44:05 2017 -0400
+++ b/QuestPOI.lua	Thu May 25 17:24:00 2017 -0400
@@ -40,8 +40,8 @@
 local dprint = DEVIAN_WORKSPACE and function(...) _G.print('WQData', ...) end or nop
 local QuestPOI = WorldPlanPOIMixin
 
-local pinBaseIndex = 1520
-local overlayBaseIndex = 1580
+local pinBaseIndex = 1400
+local overlayBaseIndex = 1450
 local previousHighlight
 
 local FADE_TIMING_MULTIPLIER = 3
@@ -530,15 +530,11 @@
     return
   end
 
-  if self.maxAlertLevel then
+  if self.isStale then
+    self:Refresh()
+  elseif self.maxAlertLevel then
     self:UpdateStatus()
   end
-
-
-  if self.isStale then
-    self:Refresh()
-  end
-
 end
 
 
@@ -936,8 +932,10 @@
     print('queued for Refresh')
     self.isStale = true
     return nil
+  elseif IsQuestComplete(self.questID) then
+    self:Release()
+    return nil
   end
-
   if self.checkCriteria then
     self:OnCriteria()
   end
@@ -1071,21 +1069,21 @@
   self.tagIcon:SetAtlas(self.tagAtlas)
   self.EliteBorder:SetShown(self.isElite and not self.filtered)
 
-  self:UpdateStatus()
 
   if self.isBounty then
-    --print('is bounty')
+    print('is bounty')
     iconBorder:SetVertexColor(trackingBorder:GetVertexColor())
     trackingBorder:SetVertexColor(unpack(BORDER_SELECTED_BOUNTY))
   elseif self.isCriteria then
-    --print('is criteria of a bounty')
+    print('is criteria of a bounty')
     iconBorder:SetVertexColor(trackingBorder:GetVertexColor())
     trackingBorder:SetVertexColor(unpack(BORDER_CRITERIA))
   else
-
+    print('is nothing')
     iconBorder:SetVertexColor(unpack(borderColor))
     trackingBorder:SetVertexColor(0,0,0,.5)
   end
+  self:UpdateStatus()
 
   if SpellCanTargetQuest() then
     if self.isSpellTarget then
@@ -1125,9 +1123,6 @@
         tl = timeState
         self.timeLabel:SetText(text)
       end
-      if style then
-        self.RewardBorder:SetVertexColor(style.r, style.g, style.b, style.a)
-      end
     end
 
     self.alertLevel = tl
--- a/WorldPlan.lua	Thu May 18 16:44:05 2017 -0400
+++ b/WorldPlan.lua	Thu May 25 17:24:00 2017 -0400
@@ -643,6 +643,11 @@
   self.dataFlush = nil
 end
 
+function WorldPlanCore:SetHook(base, arg1, arg2)
+  if type(base) == 'table' then
+  end
+
+end
 
 
 
--- a/WorldPlan.toc	Thu May 18 16:44:05 2017 -0400
+++ b/WorldPlan.toc	Thu May 25 17:24:00 2017 -0400
@@ -16,4 +16,5 @@
 ClassPlan.xml
 ClassPlanMissions.xml
 ClassPlanShipments.xml
-ClassPlanFollowers.xml
\ No newline at end of file
+ClassPlanFollowers.xml
+MapFrame.xml
\ No newline at end of file
--- a/WorldQuests.lua	Thu May 18 16:44:05 2017 -0400
+++ b/WorldQuests.lua	Thu May 25 17:24:00 2017 -0400
@@ -331,7 +331,8 @@
 end
 
 function Module:UpdateBounties(...)
-    print('|cFF00FF88BountyInfo()|r', ...)
+  bountiesDirty = nil
+  print('|cFF00FF88BountyInfo()|r', ...)
   wipe(db.BountiesByFactionID)
   wipe(db.BountiesByQuestID)
 
@@ -353,7 +354,6 @@
         print(' ', index, info.factionID, GetQuestLogTitle(GetQuestLogIndexByID(info.questID)), info.complete, (index == selectedBountyIndex) and 'SELECTED' or '')
       end
   end
-  bountiesDirty = nil
 end
 
 -- check current artifact knowledge and update pins accordingly
@@ -410,6 +410,11 @@
     print(msg, lastRefresh, ...)
   end
 
+
+  if bountiesDirty then
+    self:UpdateBounties()
+  end
+
   if not db.Config.EnablePins then
     numShown = 0
     self.refreshBenchMark = GetTime()