Compare commits

...

3 Commits

Author SHA1 Message Date
SabinDeus
9e4b940a8f Removing remaining C_GossipInfo from Shadowlands merge 2021-06-25 20:16:46 -04:00
SabinDeus
385ab302f5 Changes from live version of Turn In plus alterations for BC Classic APIs 2021-06-14 21:35:40 -04:00
SabinDeus
1d2e4760bb TOC for Classic 2019-09-05 16:54:02 -04:00
4 changed files with 51 additions and 17 deletions

View File

@ -533,12 +533,20 @@ function TI_HandleGossipWindow(gorq)
TI_availnumber = TI_availnumber + 1;
SAvQ(TI_availnumber-1);
TI_debug("Selecting Available Quest ".. TI_availnumber-1);
TI_ResetPointers();
return;
elseif(current.type == "activequest" and #ActiveQuests > 0 and TI_activenumber <= #ActiveQuests) then
while TI_activenumber <= #ActiveQuests do
TI_activenumber = TI_activenumber + 1;
if ActiveQuests[TI_activenumber-1].isComplete then
TI_debug("Selecting Active Quest ".. TI_activenumber-1 .. " " .. ActiveQuests[TI_activenumber-1].name );
SAcQ(TI_activenumber-1);
TI_debug("Selecting Active Quest ".. TI_activenumber-1);
TI_ResetPointers();
return;
else
TI_debug("Active Quest ".. TI_activenumber-1 .. " " .. ActiveQuests[TI_activenumber-1].name .. " is not complete")
end
end
elseif(#GossipOptions > 0) then
for j,val in ipairs(GossipOptions) do
if(val.type == current.type) then
@ -679,6 +687,7 @@ function TI_TabulateGossipActiveQuests(...)
return x;
end
--[[this function stolen from WhisperCast by Sarris, whom I love dearly for his contribution to Paladins everywhere.
]]
function TI_copyTable( src )

View File

@ -1,5 +1,5 @@
## Interface: 80000
## X-Compatible-With: 80000
## Interface: 20501
## X-Compatible-With: 90002
## Title: Turn In
## Notes: Automates the selection of quest and gossip options.
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex

View File

@ -2,7 +2,7 @@
<Script file="TurnIn.lua" />
<Script file="TurnInUI.lua" />
<Frame name="TI_OptionFrameBoxTemplate" virtual="true">
<Frame name="TI_OptionFrameBoxTemplate" virtual="true" inherits="BackdropTemplate">
<!-- shamelessly stolen from blizzard -->
<Layers>
<Layer level="BACKGROUND">
@ -17,6 +17,9 @@
</FontString>
</Layer>
</Layers>
<KeyValues>
<KeyValue key="backdropInfo" value="BACKDROP_TOOLTIP_16_16_5555" type="global"/>
</KeyValues>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
@ -30,6 +33,7 @@
</Backdrop>
<Scripts>
<OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.5, 0.5, 0.5);
</OnLoad>
@ -333,7 +337,7 @@
</Frames>
</Frame>
<Frame Name="TI_TempNPCListWindow" parent="UIParent" frameStrata="DIALOG" toplevel="true" enableMouse="true" movable="true" hidden="true">
<Frame Name="TI_TempNPCListWindow" parent="UIParent" frameStrata="DIALOG" toplevel="true" enableMouse="true" movable="true" hidden="true" inherits="BackdropTemplate">
<Size>
<AbsDimension x="200" y="130" />
</Size>
@ -403,6 +407,9 @@
</Anchors>
</Frame>
</Frames>
<KeyValues>
<KeyValue key="backdropInfo" value="BACKDROP_TOOLTIP_16_16_5555" type="global"/>
</KeyValues>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
@ -415,6 +422,11 @@
</BackgroundInsets>
</Backdrop>
<Scripts>
<OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.6, 0.6, 0.6);
self:SetBackdropColor(0.2, 0.2, 0.2);
</OnLoad>
<OnMouseUp>
if ( self.isMoving ) then
self:StopMovingOrSizing();
@ -436,7 +448,7 @@
</Scripts>
</Frame>
<Frame Name="TI_OptionsFrame" frameStrata="DIALOG" toplevel="true" enableMouse="true" enableMouseWheel="true" movable="true" parent="UIParent">
<Frame Name="TI_OptionsFrame" inherits="BackdropTemplate" frameStrata="DIALOG" toplevel="true" enableMouse="true" enableMouseWheel="true" movable="true" parent="UIParent">
<TitleRegion>
<Size>
<AbsDimension x="128" y="64"/>
@ -450,6 +462,9 @@
</Anchors>
</TitleRegion>
<KeyValues>
<KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global"/>
</KeyValues>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
@ -463,9 +478,17 @@
</Backdrop>
<Scripts>
<OnShow>
</OnShow>
<OnLoad>
self:ApplyBackdrop()
self:EnableMouse(true)
self:RegisterForDrag("LeftButton")
</OnLoad>
<OnDragStart>
self:StartMoving()
</OnDragStart>
<OnDragStop>
self:StopMovingOrSizing()
</OnDragStop>
</Scripts>
<Size>
<AbsDimension x="300" y="500"/>
@ -658,6 +681,7 @@
<Frame name="TI_OptionsPriorityContainer" inherits="TI_OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
getglobal(self:GetName().."Title"):SetText("Gossip Options Priority List");
@ -865,6 +889,7 @@
<Frame name="TI_OptionsNPCContainer" inherits="TI_OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
getglobal(self:GetName().."Title"):SetText("NPC Database");

View File

@ -20,16 +20,16 @@ function TI_PopulateOptions(arg)
if(v.icon) then
iconpath = v.icon;
else
iconpath = "Interface\\GossipFrame\\ActiveQuestIcon";
iconpath = "Interface/GossipFrame/ActiveQuestIcon";
end
elseif(v.type == "availquest") then
if(v.icon) then
iconpath = v.icon;
else
iconpath = "Interface\\GossipFrame\\AvailableQuestIcon";
iconpath = "Interface/GossipFrame/AvailableQuestIcon";
end
else
iconpath = "Interface\\GossipFrame\\" .. v.type .. "GossipIcon";
iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
end
getglobal(entry .. "_Icon"):SetTexture(iconpath);
getglobal(entry .. "_Check"):SetChecked(v.state);