Compare commits
4 Commits
master
...
classic-bc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
913e9125e1 | ||
|
|
9e4b940a8f | ||
|
|
385ab302f5 | ||
|
|
1d2e4760bb |
17
TurnIn.lua
17
TurnIn.lua
@ -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
|
||||
TI_activenumber = TI_activenumber + 1;
|
||||
SAcQ(TI_activenumber-1);
|
||||
TI_debug("Selecting Active Quest ".. TI_activenumber-1);
|
||||
return;
|
||||
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_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 )
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
## Interface: 80000
|
||||
## X-Compatible-With: 80000
|
||||
## Interface: 20503
|
||||
## X-Compatible-With: 90002
|
||||
## Title: Turn In
|
||||
## Notes: Automates the selection of quest and gossip options.
|
||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
||||
|
||||
46
TurnIn.xml
46
TurnIn.xml
@ -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_TUTORIAL_16_16" 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_TUTORIAL_16_16" 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,20 @@
|
||||
</BackgroundInsets>
|
||||
</Backdrop>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self.backdropInfo = {
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true,
|
||||
tileEdge = true,
|
||||
tileSize = 16,
|
||||
edgeSize = 16,
|
||||
insets = { left = 5, right = 5, top = 5, bottom = 5 },
|
||||
};
|
||||
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 +457,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 +471,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 +487,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 +690,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 +898,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");
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user