added examplequestdata.lua

git [10-29-18 - 06:59]
added examplequestdata.lua
Filename
libs/LibStub/LibStub.txt
libs/LibStub/LibStub/LibStub.lua
questData/00_ExampleQuestData.lua
diff --git a/libs/LibStub/LibStub.txt b/libs/LibStub/LibStub.txt
new file mode 100644
index 0000000..479f598
--- /dev/null
+++ b/libs/LibStub/LibStub.txt
@@ -0,0 +1,7 @@
+## APIVersion: 100007
+## Title: LibStub
+## Description: Universal Library Stub
+## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, ported to ESO by Seerah
+## Version: 1.0 r4
+
+LibStub\LibStub.lua
\ No newline at end of file
diff --git a/libs/LibStub/LibStub/LibStub.lua b/libs/LibStub/LibStub/LibStub.lua
new file mode 100644
index 0000000..0e6bf67
--- /dev/null
+++ b/libs/LibStub/LibStub/LibStub.lua
@@ -0,0 +1,38 @@
+-- LibStub is a simple versioning stub meant for use in Libraries.  http://www.wowace.com/wiki/LibStub for more info
+-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
+-- LibStub developed for World of Warcraft by above members of the WowAce community.
+-- Ported to Elder Scrolls Online by Seerah
+
+local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 4
+local LibStub = _G[LIBSTUB_MAJOR]
+
+local strformat = string.format
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
+	LibStub = LibStub or {libs = {}, minors = {} }
+	_G[LIBSTUB_MAJOR] = LibStub
+	LibStub.minor = LIBSTUB_MINOR
+
+	function LibStub:NewLibrary(major, minor)
+		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
+		if type(minor) ~= "number" then
+			minor = assert(tonumber(zo_strmatch(minor, "%d+%.?%d*")), "Minor version must either be a number or contain a number.")
+		end
+
+		local oldminor = self.minors[major]
+		if oldminor and oldminor >= minor then return nil end
+		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
+		return self.libs[major], oldminor
+	end
+
+	function LibStub:GetLibrary(major, silent)
+		if not self.libs[major] and not silent then
+			error(strformat("Cannot find a library instance of %q.", tostring(major)), 2)
+		end
+		return self.libs[major], self.minors[major]
+	end
+
+	function LibStub:IterateLibraries() return pairs(self.libs) end
+	setmetatable(LibStub, { __call = LibStub.GetLibrary })
+end
+
+LibStub.SILENT = true
\ No newline at end of file
diff --git a/questData/00_ExampleQuestData.lua b/questData/00_ExampleQuestData.lua
new file mode 100644
index 0000000..7927593
--- /dev/null
+++ b/questData/00_ExampleQuestData.lua
@@ -0,0 +1,95 @@
+-- If I suddenly drop dead and you want to maintain this AddOn
+
+-- specify the zone ID as local variable
+local zoneId	= 666
+
+
+-- have two local tables. The first is for quest names, the second is for the corresponding bingo codes.
+local tbl   = {}
+local tbl2  = {}
+
+
+
+--[[
+
+  set up the tables. Order of quests in the UI depends on the order you add them here.
+
+  Important: You have to use GetString(YOUR_QUEST_NAME_CONSTANT) here, or localization won't work.
+  Localization strings are defined in ../locale/<lang>.lua
+
+--]]
+
+table.insert(tbl, GetString(YOUR_QUEST_NAME_CONSTANT))
+table.insert(tbl2, {[1] = "bingo", [2] = "das", [3] = "DailyAutoshare", [4] = "example", [5] = "inviteme", [6] = "test"})
+
+-- rinse and repeat, until all your corresponding quest names / bingo strings are in your tables
+table.insert(tbl, GetString(YOUR_QUEST_NAME_CONSTANT2))
+table.insert(tbl2, "bingo")
+
+-- ...
+
+
+-- now set the table with the quest names for the zone
+DAS.shareables[zoneId]      = tbl
+
+-- call the func to make the bingo table.
+DAS.makeBingoTable(zoneId, tbl2)
+
+--[[ you now have two maps:
+--        {questName -> questId}
+--        {bingoCode -> questId}
+
+-- to save performance, the quest ID is stored in the control, on top of that there's a table somewhere in the DAS table that holds
+-- the active quest IDs. There's a lot of redundancy in this AddOn, since I've dropped dead, feel free to optimize.
+-- ]]
+
+  -- If there are subzones, you register them like this:
+
+  DAS.subzones[zoneId+1] = zoneId
+  DAS.subzones[zoneId+2] = zoneId
+  DAS.subzones[zoneId+3] = zoneId
+
+-- Quest lookup happens via
+
+  local zoneId = DAS.GetZoneId()
+  local quests = DAS.shareables[zoneId] or DAS.shareables[DAS.subzones[zoneId]] or {}
+--[[
+  That way, if you're in a zone's subzone, it will show the zone's parent quests, unless
+  you feel like setting up extra tables for those that only show the current (delve) quest.
+  See Morrowind.lua for examples of that.
+-- ]]
+
+-- set up auto quest accept:
+DAS.questStarter[zoneId] = {
+    [GetString(DAS_QUEST_YOUR_NPC1)]    = true,  -- Questgiver 1
+    [GetString(DAS_QUEST_YOUR_NPC2)]    = true,  -- Questgiver 2
+    [GetString(DAS_QUEST_YOUR_NPC3)]    = true,  -- Questgiver 3
+}
+
+-- set up auto quest turnin:
+DAS.questFinisher[zoneId] = {
+    [GetString(DAS_QUEST_YOUR_NPC1)]  = true,
+    [GetString(DAS_QUEST_YOUR_NPC2)]  = true,
+    -- fictional NPC3 just hands out, doesn't accept
+}
+
+--[[
+  I'm matching against the quest IDs for auto accepting quest shares.
+  Reason: Comparing numbers is a tonne cheaper than comparing strings.
+  Make sure you register the quest IDs. Unfortunately, you can only see them
+  when you get a quest shared OR via iteration after yu have completed those.
+  -- ]]
+
+  -- Set up like below (Morrowind example):
+DAS.questIds[zoneId] = {
+  [5924]  = true, -- "Relics of Yasammidan",
+	[5925]  = true, -- "Relics of Assarnatamat",
+}
+
+-- or by loop (Summerset example)
+DAS.questIds[zoneId] = {}
+
+for i=6082, 6087 do
+    DAS.questIds[zoneId][i] = true
+    DAS_QUEST_IDS[i] = true
+end
\ No newline at end of file