view ClassPlanFollowers.lua @ 113:03e4a8b93012 v7.3.0-2

7.3 Updates - Added some map frame adjustments to keep the filter bar from obstructing edge of zone clicks KNOWN ISSUES: - Argus quests can only be filtered when viewing Argus maps - Main Argus map in the WorldMapFrame has misaligned pins; this is due to it using a different map texture from what is used in the teleporter map, so all the POI coordinates are based on that map in the client info
author Nenue
date Tue, 05 Sep 2017 03:14:34 -0400
parents b29b35cb8539
children a4dfdd4f1cf3
line wrap: on
line source

local print = DEVIAN_WORKSPACE and function(...) print('ClassPlan', ...) end or nop
local c  = {

  templateName = 'ClassPlanShipmentEntry',
  listKey = {'followers','troops'},
  listTitle = {'Followers'},
  events = {
    'GARRISON_FOLLOWER_LIST_UPDATE',
    'GARRISON_FOLLOWER_XP_CHANGED',
    'GARRISON_FOLLOWER_DURABILITY_CHANGED',
    'GARRISON_FOLLOWER_UPGRADED',
    'GARRISON_FOLLOWER_REMOVED'
  }
}


function c:OnLoad()
  print('Followers:OnLoad()')
  self.followerType = 4
  -- follower type, versus garrison_type
end

function c:OnEvent(event, ...)
  print('|cFF00FF00'..self:GetName()..':OnEvent()|r', event, ...)
  self:GetPlayerData()
end

function c:OnUpdate() end

function c:GetPlayerData()

  print('|cFF0088FF'..self:GetName()..':GetPlayerData()|r')
  local profileList = self:GetParent().profile.followers
  local troopList = self:GetParent().profile.troops

  local followerInfo = C_Garrison.GetFollowers(self.followerType)


  if followerInfo then
    table.wipe(profileList)
    for followerID, follower in pairs(followerInfo) do
      print(FOLLOWER_QUALITY_COLORS[follower.quality].hex, follower.name, follower.isTroop)
      if follower.isTroop then
        troopList[followerID] = follower
      else
        print(follower.isMaxLevel, follower.xp, follower.levelXP, follower.iLevel)

        profileList[followerID] = follower
      end


      profileList[followerID] = follower
    end
  end

end

function c:UpdateItems()

  local profileList = self:GetParent().profile.followers

  local troopList = self:GetParent().profile.troops

  

end
function c:Reanchor()
end


ClassPlanFollowerMixin = CreateFromMixins(ClassPlanHandlerBase, c)