fixed long standing fontstring alpha bug

fixed calls to getgossip...quests for 5.0
fixed repeated npc interact bug on QUEST_PROGRESS for 5.0
updated TOC
This commit is contained in:
SabinDeus 2012-08-27 23:41:42 +00:00
parent 6ca6548640
commit 938033ded7
2 changed files with 30 additions and 12 deletions

View File

@ -207,6 +207,9 @@ function TI_SlashCmdHandler(cmd)
window = function () window = function ()
TI_OptionsFrame:Show(); TI_OptionsFrame:Show();
end, end,
config = function ()
TI_OptionsFrame:Show();
end,
recent = function () recent = function ()
TI_TempNPCListWindow:Show(); TI_TempNPCListWindow:Show();
end, end,
@ -314,7 +317,7 @@ function TI_OnEvent(self, event, ...)
TI_debug("Quest Detail"); TI_debug("Quest Detail");
TI_gossipclosed = false; TI_gossipclosed = false;
if(TI_IsNPCOn(UnitName("npc"), "availquest")) then if(TI_IsNPCOn(UnitName("npc"), "availquest")) then
AcceptQuest(); TI_HandleAcceptQuest();
end end
TI_ResetPointers(); TI_ResetPointers();
end end
@ -328,6 +331,11 @@ function TI_OnEvent(self, event, ...)
end end
end end
function TI_HandleAcceptQuest()
QuestInfoFadingFrame_OnUpdate(QuestInfoFadingFrame, 1);
QuestDetailAcceptButton_OnClick();
end
function TI_HandleQuestProgress() function TI_HandleQuestProgress()
local questname = GetTitleText(); local questname = GetTitleText();
@ -357,10 +365,12 @@ end
function TI_CompleteQuest() function TI_CompleteQuest()
if(IsQuestCompletable()) then if(IsQuestCompletable()) then
TI_debug("quest is completable, completeing");
CompleteQuest(); CompleteQuest();
TI_ResetPointers(); TI_ResetPointers();
else else
DeclineQuest(); TI_debug("quest is not completable, declining");
QuestDetailDeclineButton_OnClick();
end end
end end
@ -616,17 +626,20 @@ end
function TI_TabulateGossipAvailableQuests(...) function TI_TabulateGossipAvailableQuests(...)
local x = {}; local x = {};
for i=1, select("#", ...), 5 do for i=1, select("#", ...), 6 do
local temp = {}; local temp = {};
temp.name = select(i, ...); temp.name = select(i, ...);
isTrivial = select(i+2, ...); local isTrivial = select(i+2, ...);
isDaily = select(i+3, ...); local isDaily = select(i+3, ...);
isRepeatable = select(i+4, ...); local isRepeatable = select(i+4, ...);
local isLegendary = select(i+5, ...);
if ( isDaily ) then if ( isDaily ) then
temp.icon = "Interface\\GossipFrame\\DailyQuestIcon"; temp.icon = "Interface\\GossipFrame\\DailyQuestIcon";
elseif ( isRepeatable ) then elseif ( isRepeatable ) then
temp.icon = "Interface\\GossipFrame\\DailyActiveQuestIcon"; temp.icon = "Interface\\GossipFrame\\DailyActiveQuestIcon";
elseif ( isLegendary ) then
temp.icon = "Interface\\GossipFrame\\AvailableLegendaryQuestIcon";
else else
temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon"; temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon";
end end
@ -639,13 +652,18 @@ end
function TI_TabulateGossipActiveQuests(...) function TI_TabulateGossipActiveQuests(...)
local x = {}; local x = {};
for i=1, select("#", ...), 4 do for i=1, select("#", ...), 5 do
local temp = {}; local temp = {};
temp.name = select(i, ...); temp.name = select(i, ...);
isComplete = select(i+3, ...); local isComplete = select(i+3, ...);
local isLegendary = select(i+4, ...);
if(isComplete) then if(isComplete) then
temp.icon = "Interface\\GossipFrame\\ActiveQuestIcon"; if(isLegendary) then
temp.icon = "Interface\\GossipFrame\\ActiveLegendaryQuestIcon";
else
temp.icon = "Interface\\GossipFrame\\ActiveQuestIcon";
end
else else
temp.icon = "Interface\\GossipFrame\\IncompleteQuestIcon"; temp.icon = "Interface\\GossipFrame\\IncompleteQuestIcon";
end end

View File

@ -1,7 +1,7 @@
## Interface: 40000 ## Interface: 50000
## X-Compatible-With: 40000 ## X-Compatible-With: 50000
## Title: Turn In ## Title: Turn In
## Notes: Automates the selection of quest and gossip options. ## Notes: Automates the selection of quest and gossip options.
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex ## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
## Version: 2.1 ## Version: 2.1
TurnIn.xml TurnIn.xml