Quantcast

* *2.6.4*

Alar of Daggerspine [06-30-15 - 00:38]
* *2.6.4*
Completed traits list in follower page for both Horde and Alliance
Added Seal of Tempered Fate as a unique category in mission control

Signed-off-by: Alar of Daggerspine <alar@aspide.it>
Filename
CHANGELOG.txt
FollowerPage.lua
GarrisonCommander.lua
GarrisonCommander.toc
Init.lua
MatchMaker.lua
MissionCache.lua
MissionControl.lua
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a8d0d3c..9c66af5 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,5 +1,9 @@
 *GarrisonCommander helps you when choosing the right follower for the right mission*

+* *2.6.4*
+Completed traits list in follower page for both Horde and Alliance
+Added Seal of Tempered Fate as a unique category in mission control
+
 * *2.6.3*
 Added Draenic Weaponry and Draenic Armor Set to the enhancement list

diff --git a/FollowerPage.lua b/FollowerPage.lua
index b60d04c..576831a 100644
--- a/FollowerPage.lua
+++ b/FollowerPage.lua
@@ -190,7 +190,7 @@ end
 function addon:FollowerPageStartUp()
 	self:RegisterEvent("GARRISON_FOLLOWER_UPGRADED","DelayedRefresh")
 	self:RegisterEvent("CHAT_MSG_LOOT","DelayedRefresh")
-	self:GarrisonTraitCountersFrame_OnLoad(GarrisonTraitCountersFrame, GARRISON_THREAT_COUNTER_TOOLTIP)
+	self:GarrisonTraitCountersFrame_OnLoad(GarrisonTraitCountersFrame, L["%s |4follower:followers with %s"])
 	self:HookScript(GarrisonTraitCountersFrame,"OnEvent","GarrisonTraitCountersFrame_OnEvent")
 	self:HookScript(GarrisonTraitCountersFrame,"OnShow","GarrisonTraitCountersFrame_OnShow")
 end
diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua
index 55d16c5..7f3e58d 100644
--- a/GarrisonCommander.lua
+++ b/GarrisonCommander.lua
@@ -767,9 +767,10 @@ function addon:CreatePrivateDb()
 						scroll=100,
 						apexis=100,
 						oil=100,
+						seal=100,
 						other=100
 					},
-					rewardOrder={1,2,3,4,5,6,7,8,9},
+					rewardOrder={1,2,3,4,5,6,7,8,9,10},
 					useOneChance=true,
 					minimumChance = 100,
 					minDuration = 0,
@@ -2502,7 +2503,11 @@ function over.GarrisonMissionButton_SetRewards(self, rewards, numRewards)
 				else
 					local name,link,quality,iLevel,level=GetItemInfo(reward.itemID)
 					if (name) then
-						Reward.Quantity:SetText(iLevel==1 and level or iLevel);
+						if (iLevel<500 and reward.quantity) then
+							Reward.Quantity:SetText(reward.quantity);
+						else
+							Reward.Quantity:SetText(iLevel==1 and level or iLevel);
+						end
 						Reward.Quantity:SetTextColor(ITEM_QUALITY_COLORS[quality].r,ITEM_QUALITY_COLORS[quality].g,ITEM_QUALITY_COLORS[quality].b)
 						Reward.Quantity:Show();
 					end
diff --git a/GarrisonCommander.toc b/GarrisonCommander.toc
index 583b9f1..76a0ac5 100644
--- a/GarrisonCommander.toc
+++ b/GarrisonCommander.toc
@@ -5,7 +5,7 @@
 ## Notes-frFR: Vous aide au moment de choisir le droit utilisateur pour la bonne mission
 ## Author: Alar of Daggerspine
 ## Version: @project-version@ 6.2.0
-## X-Version: 2.6.3
+## X-Version: 2.6.4
 ## X-Revision: @project-abbreviated-hash@
 ## eMail: alar@aspide.it
 ## URL: http://wow.aspide.it
diff --git a/Init.lua b/Init.lua
index 77e5e26..a72bd99 100644
--- a/Init.lua
+++ b/Init.lua
@@ -180,9 +180,24 @@ local items={
 [114086]={icon='inv_jewelry_necklace_70',quality=4},
 [114082]={icon='inv_bracer_cloth_reputation_c_01',quality=4},
 }
+local itemcaches={
+[118529]=655,--Cache of Highmaul Treasures,
+[122484]=670, --Blackrock Foundry Spoils,
+[128391]=685,--Iron Fleet Treasure Chest
+[122486]=700, --Blackrock Foundry Spoils
+[120301]=600, -- Folower Generic armor upgrade
+[120302]=600, -- Folower Generic weapon upgrade
+
+}
+function addon:GetTrueLevel(itemid,itemlevel)
+	return itemcaches[itemid] or itemlevel
+end
 for i=1,#upgrades do
 	local _,id,level=strsplit(':',upgrades[i])
-	followerItems[id]=level
+	followerItems[tonumber(id)]=level
+end
+function addon:IsFollowerUpgrade(id)
+	return followerItems[id]
 end
 function addon:GetUpgrades()
 	return upgrades
@@ -223,75 +238,95 @@ function addon:GetType(itemID)
 	if (followerItems[itemID]) then return "followerEquip" end
 	return "generic"
 end
---Data
-if ns.toc < 60200 then
-ns.traitTable= {
-		{
-			[9] = "Wastelander",
-		[7] = "Mountaineer",
-		[45] = "Cave Dweller",
-		[46] = "Guerilla Fighter",
-		[44] = "Naturalist",
-		[48] = "Marshwalker",
-		[49] = "Plainsrunner",
-		[8] = "Cold-Blooded",
-	}, -- [1]
-	{
-		[79] = "Scavenger",
-		[80] = "Extra Training",
-		[29] = "Fast Learner",
-		[256] = "Treasure Hunter",
-	}, -- [2]
-	{
-		[76] = "High Stamina",
-		[221] = "Epic Mount",
-		[77] = "Burst of Power",
-	}, -- [3]
-	[5] = {
-		[61] = "Tailoring",
-		[52] = "Mining",
-		[54] = "Alchemy",
-		[56] = "Enchanting",
-		[58] = "Inscription",
-		[60] = "Leatherworking",
-		[62] = "Skinning",
-		[53] = "Herbalism",
-		[55] = "Blacksmithing",
-		[57] = "Engineering",
-		[59] = "Jewelcrafting",
-	},
-	[6] = {
-		[73] = "Voodoo Zealot",
-		[63] = "Gnome-Lover",
-		[66] = "Child of the Moon",
-		[70] = "Child of Draenor",
-		[74] = "Elvenkind",
-		[67] = "Ally of Argus",
-		[71] = "Death Fascination",
-		[75] = "Economist",
-		[64] = "Humanist",
-		[68] = "Canine Companion",
-		[72] = "Totemist",
-		[65] = "Dwarvenborn",
-		[69] = "Brew Aficionado",
-	},
-	[7] = {
-		[37] = "Beastslayer",
-		[39] = "Primalslayer",
-		[4] = "Orcslayer",
-		[43] = "Talonslayer",
-		[36] = "Demonslayer",
-		[38] = "Ogreslayer",
-		[40] = "Gronnslayer",
-		[42] = "Voidslayer",
-		[41] = "Furyslayer",
-	},
-}
-else
+-- Thanks to wowheade
 ns.traitTable={
-[1]={  [9]="Wastelander",  [7]="Mountaineer",  [45]="Cave Dweller",  [46]="Guerilla Fighter",  [44]="Naturalist",  [48]="Marshwalker",  [49]="Plainsrunner",  [8]="Cold-Blooded"},[2]={  [80]="Extra Training",  [314]="Greasemonkey",  [79]="Scavenger",  [256]="Treasure Hunter",  [29]="Fast Learner"},[3]={  [76]="High Stamina",  [221]="Epic Mount",  [77]="Burst of Power"},[6]={  [61]="Tailoring",  [52]="Mining",  [54]="Alchemy",  [56]="Enchanting",  [58]="Inscription",  [60]="Leatherworking",  [62]="Skinning",  [53]="Herbalism",  [55]="Blacksmithing",  [57]="Engineering",  [59]="Jewelcrafting"},[7]={  [64]="Humanist",  [66]="Child of the Moon",  [68]="Canine Companion",  [65]="Dwarvenborn",  [67]="Ally of Argus",  [69]="Brew Aficionado",  [63]="Gnome-Lover"},[8]={  [37]="Beastslayer",  [39]="Primalslayer",  [4]="Orcslayer",  [43]="Talonslayer",  [36]="Demonslayer",  [38]="Ogreslayer",  [40]="Gronnslayer",  [42]="Voidslayer",  [41]="Furyslayer"}
+[1]={
+	[45]="Cave Dweller",
+	[8]="Cold-Blooded",
+	[46]="Guerilla Fighter",
+	[48]="Marshwalker",
+	[7]="Mountaineer",
+	[44]="Naturalist",
+	[49]="Plainsrunner",
+	[9]="Wastelander",
+},
+[2]={
+	[326] = "Apexis Attenuation",
+	[80]  ="Extra Training",
+	[29]  ="Fast Learner",
+	[314] ="Greasemonkey",
+	[236] = "Heartstone Pro",
+	[248] = "Mentor",
+	[79]  ="Scavenger",
+	[256] ="Treasure Hunter",
+},
+[3]={
+	[77]="Burst of Power",
+	[221]="Epic Mount",
+	[76]="High Stamina",
+	[250]="Speed of Light",
+},
+[4]={
+	[201]="Combat Experience",
+	[303]="Demonic Knowledge",
+	[47]="Master Assassin",
+},
+[5]={
+	[244]="Brute",
+	[78]="Lone Wolf",
+},
+[6]={
+	[54]="Alchemy",
+	[227]="Angler",
+	[55]="Blacksmithing",
+	[231]="Bodyguard",
+	[56]="Enchanting",
+	[57]="Engineering",
+	[62]="Evergreen",
+	[53]="Herbalism",
+	[52]="Mining",
+	[58]="Inscription",
+	[59]="Jewelcrafting",
+	[60]="Leatherworking",
+	[62]="Skinning",
+	[61]="Tailoring",
+},
+[7]={
+	[67] = "Ally of Argus",
+	[254]= "Bird Watcher",
+	[69] = "Brew Aficionado",
+	[68] = "Canine Companion",
+	[70] = "Child of Draenor",
+	[66] = "Child of the Moon",
+	[71] = "Death Fascination",
+	[65] = "Dwarvenborn",
+	[75] = "Economist",
+	[74] = "Elvenkind",
+	[63] = "Gnome-Lover",
+	[64] = "Humanist",
+	[253]= "Mechano Affictionado",
+	[252]= "Ogre Buddy",
+	[72] = "Totemist",
+	[73] = "Voodoo Zealot",
+	[255]= "Wildling",
+},
+[8]={
+	[37]="Beastslayer",
+	[36]="Demonslayer",
+	[325]="Exorcist",
+	[41]="Furyslayer",
+	[40]="Gronnslayer",
+	[38]="Ogreslayer",
+	[4]="Orcslayer",
+	[39]="Primalslayer",
+	[43]="Talonslayer",
+	[42]="Voidslayer",
+},
+[9]={
+	[232]="Dancer"
 }
-end
+}
+
 -- Pseudo Global Support.
 -- Calling ns.Configure() will give to the calling function a preloaded env

diff --git a/MatchMaker.lua b/MatchMaker.lua
index 94f0a3b..767434d 100644
--- a/MatchMaker.lua
+++ b/MatchMaker.lua
@@ -88,12 +88,7 @@ function filters.xp(followerID,missionID)
 	return filters.maxed(followerID,missionID) or filters.other(followerID,missionID)
 end
 --alias
---filters.resources=filters.generic
---filters.oil=filters.generic
---filters.gold=filters.generic
---filters.equip=filters.generic
---filters.followerEquip=filters.generic
---filters.epic=filters.generic
+
 local nop={addRow=function() end}
 local scroller=nop
 local function CreateFilter(missionClass)
@@ -265,8 +260,9 @@ local function MatchMaker(self,missionID,party,includeBusy,onlyBest)
 		party.resources=mission.resources
 		party.oil=mission.oil
 		party.apexis=mission.apexis
-		party.epic=mission.epic
+		party.seal=mission.seal
 		party.other=mission.other
+		party.rush=mission.rush
 	end
 	P:StoreFollowers(party.members)
 	P:Close(party)
diff --git a/MissionCache.lua b/MissionCache.lua
index 7b0c62e..b919c11 100644
--- a/MissionCache.lua
+++ b/MissionCache.lua
@@ -18,7 +18,6 @@ local Mbase = GMFMissions
 --	C_Garrison.GetAvailableMissions(self.availableMissions);
 local Index={}
 local sorted={}
-local ItemRewards={122484,118529,128391}
 local rushOrders="interface\\icons\\inv_scroll_12.blp"
 local function keyToIndex(key)
 	local idx=Index[key]
@@ -105,6 +104,7 @@ function addon:AddExtraData(mission)
 	mission.resources=0
 	mission.oil=0
 	mission.apexis=0
+	mission.seal=0
 	mission.gold=0
 	mission.followerUpgrade=0
 	mission.itemLevel=0
@@ -120,13 +120,12 @@ function addon:AddExtraData(mission)
 		if v.currencyID and v.currencyID==GARRISON_CURRENCY then mission.resources=v.quantity end
 		if v.currencyID and v.currencyID==GARRISON_SHIP_OIL_CURRENCY then mission.oil=v.quantity end
 		if v.currencyID and v.currencyID==823 then mission.apexis =mission.apexis+v.quantity end
+		if v.currencyID and v.currencyID==994 then mission.seal =mission.seal+v.quantity end
 		if v.currencyID and v.currencyID==0 then mission.gold =mission.gold+v.quantity/10000 end
 		if v.icon=="Interface\\Icons\\XPBonus_Icon" and v.followerXP then
 			mission.xpBonus=mission.xpBonus+v.followerXP
 		elseif (v.itemID) then
-			if tcontains(ItemRewards,v.itemID) then
-				mission.itemLevel=655
-			elseif v.itemID~=120205 then -- xp item
+			if v.itemID~=120205 then -- xp item
 				local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount,itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(v.itemID)
 				if (not itemName or not itemTexture) then
 					mission.class="retry"
@@ -135,10 +134,14 @@ function addon:AddExtraData(mission)
 				if itemTexture:lower()==rushOrders then
 					mission.rush=mission.rush+v.quantity
 				elseif itemName and (not v.quantity or v.quantity==1) and not v.followerXP then
-					if itemLevel > 1 and itemMinLevel >=90 then
+					itemLevel=addon:GetTrueLevel(v.itemID,itemLevel)
+					if mission.missionID==364 then print(4,itemLevel) end
+					if (addon:IsFollowerUpgrade(v.itemID)) then
+						mission.followerUpgrade=itemRarity
+					elseif itemLevel > 500 and itemMinLevel >=90 then
 						mission.itemLevel=itemLevel
 					else
-						mission.followerUpgrade=itemRarity
+						mission.others=mission.others+v.quantity
 					end
 				else
 					mission.others=mission.others+v.quantity
@@ -159,6 +162,10 @@ function addon:AddExtraData(mission)
 		mission.class='apexis'
 		mission.maxable=true
 		mission.mat=true
+	elseif mission.seal > 0 then
+		mission.class='seal'
+		mission.maxable=fase
+		mission.mat=false
 	elseif mission.gold >0 then
 		mission.class='gold'
 		mission.maxable=true
@@ -167,11 +174,9 @@ function addon:AddExtraData(mission)
 		mission.class='itemLevel'
 	elseif mission.followerUpgrade>0 then
 		mission.class='followerUpgrade'
-	elseif mission.itemLevel>=645 then
-		mission.class='epic'
 	elseif mission.rush>0 then
 		mission.class='rush'
-	elseif numrewards > 1 then
+	elseif mission.others >0 or numrewards > 1 then
 		mission.class='other'
 	else
 		mission.class='xp'
diff --git a/MissionControl.lua b/MissionControl.lua
index d55d37d..f2fd2a9 100644
--- a/MissionControl.lua
+++ b/MissionControl.lua
@@ -29,7 +29,8 @@ local tItems = {
 	{t = 'Enable/Disable follower equip enhancement.', i = 'Interface\\ICONS\\Garrison_ArmorUpgrade', key = 'followerUpgrade'},
 	{t = 'Enable/Disable item tokens.', i = "Interface\\ICONS\\INV_Bracer_Cloth_Reputation_C_01", key = 'itemLevel'},
 	{t = 'Enable/Disable apexis.', i = "Interface\\Icons\\inv_apexis_draenor", key = 'apexis'},
-	{t = 'Enable/Disable other rewards.', i = "Interface\\ICONS\\INV_Box_02", key = 'other'}
+	{t = 'Enable/Disable other rewards.', i = "Interface\\ICONS\\INV_Box_02", key = 'other'},
+	{t = 'Enable/Disable Seal.', i = "Interface\\Icons\\ability_animusorbs", key = 'seal'}
 }
 local tOrder
 local tSort={}
@@ -48,18 +49,18 @@ function module:GMCCreateMissionList(workList)
 		local discarded=false
 		local class=self:GetMissionData(missionID,"class")
 		repeat
-			--print("|cffff0000",'Examing',missionID,self:GetMissionData(missionID,"name"),class,"|r")
+			print("|cffff0000",'Examing',missionID,self:GetMissionData(missionID,"name"),class,"|r")
 			local durationSeconds=self:GetMissionData(missionID,'durationSeconds')
 			if (durationSeconds > settings.maxDuration * 3600 or durationSeconds <  settings.minDuration * 3600) then
-				--print(missionID,"discarded due to len",durationSeconds /3600)
+				print(missionID,"discarded due to len",durationSeconds /3600)
 				break
 			end -- Mission too long, out of here
 			if (self:GetMissionData(missionID,'isRare') and settings.skipRare) then
-				--print(missionID,"discarded due to rarity")
+				print(missionID,"discarded due to rarity")
 				break
 			end
 			if (not ar[class]) then
-				--print(missionID,"discarded due to class == ", class)
+				print(missionID,"discarded due to class == ", class)
 				discarded=true
 				break
 			end
@@ -215,7 +216,7 @@ function module:GMC_OnClick_Start(this,button)
 	end
 	this:Disable()
 	GMC.ml.widget:SetTitleColor(C.Green())
-	module:GMCCreateMissionList(aMissions)
+	self:GMCCreateMissionList(aMissions)
 	wipe(GMCUsedFollowers)
 	wipe(GMC.ml.Parties)
 	self:RefreshFollowerStatus()
@@ -442,7 +443,7 @@ function module:OnInitialized()
 	warning:SetJustifyH("CENTER")
 	warning:SetTextColor(C.Orange())
 	if (settings.skipEpic) then warning:Show() else warning:Hide() end
-	GMC.skipEpic=factory:Checkbox(GMC,settings.skipEpic,L["Ignore epic followers for xp only missions"])
+	GMC.skipEpic=factory:Checkbox(GMC,settings.skipEpic,L["Ignore epic for xp missions."])
 	GMC.skipEpic:SetPoint("TOPLEFT",GMC.skipRare,"BOTTOMLEFT",0,-10)
 	GMC.skipEpic:SetScript("OnClick",function(this)
 		settings.skipEpic=this:GetChecked()
@@ -471,7 +472,7 @@ function module:GMCBuildChance()

 	GMC.cc = GMC.cf:CreateFontString()
 	GMC.cc:SetFontObject('GameFontNormalHuge')
-	GMC.cc:SetText('Success Chance')
+	GMC.cc:SetText(L['Success Chance'])
 	GMC.cc:SetPoint('TOP', 0, 0)
 	GMC.cc:SetTextColor(C:White())

@@ -484,7 +485,7 @@ function module:GMCBuildChance()
 	else
 		GMC.ct:SetTextColor(C:Silver())
 	end
-	GMC.cs = factory:Slider(GMC.cf,0,100,settings.minimumChance,'Minumum chance to start a mission')
+	GMC.cs = factory:Slider(GMC.cf,0,100,settings.minimumChance,L['Minumum requested success'])
 	GMC.cs:SetPoint('BOTTOM', 10, 0)
 	GMC.cs:SetScript('OnValueChanged', function(self, value)
 			local value = math.floor(value)
@@ -492,8 +493,8 @@ function module:GMCBuildChance()
 			settings.minimumChance = value
 	end)
 	GMC.cs:SetValue(settings.minimumChance)
-	GMC.ck=factory:Checkbox(GMC.cs,settings.useOneChance,"Use this percentage for all missions")
-	GMC.ck.tooltip="Unchecking this will allow you to set specific success chance for each reward type"
+	GMC.ck=factory:Checkbox(GMC.cs,settings.useOneChance,L["Global success chance"])
+	GMC.ck.tooltip=L["Unchecking this will allow you to set specific success chance for each reward type"]
 	GMC.ck:SetPoint("TOPLEFT",GMC.cs,"BOTTOMLEFT",-25,-10)
 	GMC.ck:SetScript("OnClick",function(this)
 		settings.useOneChance=this:GetChecked()
@@ -554,8 +555,8 @@ function module:GMCBuildDuration()
 	GMC.mt:SetPoint('CENTER', 0, 0)
 	GMC.mt:SetTextColor(1, 1, 1)

-	GMC.ms1 = factory:Slider(GMC.tf,0,24,settings.minDuration,'Minimum mission duration.')
-	GMC.ms2 = factory:Slider(GMC.tf,0,24,settings.maxDuration,'Maximum mission duration.')
+	GMC.ms1 = factory:Slider(GMC.tf,0,24,settings.minDuration,L['Minimum mission duration.'])
+	GMC.ms2 = factory:Slider(GMC.tf,0,24,settings.maxDuration,L['Maximum mission duration.'])
 	GMC.ms1:SetPoint('BOTTOM', 0, 0)
 	GMC.ms2:SetPoint('TOP', GMC.ms1,"BOTTOM",0, -25)
 	GMC.ms2.max=true
@@ -570,8 +571,8 @@ function module:GMCBuildRewards()
 	GMC.aif = CreateFrame('FRAME', nil, GMC)
 	GMC.itf = GMC.aif:CreateFontString()
 	GMC.itf:SetFontObject('GameFontNormalHuge')
-	GMC.itf:SetText('Allowed Rewards')
-	GMC.itf:SetPoint('TOP', 0, -10)
+	GMC.itf:SetText(L['Allowed Rewards'])
+	GMC.itf:SetPoint('TOP', 0, 0)
 	GMC.itf:SetTextColor(1, 1, 1)
 	GMC.ignoreFrames = {}
 	local ref=drawItemButtons()