diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua index 83b36c7..af5c3c8 100644 --- a/AutoTurnIn.lua +++ b/AutoTurnIn.lua @@ -544,67 +544,4 @@ function AutoTurnIn:QUEST_COMPLETE() self:TurnInQuest(1) -- index greater than '0' enables autoequip check. end end -end - -AutoTurnIn.QuestLevelFormat = " [%d] %s" -function AutoTurnIn:ShowQuestLevelInLog() - -- see function QuestLog_Update() in function QuestLogFrame.lua for details - local scrollOffset = HybridScrollFrame_GetOffset(QuestLogScrollFrame); - local numEntries, numQuests = GetNumQuestLogEntries(); - - for i=1, #QuestLogScrollFrame.buttons do - local questIndex = i + scrollOffset; - local button = QuestLogScrollFrame.buttons[i] - if ( questIndex <= numEntries ) then - local title, level, _, _, isHeader = GetQuestLogTitle(questIndex); - if (not isHeader and title) then - button:SetText(AutoTurnIn.QuestLevelFormat:format(level, title)) - QuestLogTitleButton_Resize(button) - end - end - end -end - --- gossip and quest interaction goes through a sequence of windows: gossip [shows a list of available quests] - quest[describes specified quest] --- sometimes some parts of this chain is skipped. For example, priest in Honor Hold show quest window directly. This is a trick to handle 'toggle key' -hooksecurefunc(QuestFrame, "Hide", function() AutoTurnIn.allowed = nil end) - --- Quest level in a log. -hooksecurefunc("QuestLog_Update", AutoTurnIn.ShowQuestLevelInLog) -hooksecurefunc(QuestLogScrollFrame, "update", AutoTurnIn.ShowQuestLevelInLog) - -AutoTurnIn.WatchFrameLevelFormat = "[%d%s%s] %s" -AutoTurnIn.QuestTypesIndex = { - [0] = "", --default - [1] = "g", --Group - [41] = "+", --PvP - [62] = "r", --Raid - [81] = "d", --Dungeon - [83] = "L", --Legendary - [85] = "h", --Heroic - [98] = "s", --Scenario QUEST_TYPE_SCENARIO - [102] = "a", -- Account -} -function AutoTurnIn:ShowQuestLevelInWatchFrame() - for i = 1, #WATCHFRAME_LINKBUTTONS do - button = WATCHFRAME_LINKBUTTONS[i] - - if( button.type == "QUEST" ) then - local questIndex = GetQuestIndexForWatch(button.index) - if questIndex then - local textLine = button.lines[button.startLine] - if textLine.text:GetText() and (not string.find("", "^%[.*%].*")) then - local title, level, _, _, _, _, _, isDaily = GetQuestLogTitle(questIndex) - local questTypeIndex = GetQuestLogQuestType(questIndex) - tagString = AutoTurnIn.QuestTypesIndex[questTypeIndex] - if (not tagString) then - self:Print("Please, inform addon author unknown QT for: " ..title) - tagString = "" - end - textLine.text:SetText(AutoTurnIn.WatchFrameLevelFormat:format(level, tagString, isDaily and "\*" or "", title)) - end - end - end - end -end -hooksecurefunc("WatchFrame_Update", AutoTurnIn.ShowQuestLevelInWatchFrame) \ No newline at end of file +end \ No newline at end of file diff --git a/AutoTurnIn.toc b/AutoTurnIn.toc index 3820856..9e1b0bd 100644 --- a/AutoTurnIn.toc +++ b/AutoTurnIn.toc @@ -21,6 +21,7 @@ loc\localization_FR.lua rewards_const.lua AutoTurnIn.lua +QuestLevel.lua ui\main_options.lua ui\reward_options.lua diff --git a/loc/localization_FR.lua b/loc/localization_FR.lua index 0232b31..1af0efd 100644 --- a/loc/localization_FR.lua +++ b/loc/localization_FR.lua @@ -26,16 +26,16 @@ privateTable.L = setmetatable({ ["tournamentPurse"]="Bourse de champion", -- 45724 ["DarkmoonTeleLabel"]="Sombrelune: téléporter au canon", - ["DarkmoonFaireTeleport"]="Téléportologue Mélébou", - ["DarkmoonAutoLabel"]="Sombrelune: Lancer le jeu!", + ["DarkmoonFaireTeleport"]="Téléportologue Mélébou", + ["DarkmoonAutoLabel"]="Sombrelune: Lancer le jeu!", ["The Jade Forest"]="La forêt de Jade", ["Scared Pandaren Cub"]="Bébé pandaren apeuré", - ["rewardtext"]="Écrire le texte de quête dans le chat", - ["autoequip"]="Équiper les objets de récompense", - ["togglekey"]="touche activer/désactiver", - + ["rewardtext"]="Écrire le texte de quête dans le chat", + ["autoequip"]="Équiper les objets de récompense", + ["togglekey"]="touche activer/désactiver", + ['Jewelry']="Joaillerie", ["rewardlootoptions"]="Règles d'objets de récompense", ['greedifnothing']="Cupidité si rien n'est trouvé",