tagging as 2.1 for reals
This commit is contained in:
commit
773639597c
@ -1,5 +1,5 @@
|
|||||||
Turn In
|
Turn In
|
||||||
v2.1
|
v2.1
|
||||||
by Sabindeus of Smolderthorn/Andre of Argent Dawn (Alliance)
|
by Sabindeus of Smolderthorn/Andre of Argent Dawn (Alliance)
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|||||||
@ -258,7 +258,7 @@ function TI_IsNPCOn(npcname, type)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TI_OnEvent(event)
|
function TI_OnEvent(self, event, ...)
|
||||||
if(event == "VARIABLES_LOADED") then
|
if(event == "VARIABLES_LOADED") then
|
||||||
TI_VarInit();
|
TI_VarInit();
|
||||||
if(TI_status.state) then
|
if(TI_status.state) then
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
## Interface: 30300
|
## Interface: 30300
|
||||||
|
## X-Compatible-With: 40000
|
||||||
## 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
|
||||||
|
|||||||
46
TurnIn.xml
46
TurnIn.xml
@ -63,13 +63,13 @@
|
|||||||
</Size>
|
</Size>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_OptionListCheckboxTooltip();
|
TI_OptionListCheckboxTooltip(self);
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
</OnLeave>
|
</OnLeave>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_OptionToggle();
|
TI_OptionToggle(self);
|
||||||
</OnClick>
|
</OnClick>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
</CheckButton>
|
</CheckButton>
|
||||||
@ -86,13 +86,13 @@
|
|||||||
</Anchors>
|
</Anchors>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_TooltipMessage("Decrease this option's priority.");
|
TI_TooltipMessage(self, "Decrease this option's priority.");
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
</OnLeave>
|
</OnLeave>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_OptionMove(1);
|
TI_OptionMove(self, 1);
|
||||||
</OnClick>
|
</OnClick>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
<NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"/>
|
<NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"/>
|
||||||
@ -113,10 +113,10 @@
|
|||||||
</Anchors>
|
</Anchors>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_OptionMove(-1);
|
TI_OptionMove(self, -1);
|
||||||
</OnClick>
|
</OnClick>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_TooltipMessage("Increase this option's priority.");
|
TI_TooltipMessage(self, "Increase this option's priority.");
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
@ -199,11 +199,11 @@
|
|||||||
</Size>
|
</Size>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_NPCToggle();
|
TI_NPCToggle(self);
|
||||||
TI_NPCListCheckboxTooltip();
|
TI_NPCListCheckboxTooltip(self);
|
||||||
</OnClick>
|
</OnClick>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_NPCListCheckboxTooltip();
|
TI_NPCListCheckboxTooltip(self);
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
@ -223,13 +223,13 @@
|
|||||||
</Size>
|
</Size>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_TooltipMessage("Delete this NPC.");
|
TI_TooltipMessage(self, "Delete this NPC.");
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
</OnLeave>
|
</OnLeave>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_DeleteNPCIndex();
|
TI_DeleteNPCIndex(self);
|
||||||
</OnClick>
|
</OnClick>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
</Button>
|
</Button>
|
||||||
@ -249,7 +249,7 @@
|
|||||||
</Layers>
|
</Layers>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_SelectNPCIndex();
|
TI_SelectNPCIndex(self);
|
||||||
</OnClick>
|
</OnClick>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
|
<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
|
||||||
@ -260,7 +260,7 @@
|
|||||||
<Frame Name="TI_TempNPCListEntry" virtual="true" hidden="true">
|
<Frame Name="TI_TempNPCListEntry" virtual="true" hidden="true">
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_TempNPCListTooltipShow();
|
TI_TempNPCListTooltipShow(self);
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
@ -300,7 +300,7 @@
|
|||||||
TI_DeleteTempNPCIndex(self:GetParent():GetID());
|
TI_DeleteTempNPCIndex(self:GetParent():GetID());
|
||||||
</OnClick>
|
</OnClick>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_TooltipMessage("Delete");
|
TI_TooltipMessage(self, "Delete");
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
@ -323,7 +323,7 @@
|
|||||||
TI_AddTempNPCIndex(self:GetParent():GetID());
|
TI_AddTempNPCIndex(self:GetParent():GetID());
|
||||||
</OnClick>
|
</OnClick>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
TI_TooltipMessage("Add this NPC to the database");
|
TI_TooltipMessage(self, "Add this NPC to the database");
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
<OnLeave>
|
<OnLeave>
|
||||||
TI_TooltipHide();
|
TI_TooltipHide();
|
||||||
@ -422,7 +422,7 @@
|
|||||||
end
|
end
|
||||||
</OnMouseUp>
|
</OnMouseUp>
|
||||||
<OnMouseDown>
|
<OnMouseDown>
|
||||||
if ( arg1 == "LeftButton" ) then
|
if ( button == "LeftButton" ) then
|
||||||
self:StartMoving();
|
self:StartMoving();
|
||||||
self.isMoving = true;
|
self.isMoving = true;
|
||||||
end
|
end
|
||||||
@ -539,7 +539,7 @@
|
|||||||
</Size>
|
</Size>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_StatusIndicator_CheckFn();
|
TI_StatusIndicator_CheckFn(self);
|
||||||
</OnClick>
|
</OnClick>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
</CheckButton>
|
</CheckButton>
|
||||||
@ -601,7 +601,7 @@
|
|||||||
</Size>
|
</Size>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_SettingCheckboxFn("usedefault");
|
TI_SettingCheckboxFn(self, "usedefault");
|
||||||
</OnClick>
|
</OnClick>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
</CheckButton>
|
</CheckButton>
|
||||||
@ -621,7 +621,7 @@
|
|||||||
</Size>
|
</Size>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
TI_SettingCheckboxFn("autoadd");
|
TI_SettingCheckboxFn(self, "autoadd");
|
||||||
</OnClick>
|
</OnClick>
|
||||||
</Scripts>
|
</Scripts>
|
||||||
</CheckButton>
|
</CheckButton>
|
||||||
@ -987,12 +987,8 @@
|
|||||||
|
|
||||||
<Frame name="TurnIn" hidden="true" frameStrata="LOW" enableMouse="false">
|
<Frame name="TurnIn" hidden="true" frameStrata="LOW" enableMouse="false">
|
||||||
<Scripts>
|
<Scripts>
|
||||||
<OnLoad>
|
<OnLoad function="TI_OnLoad"/>
|
||||||
TI_OnLoad();
|
<OnEvent function="TI_OnEvent"/>
|
||||||
</OnLoad>
|
|
||||||
<OnEvent>
|
|
||||||
TI_OnEvent(event);
|
|
||||||
</OnEvent>
|
|
||||||
</Scripts>
|
</Scripts>
|
||||||
</Frame>
|
</Frame>
|
||||||
</Ui>
|
</Ui>
|
||||||
|
|||||||
62
TurnInUI.lua
62
TurnInUI.lua
@ -118,8 +118,8 @@ function TI_NPCListScrollBarUpdate()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_SelectNPCIndex()
|
function TI_SelectNPCIndex(self)
|
||||||
local index = this:GetID();
|
local index = self:GetID();
|
||||||
if(TI_LoadedNPCIndex == index) then
|
if(TI_LoadedNPCIndex == index) then
|
||||||
TI_LoadedNPCIndex = 0;
|
TI_LoadedNPCIndex = 0;
|
||||||
else
|
else
|
||||||
@ -129,8 +129,8 @@ function TI_SelectNPCIndex()
|
|||||||
TI_PopulateOptions("select npc");
|
TI_PopulateOptions("select npc");
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_DeleteNPCIndex()
|
function TI_DeleteNPCIndex(self)
|
||||||
local index = this:GetParent():GetID();
|
local index = self:GetParent():GetID();
|
||||||
TI_DeleteNPC(index);
|
TI_DeleteNPC(index);
|
||||||
if(TI_LoadedNPCIndex == index) then
|
if(TI_LoadedNPCIndex == index) then
|
||||||
TI_LoadedNPCIndex = 0;
|
TI_LoadedNPCIndex = 0;
|
||||||
@ -138,9 +138,9 @@ function TI_DeleteNPCIndex()
|
|||||||
TI_PopulateOptions("npclist update");
|
TI_PopulateOptions("npclist update");
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_NPCToggle()
|
function TI_NPCToggle(self)
|
||||||
local index = this:GetParent():GetID();
|
local index = self:GetParent():GetID();
|
||||||
TI_NPCDB[TI_NPCIndex[index]].state = this:GetChecked();
|
TI_NPCDB[TI_NPCIndex[index]].state = self:GetChecked();
|
||||||
|
|
||||||
if(TI_NPCDB[TI_NPCIndex[index]].state) then
|
if(TI_NPCDB[TI_NPCIndex[index]].state) then
|
||||||
TI_LoadedNPCIndex = index;
|
TI_LoadedNPCIndex = index;
|
||||||
@ -152,14 +152,14 @@ function TI_NPCToggle()
|
|||||||
TI_PopulateOptions("select npc");
|
TI_PopulateOptions("select npc");
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_OptionMove(offset)
|
function TI_OptionMove(self, offset)
|
||||||
local CurrOpts;
|
local CurrOpts;
|
||||||
if(TI_LoadedNPCIndex > 0) then
|
if(TI_LoadedNPCIndex > 0) then
|
||||||
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
|
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
|
||||||
else
|
else
|
||||||
CurrOpts = TI_status.options;
|
CurrOpts = TI_status.options;
|
||||||
end
|
end
|
||||||
local id = this:GetParent():GetID();
|
local id = self:GetParent():GetID();
|
||||||
local newid = id + offset;
|
local newid = id + offset;
|
||||||
|
|
||||||
if(newid < 1 or newid > table.getn(CurrOpts)) then
|
if(newid < 1 or newid > table.getn(CurrOpts)) then
|
||||||
@ -173,15 +173,15 @@ function TI_OptionMove(offset)
|
|||||||
TI_PopulateOptions("move");
|
TI_PopulateOptions("move");
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_OptionToggle()
|
function TI_OptionToggle(self)
|
||||||
local CurrOpts;
|
local CurrOpts;
|
||||||
if(TI_LoadedNPCIndex > 0) then
|
if(TI_LoadedNPCIndex > 0) then
|
||||||
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
|
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
|
||||||
else
|
else
|
||||||
CurrOpts = TI_status.options;
|
CurrOpts = TI_status.options;
|
||||||
end
|
end
|
||||||
local id = this:GetParent():GetID();
|
local id = self:GetParent():GetID();
|
||||||
if(this:GetChecked()) then
|
if(self:GetChecked()) then
|
||||||
CurrOpts[id].state=true;
|
CurrOpts[id].state=true;
|
||||||
else
|
else
|
||||||
CurrOpts[id].state=false;
|
CurrOpts[id].state=false;
|
||||||
@ -202,8 +202,8 @@ function TI_StatusIndicatorUpdate()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TI_StatusIndicator_CheckFn()
|
function TI_StatusIndicator_CheckFn(self)
|
||||||
if(this:GetChecked()) then
|
if(self:GetChecked()) then
|
||||||
TI_Switch("on");
|
TI_Switch("on");
|
||||||
else
|
else
|
||||||
TI_Switch("off");
|
TI_Switch("off");
|
||||||
@ -211,10 +211,10 @@ function TI_StatusIndicator_CheckFn()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TI_TempNPCListTooltipShow()
|
function TI_TempNPCListTooltipShow(self)
|
||||||
TI_Tooltip:SetOwner(this, ANCHOR_PRESERVE);
|
TI_Tooltip:SetOwner(self, ANCHOR_PRESERVE);
|
||||||
TI_Tooltip:ClearLines();
|
TI_Tooltip:ClearLines();
|
||||||
local id = this:GetID();
|
local id = self:GetID();
|
||||||
TI_Tooltip:AddLine(TI_TempNPCList[id].location);
|
TI_Tooltip:AddLine(TI_TempNPCList[id].location);
|
||||||
for i,v in ipairs(TI_TempNPCList[id].list) do
|
for i,v in ipairs(TI_TempNPCList[id].list) do
|
||||||
TI_Tooltip:AddLine("- " .. v.name);
|
TI_Tooltip:AddLine("- " .. v.name);
|
||||||
@ -228,8 +228,8 @@ function TI_TooltipHide()
|
|||||||
TI_Tooltip:Hide();
|
TI_Tooltip:Hide();
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_TooltipMessage(msg)
|
function TI_TooltipMessage(self, msg)
|
||||||
TI_Tooltip:SetOwner(this, ANCHOR_PRESERVE);
|
TI_Tooltip:SetOwner(self, ANCHOR_PRESERVE);
|
||||||
TI_Tooltip:ClearLines();
|
TI_Tooltip:ClearLines();
|
||||||
TI_Tooltip:SetText(msg);
|
TI_Tooltip:SetText(msg);
|
||||||
TI_Tooltip:Show();
|
TI_Tooltip:Show();
|
||||||
@ -238,34 +238,34 @@ end
|
|||||||
function TI_TempNPCListUpdate()
|
function TI_TempNPCListUpdate()
|
||||||
local last = 1;
|
local last = 1;
|
||||||
for i,v in ipairs(TI_TempNPCList) do
|
for i,v in ipairs(TI_TempNPCList) do
|
||||||
local tempbuttontext = getglobal("TI_TempNPCListWindow"..i.."_Text");
|
local tempbuttontext = _G["TI_TempNPCListWindow"..i.."_Text"];
|
||||||
tempbuttontext:SetText(v.name);
|
tempbuttontext:SetText(v.name);
|
||||||
tempbuttontext:GetParent():Show();
|
tempbuttontext:GetParent():Show();
|
||||||
last = last+1;
|
last = last+1;
|
||||||
end
|
end
|
||||||
for j=last, TI_TempNPCListMaxSize, 1 do
|
for j=last, TI_TempNPCListMaxSize, 1 do
|
||||||
getglobal("TI_TempNPCListWindow" .. j):Hide();
|
_G["TI_TempNPCListWindow" .. j]:Hide();
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_NPCListCheckboxTooltip()
|
function TI_NPCListCheckboxTooltip(self)
|
||||||
if(this:GetChecked()) then
|
if(self:GetChecked()) then
|
||||||
TI_TooltipMessage("NPC is using specific settings.");
|
TI_TooltipMessage(self, "NPC is using specific settings.");
|
||||||
else
|
else
|
||||||
TI_TooltipMessage("NPC is using default settings.");
|
TI_TooltipMessage(self, "NPC is using default settings.");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_OptionListCheckboxTooltip()
|
function TI_OptionListCheckboxTooltip(self)
|
||||||
if(this:GetChecked()) then
|
if(self:GetChecked()) then
|
||||||
TI_TooltipMessage("This option is enabled.");
|
TI_TooltipMessage(self, "This option is enabled.");
|
||||||
else
|
else
|
||||||
TI_TooltipMessage("This option is disabled.");
|
TI_TooltipMessage(self, "This option is disabled.");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_SettingCheckboxFn(var)
|
function TI_SettingCheckboxFn(self, var)
|
||||||
if(this:GetChecked()) then
|
if(self:GetChecked()) then
|
||||||
TI_status[var] = true;
|
TI_status[var] = true;
|
||||||
else
|
else
|
||||||
TI_status[var] = false;
|
TI_status[var] = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user