Quantcast

Now Silver Tourney quests do not treated like ones with rewards list

Alex Shubert [09-16-12 - 16:19]
Now Silver Tourney quests do not treated like ones with rewards list
Filename
AutoTurnIn.lua
ui/main_options.lua
diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua
index ef7c4e3..a43445c 100644
--- a/AutoTurnIn.lua
+++ b/AutoTurnIn.lua
@@ -300,7 +300,7 @@ function AutoTurnIn:TurnInQuest(rewardIndex)
 	end

 	if self.forceGreed then
-		if GetNumQuestChoices() > 0 then
+		if GetNumQuestChoices() > 0 then
 			self:Print(L["gogreedy"])
 		end
 	else
@@ -468,16 +468,16 @@ function AutoTurnIn:QUEST_COMPLETE()

 	local quest = L.quests[GetTitleText()]
     if AutoTurnInCharacterDB.all or quest then
+		-- Tournament quest found
+		if (quest == "tournament") then
+			self:TurnInQuest(AutoTurnInCharacterDB.tournament)
+			return
+		end
+		--It's not tournament, so decide about loot by general settings
 		if GetNumQuestChoices() > 1 then
 			if AutoTurnInCharacterDB.lootreward > 1 then -- Auto Loot enabled!
 				self.forceGreed = false

-				-- Tournament quest found
-				if (quest == "tournament") then
-					self:TurnInQuest(AutoTurnInCharacterDB.tournament)
-					return
-				end
-
 				if (AutoTurnInCharacterDB.lootreward == 3) then
 					self.forceGreed = (not self:Need() ) and AutoTurnInCharacterDB.greedifnothingfound
 				end
diff --git a/ui/main_options.lua b/ui/main_options.lua
index 205a217..05bc7c6 100644
--- a/ui/main_options.lua
+++ b/ui/main_options.lua
@@ -91,11 +91,6 @@ UIDropDownMenu_Initialize(LootDropDown, function (self, level)
         info.func = function(self)
 						UIDropDownMenu_SetSelectedID(LootDropDown, self:GetID())
 						ptable.TempConfig.lootreward = self:GetID()
-						if ptable.TempConfig.lootreward == 1 then
-							UIDropDownMenu_DisableDropDown(TournamentDropDown)
-						else
-							UIDropDownMenu_EnableDropDown(TournamentDropDown)
-						end
 					end
         UIDropDownMenu_AddButton(info, level)
     end
@@ -194,9 +189,6 @@ OptionsPanel.refresh = function()

 	UIDropDownMenu_SetSelectedID(TournamentDropDown, ptable.TempConfig.tournament)
 	UIDropDownMenu_SetText(TournamentDropDown,TournamentConst[ptable.TempConfig.tournament])
-	if (ptable.TempConfig.lootreward == 1) then
-		UIDropDownMenu_DisableDropDown(TournamentDropDown)
-	end
 	DarkMoonCannon:SetChecked(ptable.TempConfig.darkmoonteleport)
 	DarkMoonAutoStart:SetChecked(ptable.TempConfig.darkmoonautostart)
 	ShowRewardText:SetChecked(ptable.TempConfig.showrewardtext)