From 319ed0464b58e527d8cc524b67cd4b44619530b7 Mon Sep 17 00:00:00 2001 From: SabinDeus Date: Sun, 26 Mar 2017 03:56:57 +0000 Subject: [PATCH] Added gossip attach frame --- TurnIn.lua | 14 ++--- TurnIn.xml | 169 ++++++++++++++++++++++++--------------------------- TurnInUI.lua | 69 ++++++++++++++++++++- 3 files changed, 154 insertions(+), 98 deletions(-) diff --git a/TurnIn.lua b/TurnIn.lua index fd9e7cd..bb9b9ed 100755 --- a/TurnIn.lua +++ b/TurnIn.lua @@ -66,7 +66,7 @@ function TI_OnLoad() SlashCmdList["TI"]=TI_SlashCmdHandler; SLASH_TI1="/turnin"; SLASH_TI2="/ti"; - tinsert(UISpecialFrames,"TI_OptionsFrame"); + --tinsert(UISpecialFrames,"TI_OptionsFrame"); TI_slashtable = {}; TI_gossipopts = {}; TI_gossipclosed = false; @@ -128,6 +128,7 @@ end function TI_EventHandlers:GOSSIP_SHOW () TI_debug("Gossip Show"); if(GossipFrame:IsVisible()) then + TI_AttachFrameToGossip(GossipFrame); if(TI_gossipclosed) then TI_debug("resetting pointers"); TI_gossipclosed = false; @@ -140,7 +141,8 @@ end function TI_EventHandlers:GOSSIP_CLOSED () TI_debug("Gossip Closed"); if(not GossipFrame:IsVisible()) then - TI_gossipclosed = true; + TI_DetachFrame(); + TI_gossipclosed = true; end; end @@ -516,6 +518,7 @@ function TI_HandleGossipWindow(gorq) local thisnpc = TI_NPCDB[npcname]; if(thisnpc.state) then TI_debug("npc is active, using his options"); + TI_PopulateGossipOptionFrame(thisnpc); for i1,current in ipairs(thisnpc) do if (current.state == true) then TI_debug("Current Quest: "..current.name); @@ -562,6 +565,7 @@ function TI_HandleGossipWindow(gorq) end; TI_debug("using default config"); + TI_PopulateGossipOptionFrame(TI_status.options); for i,current in ipairs(TI_status.options) do if(current.state) then if(current.type == "availquest" and #AvailableQuests > 0 and TI_availnumber <= #AvailableQuests) then @@ -731,9 +735,5 @@ end function toggle(arg) - if(arg) then - return false; - else - return true; - end + return not arg; end \ No newline at end of file diff --git a/TurnIn.xml b/TurnIn.xml index c285f6b..b6f3a3a 100755 --- a/TurnIn.xml +++ b/TurnIn.xml @@ -36,19 +36,48 @@ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -