From b66ad907067cb4d0c32fb6e949c9d01b9c3417d0 Mon Sep 17 00:00:00 2001 From: Alex Shubert Date: Wed, 28 Nov 2012 21:36:11 +0400 Subject: [PATCH] - --- AutoTurnIn.lua | 12 +++++++----- AutoTurnIn.toc | 2 +- QuestLevel.lua | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua index e1d733f..6cbe84f 100644 --- a/AutoTurnIn.lua +++ b/AutoTurnIn.lua @@ -363,8 +363,8 @@ function AutoTurnIn:ItemLevel(itemLink) return 0 end -- 7 for heirloom http://wowprogramming.com/docs/api_types#itemQuality - local invQuality, invLevel = select(3, GetItemInfo(invLink)) - return (invQuality == 7) and math.huge or invLink + local invQuality, invLevel = select(3, GetItemInfo(itemLink)) + return (invQuality == 7) and math.huge or itemLink end -- turns quest in printing reward text if `showrewardtext` option is set. @@ -374,9 +374,10 @@ function AutoTurnIn:TurnInQuest(rewardIndex) if (AutoTurnInCharacterDB.showrewardtext) then self:Print((UnitName("target") and UnitName("target") or '')..'\n', GetRewardText()) end - - if self.forceGreed then - if GetNumQuestChoices() > 0 then + + -- Greed or just a single reward + if (self.forceGreed) or (GetNumQuestChoices() == 1) then + if (GetNumQuestChoices() > 1) then self:Print(L["gogreedy"]) end else @@ -440,6 +441,7 @@ function AutoTurnIn:Greed() end if money > 0 then -- some quests, like tournament ones, offer reputation rewards and they have no cost. + self.forceGreed = true self:TurnInQuest(index) end end diff --git a/AutoTurnIn.toc b/AutoTurnIn.toc index 747904a..43cff81 100644 --- a/AutoTurnIn.toc +++ b/AutoTurnIn.toc @@ -1,4 +1,4 @@ -## Interface: 50001 +## Interface: 50100 ## Title: AutoTurnIn ## Version: 3.0 ## Author: Lur diff --git a/QuestLevel.lua b/QuestLevel.lua index 32b67e3..793668f 100644 --- a/QuestLevel.lua +++ b/QuestLevel.lua @@ -57,7 +57,7 @@ function AutoTurnIn:ShowQuestLevelInWatchFrame() local questTypeIndex = GetQuestLogQuestType(questIndex) tagString = AutoTurnIn.QuestTypesIndex[questTypeIndex] if (not tagString) then - self:Print("Please, inform addon author unknown QT for: " ..title) + AutoTurnIn:Print("Please, inform addon author unknown QT for: " ..title) tagString = "" end textLine.text:SetText(AutoTurnIn.WatchFrameLevelFormat:format(level, tagString, isDaily and "\*" or "", title)) -- 1.7.9.5