From 423a01a7ef8be5d7dd4dd096c8c0d2fa60bb2ede Mon Sep 17 00:00:00 2001 From: Nils89 Date: Wed, 1 Jan 2025 20:44:48 +0100 Subject: [PATCH] added more spellbook container --- CHANGELOG.txt | 3 +++ CHANGELOG_NEW_VERSION.txt | 3 +++ changelog.lua | 4 ++++ character/spellbook.lua | 42 +++++++++++++++++++-------------------- character/talents.xml | 22 ++++++++++++++++++++ 5 files changed, 53 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5896758b0..35f9205ce 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,6 @@ +3.3.19-Era + - Added more spellbook container + 3.3.18-Era - BigWigs fix diff --git a/CHANGELOG_NEW_VERSION.txt b/CHANGELOG_NEW_VERSION.txt index 4f9095a9e..eba0a9f2a 100644 --- a/CHANGELOG_NEW_VERSION.txt +++ b/CHANGELOG_NEW_VERSION.txt @@ -1,3 +1,6 @@ +3.3.19-Era + - Added more spellbook container + 3.3.18-Era - BigWigs fix diff --git a/changelog.lua b/changelog.lua index 1f15102d8..591afa35f 100755 --- a/changelog.lua +++ b/changelog.lua @@ -8,6 +8,10 @@ local ct = { } GW.CHANGELOGS_TYPES = ct +addChange("3.3.19",{ + {ct.change,[=[Added more spellbook container]=]}, +}) + addChange("3.3.18",{ {ct.change,[=[BigWigs fix]=]}, }) diff --git a/character/spellbook.lua b/character/spellbook.lua index 4297c71cd..b2a25b8f2 100755 --- a/character/spellbook.lua +++ b/character/spellbook.lua @@ -220,26 +220,6 @@ local function setButtonStyle(ispassive, spellID, skillType, icon, spellbookInde return btn end -local function findHigherRank(t,spellID) - local si = spellID - for k,v in pairs(GW.SpellsByLevel) do - for _,spell in pairs(v) do - if spell.requiredIds~=nil then - for _,rid in pairs(spell.requiredIds) do - if rid == si then - if not IsSpellKnown(spell.id) then - t[#t + 1] = {id=spell.id,level=k,rank=spell.rank} - t = findHigherRank(t,spell.id) - return t - end - end - end - end - end - end - return t -end - local function getHeaderHeight(pagingContainer,lastHeader) local lastColumn = 1 if lastHeader~=nil then @@ -276,6 +256,8 @@ local function setUpPaging(self) self.attrDummy:SetFrameRef('container3', self.container3) self.attrDummy:SetFrameRef('container4', self.container4) self.attrDummy:SetFrameRef('container5', self.container5) + self.attrDummy:SetFrameRef('container6', self.container6) + self.attrDummy:SetFrameRef('container7', self.container7) self.attrDummy:SetFrameRef('left', self.left) self.attrDummy:SetFrameRef('right', self.right) self.attrDummy:SetAttribute('_onattributechanged', ([=[ @@ -286,13 +268,23 @@ local function setUpPaging(self) local p3 = self:GetFrameRef('container3') local p4 = self:GetFrameRef('container4') local p5 = self:GetFrameRef('container5') + local p6 = self:GetFrameRef('container6') + local p7 = self:GetFrameRef('container7') local left = self:GetFrameRef('left') local right = self:GetFrameRef('right') local numPages = %s local currentPage = 1 if value == "left" then - if p5:IsVisible() then + if p7:IsVisible() then + p7:Hide() + p6:Show() + currentPage = 6 + elseif p6:IsVisible() then + p6:Hide() + p5:Show() + currentPage = 5 + elseif p5:IsVisible() then p5:Hide() p4:Show() currentPage = 4 @@ -327,6 +319,14 @@ local function setUpPaging(self) p4:Hide() p5:Show() currentPage = 5 + elseif p5:IsVisible() then + p5:Hide() + p6:Show() + currentPage = 6 + elseif p6:IsVisible() then + p6:Hide() + p7:Show() + currentPage = 7 end end diff --git a/character/talents.xml b/character/talents.xml index 79db59342..07fc4289c 100755 --- a/character/talents.xml +++ b/character/talents.xml @@ -247,6 +247,28 @@ + + + + + + + + self:GetParent().pages:SetText(6) + + + + + + + + + + + self:GetParent().pages:SetText(7) + + +