Skip to content

Commit 609b151

Browse files
Added rafts to MoP
Removed error-causing dev print I left in inside eqMan
1 parent 62f0a22 commit 609b151

7 files changed

Lines changed: 80 additions & 27 deletions

File tree

AngleurCata.lua

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ function Angleur_LogicVariableHandler(self, event, unit, ...)
350350
elseif event == "PLAYER_EQUIPMENT_CHANGED" and unit == 16 then
351351
AngleurClassic_CheckFishingPoleEquipped()
352352
elseif event == "UNIT_AURA" and unit == "player" then
353-
--Angleur_Auras()
353+
Angleur_Auras()
354354
Angleur_ExtraToyAuras()
355355
Angleur_ExtraItemAuras()
356356
elseif event == "UNIT_INVENTORY_CHANGED" and unit == "player" then
@@ -400,25 +400,6 @@ function Angleur_Auras()
400400
break
401401
end
402402
end
403-
--Checks for oversized bobber aura
404-
oversizedBobbered = false
405-
auraIDHolders.oversizedBobber = nil
406-
if C_UnitAuras.GetPlayerAuraBySpellID(397827) then
407-
oversizedBobbered = true
408-
auraIDHolders.oversizedBobber = 397827
409-
--print("OVERSIZED is applied")
410-
end
411-
--Checks for Crate Bobber aura
412-
crateBobbered = false
413-
auraIDHolders.crateBobber = nil
414-
for i, crateBobber in pairs(angleurToys.crateBobberPossibilities) do
415-
if C_UnitAuras.GetPlayerAuraBySpellID(crateBobber.spellID) then
416-
crateBobbered = true
417-
auraIDHolders.crateBobber = crateBobber.spellID
418-
--print("Crate bobber is applied")
419-
break
420-
end
421-
end
422403
end
423404
function Angleur_ExtraToyAuras()
424405
for i, slottedToy in pairs(Angleur_SlottedExtraToys) do
@@ -554,6 +535,7 @@ function Angleur_ActionHandler(self)
554535
self.visual.texture:SetTexture("")
555536
else
556537
if rafted then
538+
if not C_UnitAuras.GetPlayerAuraBySpellID(auraIDHolders.raft) then return end
557539
local remainingAuraDuration = C_UnitAuras.GetPlayerAuraBySpellID(auraIDHolders.raft).expirationTime - GetTime()
558540
if remainingAuraDuration < 60 and AngleurConfig.raftEnabled and angleurToys.selectedRaftTable.loaded then
559541
SetOverrideBindingClick_Custom(self, true, assignKey, "Angleur_ToyButton")
@@ -613,7 +595,6 @@ function Angleur_ActionHandler_ExtraToys(self, assignKey)
613595
return returnValue
614596
end
615597

616-
617598
local function checkUsabilityItem(itemID)
618599
if not C_Item.IsUsableItem(itemID) then return false end
619600
local _, cooldown = C_Container.GetItemCooldown(itemID)

AngleurCata.xml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,22 @@
218218
</Frame>
219219
</Frames>
220220
</CheckButton>
221+
<CheckButton name="$parent_RaftCheckBox" parentKey="raftEnable" inherits="MyCheckboxTemplate">
222+
<Anchors>
223+
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="21" y="-64"/>
224+
</Anchors>
225+
<Frames>
226+
<Frame name="$parent_DropDown" parentKey="dropDown" inherits="UIDropDownMenuTemplate" hidden="true">
227+
<Anchors>
228+
<Anchor point="LEFT" relativeTo="$parent" relativePoint="RIGHT"/>
229+
</Anchors>
230+
</Frame>
231+
</Frames>
232+
</CheckButton>
221233
<Frame name="$parent_UltraFocus" parentKey="ultraFocus">
222234
<Size x="260" y="50"/>
223235
<Anchors>
224-
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="21" y="-71"/>
236+
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="21" y="-96"/>
225237
</Anchors>
226238
<Layers>
227239
<Layer level="ARTWORK">
@@ -240,14 +252,14 @@
240252
</CheckButton>
241253
<CheckButton name="$parent_AutoLoot" parentKey="autoLoot" inherits="MyCheckboxTemplate">
242254
<Anchors>
243-
<Anchor point="TOP" relativeTo="$parent_Audio" relativePoint="BOTTOM" x="0" y="3"/>
255+
<Anchor point="LEFT" relativeTo="$parent_Audio_Text" relativePoint="RIGHT" x="0" y="0"/>
244256
</Anchors>
245257
</CheckButton>
246258
</Frames>
247259
</Frame>
248260
<CheckButton name="$parent_SoftInteract" parentKey="softInteract" inherits="MyCheckboxTemplate">
249261
<Anchors>
250-
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="26" y="-110"/>
262+
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="26" y="-115"/>
251263
</Anchors>
252264
<Frames>
253265
<CheckButton name="$parent_RangeIndicator" parentKey="rangeIndicator" inherits="MyCheckboxTemplate">

eqMan/eqMan_base.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,6 @@ function Angleur_RepositionWeaponSwapFrames()
629629
else
630630
Angleur_BetaPrint(colorDebug2:WrapTextInColorCode("RepositionWeaponSwapFrames ") .. ": it do be nil")
631631
end
632-
print("is visible: ", LibDBIcon10_AngleurMap:IsVisible())
633632
if weaponSwapFrames.minimap ~= nil and LibDBIcon10_AngleurMap and LibDBIcon10_AngleurMap:IsShown() and LibDBIcon10_AngleurMap:IsVisible() then
634633
local frameX, frameY = LibDBIcon10_AngleurMap:GetSize()
635634
local selfX, selfY = weaponSwapFrames.minimap:GetSize()

tabs/standard_cata.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,33 @@ local function InitializeDropDownBait(self, level)
4141
UIDropDownMenu_SetSelectedID(Angleur.configPanel.tab1.contents.baitEnable.dropDown, angleurItems.selectedBaitTable.dropDownID)
4242
end
4343

44+
45+
local function RaftDropDownOnClick(self)
46+
UIDropDownMenu_SetSelectedID(Angleur.configPanel.tab1.contents.raftEnable.dropDown, self:GetID())
47+
AngleurConfig.chosenRaft.dropDownID = self:GetID()
48+
--AngleurConfig.chosenRaft.name = angleurToys.ownedRafts[self:GetID()].name --> Changed into the below for localisation
49+
AngleurConfig.chosenRaft.toyID = angleurToys.ownedRafts[self:GetID()].toyID
50+
Angleur_SetSelectedToy(angleurToys.selectedRaftTable, angleurToys.ownedRafts, AngleurConfig.chosenRaft.toyID)
51+
end
52+
53+
local raftTitleSet = false
54+
local function InitializeDropDownRafts(self, level)
55+
if not raftTitleSet then
56+
DropDown_CreateTitle(self, T["Rafts"])
57+
raftTitleSet = true
58+
return
59+
end
60+
--Contents
61+
for i, rafts in pairs(angleurToys.ownedRafts) do
62+
info = UIDropDownMenu_CreateInfo()
63+
info.text = rafts.name
64+
info.value = rafts.name
65+
info.func = RaftDropDownOnClick
66+
UIDropDownMenu_AddButton(info)
67+
end
68+
UIDropDownMenu_SetSelectedID(Angleur.configPanel.tab1.contents.raftEnable.dropDown, AngleurConfig.chosenRaft.dropDownID)
69+
end
70+
4471
function cata:ExtraButtons(tab1contents)
4572
tab1contents.baitEnable.text:SetText(T["Bait"])
4673
tab1contents.baitEnable:reposition()
@@ -67,6 +94,29 @@ function cata:ExtraButtons(tab1contents)
6794
DropDown_CreateTitle(tab1contents.baitEnable.dropDown, T["Bait"])
6895

6996

97+
tab1contents.raftEnable.text:SetText(T["Raft"])
98+
tab1contents.raftEnable:reposition()
99+
tab1contents.raftEnable.disabledText:SetText(T["Couldn't find any rafts \n in toybox, feature disabled"])
100+
tab1contents.raftEnable:SetScript("OnClick", function(self)
101+
if self:GetChecked() then
102+
AngleurConfig.raftEnabled = true
103+
self.dropDown:Show()
104+
elseif self:GetChecked() == false then
105+
AngleurConfig.raftEnabled = false
106+
self.dropDown:Hide()
107+
end
108+
end)
109+
UIDropDownMenu_Initialize(tab1contents.raftEnable.dropDown, InitializeDropDownRafts)
110+
UIDropDownMenu_SetWidth(tab1contents.raftEnable.dropDown, 100)
111+
UIDropDownMenu_SetButtonWidth(tab1contents.raftEnable.dropDown, 124)
112+
UIDropDownMenu_SetSelectedID(tab1contents.raftEnable.dropDown, 1)
113+
UIDropDownMenu_JustifyText(tab1contents.raftEnable.dropDown, "LEFT")
114+
if AngleurConfig.raftEnabled == true then
115+
tab1contents.raftEnable:SetChecked(true)
116+
tab1contents.raftEnable.dropDown:Show()
117+
end
118+
DropDown_CreateTitle(tab1contents.raftEnable.dropDown, T["Rafts"])
119+
70120

71121
tab1contents.softInteract.text:SetText(T["Enable Soft Interact"])
72122
local pictureTooltip = CreateFrame("GameTooltip", "AngleurSoftInteract_PictureTooltip", UIParent, "Angleur_LegolandoPictureTooltipTemplate")

toys/toys_base.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ function Angleur_LoadToys(self)
9393
--________________
9494
--DO RETAIL THING
9595
--________________
96-
if Angleur_CheckVersion() == 1 then retail:LoadToysExtra() end
96+
if Angleur_CheckVersion() == 1 then retail:ToysStandardTab() end
97+
if Angleur_CheckVersion() == 2 then cata:ToysStandardTab() end
9798

9899
Angleur_LoadExtraToys(Angleur.configPanel.tab2.contents.extraToys)
99100
end

toys/toys_cata.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,13 @@ function cata:AdjustCloseButton(extraToysFrame)
1515
extraToysFrame.third.closeButton:AdjustPointsOffset(3, 4)
1616
done = true
1717
end
18+
19+
function cata:ToysStandardTab()
20+
if Angleur_CheckOwnedToys(angleurToys.selectedRaftTable, angleurToys.ownedRafts, angleurToys.raftPossibilities) then
21+
Angleur_SetSelectedToy(angleurToys.selectedRaftTable, angleurToys.ownedRafts, AngleurConfig.chosenRaft.toyID)
22+
--WHY? WHY HAVE I PUT THIS IN? CHECK LATER, SEEMS POINTLESS
23+
Angleur.toyButton:SetAttribute("macrotext", "/cast " .. angleurToys.selectedRaftTable.name)
24+
else
25+
Angleur.configPanel.tab1.contents.raftEnable:greyOut()
26+
end
27+
end

toys/toys_retail.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function retail:setTableToSelectedTable(inputTable, selectedToyTable)
1919
end)
2020
end
2121

22-
function retail:LoadToysExtra()
22+
function retail:ToysStandardTab()
2323
if Angleur_CheckOwnedToys(angleurToys.selectedRaftTable, angleurToys.ownedRafts, angleurToys.raftPossibilities) then
2424
Angleur_SetSelectedToy(angleurToys.selectedRaftTable, angleurToys.ownedRafts, AngleurConfig.chosenRaft.toyID)
2525
--WHY? WHY HAVE I PUT THIS IN? CHECK LATER, SEEMS POINTLESS

0 commit comments

Comments
 (0)