Quantcast

broken commit

Alex Shubert [04-05-12 - 22:10]
broken commit
Filename
AutoTurnIn.lua
RewardOptions.lua
localization_DE.lua
localization_EN.lua
localization_RU.lua
diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua
index 2811075..cfc0635 100644
--- a/AutoTurnIn.lua
+++ b/AutoTurnIn.lua
@@ -234,7 +234,7 @@ function AutoTurnIn:IsRangedAndRequired(subclass)
 end

 function AutoTurnIn:IsOffhandAndRequired(equipSlot)
-	return (AutoTurnInCharacterDB.armor[INVTYPE_HOLDABLE] and INVTYPE_HOLDABLE == equipSlot)
+	return (AutoTurnInCharacterDB.armor[INVTYPE_HOLDABLE] and 'INVTYPE_HOLDABLE' == equipSlot)
 end

 function AutoTurnIn:IsJewelryAndRequired(equipSlot)
@@ -295,14 +295,14 @@ function AutoTurnIn:Need()
 		local link = GetQuestItemLink("choice", i)

 		if ( link == nil ) then
-			self:Print(MSG_ITEMLINKISNULL)
+			self:Print(self.MSG_ITEMLINKISNULL)
 			return true
 		end

 		local class, subclass, _, equipSlot = select(6, GetItemInfo(link))
 		--[[relics and trinkets are out of autoloot]]--
 		if  (UnitHasRelicSlot("player") and 'INVTYPE_RELIC' == equipSlot) or 'INVTYPE_TRINKET' == equipSlot then
-			self:Print(MSG_STOPITEM)
+			self:Print(self.MSG_STOPITEM)
 			return true
 		end

@@ -318,7 +318,7 @@ function AutoTurnIn:Need()

 		--Same here: if no stat specified or item stat is chosen then item is wanted
 		local OkByStat = (not next(AutoTurnInCharacterDB.stat)) -- true if table is empty
-		if not OkByStat then
+		if (not OkByStat) and ('INVTYPE_RELIC' ~= equipSlot) then
 			wipe(self.stattable)
 			GetItemStats(link, self.stattable)
 			for stat, value in pairs(self.stattable) do
diff --git a/RewardOptions.lua b/RewardOptions.lua
index 0aed525..c90edbd 100644
--- a/RewardOptions.lua
+++ b/RewardOptions.lua
@@ -74,6 +74,26 @@ CreateCheckbox(armor[2], ArmorPanel, 10, -8)
 CreateCheckbox(armor[3], ArmorPanel, 152, -8)
 CreateCheckbox(armor[4], ArmorPanel, 292, -8)
 CreateCheckbox(armor[5], ArmorPanel, 436, -8)
+
+local ArmorDropLabel = RewardPanel:CreateFontString(nil, "ARTWORK", "GameFontNormal")
+ArmorDropLabel:SetText("Armor type")
+local ArmorConst = {'---', armor[2], armor[3], armor[4],armor[5]}
+local ArmorDropDown = CreateFrame("Frame", O.."ToggleKeyDropDown", RewardPanel, "UIDropDownMenuTemplate")
+UIDropDownMenu_Initialize(ArmorDropDown, function (self, level)
+    for k, v in ipairs(ArmorConst) do
+        local info = UIDropDownMenu_CreateInfo()
+		info.text, info.value = v, k
+        info.func = function(self)
+						UIDropDownMenu_SetSelectedID(ArmorDropDown, self:GetID())
+						wipe(ptable.TempConfig.armor)
+						ptable.TempConfig.armor[self:GetText()] = true
+					end
+        UIDropDownMenu_AddButton(info, level)
+    end
+end)
+UIDropDownMenu_SetWidth(ArmorDropDown, 200);
+UIDropDownMenu_JustifyText(ArmorDropDown, "LEFT")
+
 	-- 2nd line
 CreateCheckbox(armor[6], ArmorPanel, 10, -40)
 CreateCheckbox("Jewelry", ArmorPanel, 190, -40, L['Jewelry'] )
@@ -100,6 +120,8 @@ ArmorPanel:SetPoint("TOPLEFT", WeaponPanel, "BOTTOMLEFT", 0, -20)
 StatPanel:SetPoint("TOPLEFT", ArmorPanel, "BOTTOMLEFT", 0, -20)
 GreedAfterNeed:SetPoint("TOPLEFT", StatPanel, "BOTTOMLEFT", 8, -16)

+
+ArmorDropDown:SetPoint("TOPLEFT", GreedAfterNeed, "BOTTOMLEFT", 8, -16)
 --[[ PANEL FINCTIONS ]]--
 RewardPanel.refresh = function()

diff --git a/localization_DE.lua b/localization_DE.lua
index dcadc43..88b62e2 100644
--- a/localization_DE.lua
+++ b/localization_DE.lua
@@ -80,7 +80,6 @@ privateTable.L.quests = {
 ['Gunst der Bruderschaft, Lavakern']={item="Lavakern", amount=1, currency=false},
 ['Anerkennung erlangen']={item="Dunkeleisenrückstände", amount=4, currency=false},
 ['Noch mehr Anerkennung erlangen']={item="Dunkeleisenrückstände", amount=100, currency=false},
-['Zwielichthalsbänder']={item="Zwielichthalsband", amount=20, currency=false},

 --[[Burning Crusade]]--
 --Lower City
diff --git a/localization_EN.lua b/localization_EN.lua
index ba4162a..0dec1f0 100644
--- a/localization_EN.lua
+++ b/localization_EN.lua
@@ -75,7 +75,6 @@ privateTable.L.quests = {
 ['Favor Amongst the Brotherhood, Lava Core']={item="Lava Core", amount=1, currency=false},
 ['Gaining Acceptance']={item="Dark Iron Residue", amount=4, currency=false},
 ['Gaining Even More Acceptance']={item="Dark Iron Residue", amount=100, currency=false},
-['Twilight Collars']={item="Twilight Collar", amount=20, currency=false},


 --[[Burning Crusade]]--
diff --git a/localization_RU.lua b/localization_RU.lua
index c4a46b2..9d2cb07 100644
--- a/localization_RU.lua
+++ b/localization_RU.lua
@@ -75,7 +75,6 @@ privateTable.L.quests = {
 -- Thorium Brotherhood
 ["Завоевать еще большую благосклонность"]={item="Окалина черного железа", amount=100, currency=false},
 ["Завоевать благосклонность"]={item="Окалина черного железа", amount=4, currency=false},
-["Сумеречные ожерелья"]={item="Сумеречное ожерелье", amount=20, currency=false},
 ["Покровительство братства, кожа Недр"]={item="Кожа Недр", amount=2, currency=false},
 ["Покровительство братства, кровь горы"]={item="Кровь Горы", amount=1, currency=false},
 ["Покровительство братства, огненное ядро"]={item="Огненное ядро", amount=1, currency=false},