Skip to content

Commit

Permalink
Backport to 3.3.5a
Browse files Browse the repository at this point in the history
  • Loading branch information
shadovvs committed Nov 11, 2016
1 parent 5d4cf92 commit 3e0456a
Show file tree
Hide file tree
Showing 14 changed files with 480 additions and 95 deletions.
Binary file added Artwork/TalentFrame/TALENTFRAME-HORIZONTAL2.BLP
Binary file not shown.
Binary file added Artwork/TalentFrame/TALENTFRAME-VERTICAL2.BLP
Binary file not shown.
Binary file added Artwork/TalentFrame/TalentFrame-Parts.blp
Binary file not shown.
2 changes: 1 addition & 1 deletion Storyline.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 40300
## Interface: 30300
## Title: Storyline
## Author: Telkostrasz
## Version: 1.1
Expand Down
26 changes: 18 additions & 8 deletions events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ local function getQuestData(qTitle)
return "";
end

--CHANGE:Shadovv: QuestFrame was implemented in cataclysm
local function showQuestPortraitFrame()
--[[
if not Storyline_Data.config.hideOriginalFrames then
return;
end
Expand All @@ -220,7 +222,7 @@ local function showQuestPortraitFrame()
QuestFrame_ShowQuestPortrait(Storyline_NPCFrame, questPortrait, questPortraitText, questPortraitName, -3, -42);
else
QuestFrame_HideQuestPortrait();
end
end]]
end

--CHANGES:Lanrutcon: Sometimes, when the quest is auto-accept it doesn't hide the frame
Expand Down Expand Up @@ -569,8 +571,9 @@ eventHandlers["QUEST_PROGRESS"] = function()
Storyline_NPCFrameObjectivesContent.Objectives:Show();
contentHeight = contentHeight + 10 + Storyline_NPCFrameObjectivesContent.Objectives:GetHeight()
end

if GetNumQuestItems() > 0 or GetNumQuestCurrencies() > 0 or GetQuestMoneyToGet() > 0 then

--CHANGE:Shadovv: GetNumQuestCurrencies() was implemented in cataclysm
if GetNumQuestItems() > 0 or GetQuestMoneyToGet() > 0 then
Storyline_NPCFrameObjectivesContent.RequiredItemText:Show();
local bestIcon = "Interface\\ICONS\\trade_archaeology_chestoftinyglassanimals";

Expand Down Expand Up @@ -610,7 +613,9 @@ eventHandlers["QUEST_PROGRESS"] = function()
isUsable = isUsable,
});
end


--CHANGE:Shadovv: GetNumQuestCurrencies() was implemented in cataclysm
--[[
for i = 1, GetNumQuestCurrencies() do
local name, texture, numItems = GetQuestCurrencyInfo("required", i);
bestIcon = texture;
Expand All @@ -622,7 +627,7 @@ eventHandlers["QUEST_PROGRESS"] = function()
type = "currency",
rewardType = "required",
});
end
end]]

Storyline_NPCFrameObjectivesImage:SetTexture(bestIcon);

Expand Down Expand Up @@ -659,7 +664,8 @@ eventHandlers["QUEST_COMPLETE"] = function(eventInfo)
--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

wipe(displayBuilder);
local bestIcon = "Interface\\ICONS\\trade_archaeology_chestoftinyglassanimals";
--local bestIcon = "Interface\\ICONS\\trade_archaeology_chestoftinyglassanimals";
local bestIcon = "Interface\\AddOns\\Storyline\\Artwork\\ICONS\\xp_icon";

-- XP
local xp = GetRewardXP();
Expand Down Expand Up @@ -701,6 +707,8 @@ eventHandlers["QUEST_COMPLETE"] = function(eventInfo)
end

-- Skill points
--CHANGE:Shadovv: GetRewardSkillPoints() was implemented in cataclysm
--[[
local skillName, skillIcon, skillPoints = GetRewardSkillPoints();
if skillPoints then
skillName = skillName or "?";
Expand All @@ -714,6 +722,7 @@ eventHandlers["QUEST_COMPLETE"] = function(eventInfo)
end
-- Currencies
--CHANGE:Shadovv: GetNumRewardCurrencies() was implemented in cataclysm
local currencyCount = GetNumRewardCurrencies();
if currencyCount > 0 then
for i = 1, currencyCount, 1 do -- Some quest reward several currencies
Expand All @@ -728,7 +737,7 @@ eventHandlers["QUEST_COMPLETE"] = function(eventInfo)
});
end
end
end
end]]

-- Item reward
if GetNumQuestChoices() == 1 or GetNumQuestRewards() > 0 then
Expand Down Expand Up @@ -922,7 +931,7 @@ local function handleEventSpecifics(event, texts, textIndex, eventInfo)
Storyline_NPCFrameChatOption2:SetScript("OnEnter", nil);
Storyline_NPCFrameChatOption3:SetScript("OnEnter", nil);
Storyline_NPCFrameObjectivesImage:SetTexture("Interface\\FriendsFrame\\FriendsFrameScrollIcon");
QuestFrame_HideQuestPortrait();
--QuestFrame_HideQuestPortrait();

if textIndex == #texts and eventHandlers[event] then
eventHandlers[event](eventInfo);
Expand Down Expand Up @@ -1144,6 +1153,7 @@ function Storyline_API.initEventsStructure()
QuestLogFrame:Hide();
startDialog("none", questDescription, "REPLAY", EVENT_INFO["REPLAY"]);
end);
questButton:Hide();


-- UI
Expand Down
39 changes: 11 additions & 28 deletions lib/AceAddon-3.0/AceAddon-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
-- end
-- @class file
-- @name AceAddon-3.0.lua
-- @release $Id: AceAddon-3.0.lua 1036 2011-08-16 22:45:05Z nevcairiel $
-- @release $Id: AceAddon-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $

local MAJOR, MINOR = "AceAddon-3.0", 11
local MAJOR, MINOR = "AceAddon-3.0", 5
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)

if not AceAddon then return end -- No Upgrade needed.
Expand Down Expand Up @@ -153,7 +153,6 @@ function AceAddon:NewAddon(objectorname, ...)
setmetatable( object, addonmeta )
self.addons[name] = object
object.modules = {}
object.orderedModules = {}
object.defaultModuleLibraries = {}
Embed( object ) -- embed NewModule, GetModule methods
self:EmbedLibraries(object, select(i,...))
Expand Down Expand Up @@ -286,7 +285,6 @@ function NewModule(self, name, prototype, ...)

safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy.
self.modules[name] = module
tinsert(self.orderedModules, module)

return module
end
Expand Down Expand Up @@ -491,14 +489,12 @@ local pmixins = {
-- target (object) - target object to embed aceaddon in
--
-- this is a local function specifically since it's meant to be only called internally
function Embed(target, skipPMixins)
function Embed(target)
for k, v in pairs(mixins) do
target[k] = v
end
if not skipPMixins then
for k, v in pairs(pmixins) do
target[k] = target[k] or v
end
for k, v in pairs(pmixins) do
target[k] = target[k] or v
end
end

Expand Down Expand Up @@ -551,9 +547,8 @@ function AceAddon:EnableAddon(addon)
end

-- enable possible modules.
local modules = addon.orderedModules
for i = 1, #modules do
self:EnableAddon(modules[i])
for name, module in pairs(addon.modules) do
self:EnableAddon(module)
end
end
return self.statuses[addon.name] -- return true if we're disabled
Expand Down Expand Up @@ -585,9 +580,8 @@ function AceAddon:DisableAddon(addon)
if lib then safecall(lib.OnEmbedDisable, lib, addon) end
end
-- disable possible modules.
local modules = addon.orderedModules
for i = 1, #modules do
self:DisableAddon(modules[i])
for name, module in pairs(addon.modules) do
self:DisableAddon(module)
end
end

Expand Down Expand Up @@ -619,8 +613,7 @@ function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end

-- Event Handling
local function onEvent(this, event, arg1)
-- 2011-08-17 nevcairiel - ignore the load event of Blizzard_DebugTools, so a potential startup error isn't swallowed up
if (event == "ADDON_LOADED" and arg1 ~= "Blizzard_DebugTools") or event == "PLAYER_LOGIN" then
if event == "ADDON_LOADED" or event == "PLAYER_LOGIN" then
-- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration
while(#AceAddon.initializequeue > 0) do
local addon = tremove(AceAddon.initializequeue, 1)
Expand All @@ -645,15 +638,5 @@ AceAddon.frame:SetScript("OnEvent", onEvent)

-- upgrade embeded
for name, addon in pairs(AceAddon.addons) do
Embed(addon, true)
end

-- 2010-10-27 nevcairiel - add new "orderedModules" table
if oldminor and oldminor < 10 then
for name, addon in pairs(AceAddon.addons) do
addon.orderedModules = {}
for module_name, module in pairs(addon.modules) do
tinsert(addon.orderedModules, module)
end
end
Embed(addon)
end
Loading

0 comments on commit 3e0456a

Please sign in to comment.