Browse Source

Changes from live version of Turn In plus alterations for BC Classic APIs

tags/2.1.11-classic
SabinDeus 4 years ago
parent
commit
385ab302f5
4 changed files with 52 additions and 18 deletions
  1. 16
    7
      TurnIn.lua
  2. 2
    2
      TurnIn.toc
  3. 31
    6
      TurnIn.xml
  4. 3
    3
      TurnInUI.lua

+ 16
- 7
TurnIn.lua View File

for i2,v2 in ipairs(GossipOptions) do for i2,v2 in ipairs(GossipOptions) do
if (v2.name == current.name) then if (v2.name == current.name) then
TI_debug(i1.."-Gossip Match Found: "..current.name..", "..current.type); TI_debug(i1.."-Gossip Match Found: "..current.name..", "..current.type);
SelectGossipOption(i2);
C_GossipInfo.SelectOption(i2);
return; return;
end end
end end
TI_availnumber = TI_availnumber + 1; TI_availnumber = TI_availnumber + 1;
SAvQ(TI_availnumber-1); SAvQ(TI_availnumber-1);
TI_debug("Selecting Available Quest ".. TI_availnumber-1); TI_debug("Selecting Available Quest ".. TI_availnumber-1);
TI_ResetPointers();
return; return;
elseif(current.type == "activequest" and #ActiveQuests > 0 and TI_activenumber <= #ActiveQuests) then 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 elseif(#GossipOptions > 0) then
for j,val in ipairs(GossipOptions) do for j,val in ipairs(GossipOptions) do
if(val.type == current.type) then if(val.type == current.type) then
end end
return x; return x;
end end


--[[this function stolen from WhisperCast by Sarris, whom I love dearly for his contribution to Paladins everywhere. --[[this function stolen from WhisperCast by Sarris, whom I love dearly for his contribution to Paladins everywhere.
]] ]]
function TI_copyTable( src ) function TI_copyTable( src )
else else
return true; return true;
end end
end
end

+ 2
- 2
TurnIn.toc View File

## Interface: 11302
## X-Compatible-With: 11302
## Interface: 20501
## X-Compatible-With: 90002
## 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

+ 31
- 6
TurnIn.xml View File

<Script file="TurnIn.lua" /> <Script file="TurnIn.lua" />
<Script file="TurnInUI.lua" /> <Script file="TurnInUI.lua" />
<Frame name="TI_OptionFrameBoxTemplate" virtual="true">
<Frame name="TI_OptionFrameBoxTemplate" virtual="true" inherits="BackdropTemplate">
<!-- shamelessly stolen from blizzard --> <!-- shamelessly stolen from blizzard -->
<Layers> <Layers>
<Layer level="BACKGROUND"> <Layer level="BACKGROUND">
</FontString> </FontString>
</Layer> </Layer>
</Layers> </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"> <Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize> <EdgeSize>
<AbsValue val="16"/> <AbsValue val="16"/>
</Backdrop> </Backdrop>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4); self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.5, 0.5, 0.5); self:SetBackdropColor(0.5, 0.5, 0.5);
</OnLoad> </OnLoad>
</Frames> </Frames>
</Frame> </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> <Size>
<AbsDimension x="200" y="130" /> <AbsDimension x="200" y="130" />
</Size> </Size>
</Anchors> </Anchors>
</Frame> </Frame>
</Frames> </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"> <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize> <EdgeSize>
<AbsValue val="16"/> <AbsValue val="16"/>
</BackgroundInsets> </BackgroundInsets>
</Backdrop> </Backdrop>
<Scripts> <Scripts>
<OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.6, 0.6, 0.6);
self:SetBackdropColor(0.2, 0.2, 0.2);
</OnLoad>
<OnMouseUp> <OnMouseUp>
if ( self.isMoving ) then if ( self.isMoving ) then
self:StopMovingOrSizing(); self:StopMovingOrSizing();
</Scripts> </Scripts>
</Frame> </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> <TitleRegion>
<Size> <Size>
<AbsDimension x="128" y="64"/> <AbsDimension x="128" y="64"/>
</Anchors> </Anchors>
</TitleRegion> </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"> <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets> <BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/> <AbsInset left="11" right="12" top="12" bottom="11"/>
</Backdrop> </Backdrop>
<Scripts> <Scripts>
<OnShow>
</OnShow>
<OnLoad>
self:ApplyBackdrop()
self:EnableMouse(true)
self:RegisterForDrag("LeftButton")
</OnLoad>
<OnDragStart>
self:StartMoving()
</OnDragStart>
<OnDragStop>
self:StopMovingOrSizing()
</OnDragStop>
</Scripts> </Scripts>
<Size> <Size>
<AbsDimension x="300" y="500"/> <AbsDimension x="300" y="500"/>
<Frame name="TI_OptionsPriorityContainer" inherits="TI_OptionFrameBoxTemplate"> <Frame name="TI_OptionsPriorityContainer" inherits="TI_OptionFrameBoxTemplate">
<Scripts> <Scripts>
<OnLoad> <OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4); self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15); self:SetBackdropColor(0.15, 0.15, 0.15);
getglobal(self:GetName().."Title"):SetText("Gossip Options Priority List"); getglobal(self:GetName().."Title"):SetText("Gossip Options Priority List");
<Frame name="TI_OptionsNPCContainer" inherits="TI_OptionFrameBoxTemplate"> <Frame name="TI_OptionsNPCContainer" inherits="TI_OptionFrameBoxTemplate">
<Scripts> <Scripts>
<OnLoad> <OnLoad>
self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4); self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15); self:SetBackdropColor(0.15, 0.15, 0.15);
getglobal(self:GetName().."Title"):SetText("NPC Database"); getglobal(self:GetName().."Title"):SetText("NPC Database");

+ 3
- 3
TurnInUI.lua View File

if(v.icon) then if(v.icon) then
iconpath = v.icon; iconpath = v.icon;
else else
iconpath = "Interface\\GossipFrame\\ActiveQuestIcon";
iconpath = "Interface/GossipFrame/ActiveQuestIcon";
end end
elseif(v.type == "availquest") then elseif(v.type == "availquest") then
if(v.icon) then if(v.icon) then
iconpath = v.icon; iconpath = v.icon;
else else
iconpath = "Interface\\GossipFrame\\AvailableQuestIcon";
iconpath = "Interface/GossipFrame/AvailableQuestIcon";
end end
else else
iconpath = "Interface\\GossipFrame\\" .. v.type .. "GossipIcon";
iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
end end
getglobal(entry .. "_Icon"):SetTexture(iconpath); getglobal(entry .. "_Icon"):SetTexture(iconpath);
getglobal(entry .. "_Check"):SetChecked(v.state); getglobal(entry .. "_Check"):SetChecked(v.state);

Loading…
Cancel
Save