comparison ClassPlanFollowers.lua @ 95:b29b35cb8539

- Fixed quest completion checking and handling - Changed animation method to hopefully stop weird flickering. - Pins are now visible before full reward data is loaded - Filter bar redesigned: - aligned horizontally along the top of the map display - filter buttons display a '+' when there are matches in both current and other zones, and '*' when there only matches in other zones - button tooltips separate local and global quests - button categories are highlighted and labeled when the cursor is over them - Fixed invalid POI targets appearing when the spell targeting cursor is active - ClassOrderPlan can be closed with the game menu button
author Nenue
date Mon, 08 May 2017 22:38:52 -0400
parents 589c444d4837
children a4dfdd4f1cf3
comparison
equal deleted inserted replaced
94:dfd53f7c0fe5 95:b29b35cb8539
1 1
2 local print = DEVIAN_WORKSPACE and function(...) print('ClassPlan', ...) end or nop 2 local print = DEVIAN_WORKSPACE and function(...) print('ClassPlan', ...) end or nop
3 local c = { 3 local c = {
4 4
5 templateName = 'ClassPlanShipmentEntry', 5 templateName = 'ClassPlanShipmentEntry',
6 listKey = {'followers'}, 6 listKey = {'followers','troops'},
7 listTitle = {'Followers'}, 7 listTitle = {'Followers'},
8 events = { 8 events = {
9 'GARRISON_FOLLOWER_LIST_UPDATE', 9 'GARRISON_FOLLOWER_LIST_UPDATE',
10 'GARRISON_FOLLOWER_XP_CHANGED', 10 'GARRISON_FOLLOWER_XP_CHANGED',
11 'GARRISON_FOLLOWER_DURABILITY_CHANGED', 11 'GARRISON_FOLLOWER_DURABILITY_CHANGED',
14 } 14 }
15 } 15 }
16 16
17 17
18 function c:OnLoad() 18 function c:OnLoad()
19 print('Followers:OnLoad()')
19 self.followerType = 4 20 self.followerType = 4
20 -- follower type, versus garrison_type 21 -- follower type, versus garrison_type
21 end 22 end
22 23
23 function c:OnEvent(event, ...) 24 function c:OnEvent(event, ...)
29 30
30 function c:GetPlayerData() 31 function c:GetPlayerData()
31 32
32 print('|cFF0088FF'..self:GetName()..':GetPlayerData()|r') 33 print('|cFF0088FF'..self:GetName()..':GetPlayerData()|r')
33 local profileList = self:GetParent().profile.followers 34 local profileList = self:GetParent().profile.followers
35 local troopList = self:GetParent().profile.troops
36
34 local followerInfo = C_Garrison.GetFollowers(self.followerType) 37 local followerInfo = C_Garrison.GetFollowers(self.followerType)
38
39
35 if followerInfo then 40 if followerInfo then
36 table.wipe(profileList) 41 table.wipe(profileList)
37 for followerID, follower in pairs(followerInfo) do 42 for followerID, follower in pairs(followerInfo) do
43 print(FOLLOWER_QUALITY_COLORS[follower.quality].hex, follower.name, follower.isTroop)
44 if follower.isTroop then
45 troopList[followerID] = follower
46 else
47 print(follower.isMaxLevel, follower.xp, follower.levelXP, follower.iLevel)
48
49 profileList[followerID] = follower
50 end
51
52
38 profileList[followerID] = follower 53 profileList[followerID] = follower
39 end 54 end
40 end 55 end
41 56
42 end 57 end
43 58
44 function c:UpdateItems() 59 function c:UpdateItems()
60
61 local profileList = self:GetParent().profile.followers
62
63 local troopList = self:GetParent().profile.troops
64
65
66
45 end 67 end
46 function c:Reanchor() 68 function c:Reanchor()
47 end 69 end
48 70
49 71