diff --git a/MrFish.lua b/MrFish.lua index 2d5cfe7..ca30e66 100644 --- a/MrFish.lua +++ b/MrFish.lua @@ -59,6 +59,7 @@ local GetSpellInfo=C_Spell.GetSpellInfo -- if Wow Client is Classic if select(4,GetBuildInfo()) < 20000 then FishingId = 7732 +---@diagnostic disable-next-line: undefined-field UnitChannelInfo = _G.ChannelInfo -- Main Profession localisations @@ -148,8 +149,10 @@ function addon:CHAT_MSG_SKILL(event,msg) if (fishingSkill and fishingSkillID) then local _ if select(4,GetBuildInfo()) < 20000 then +---@diagnostic disable-next-line: cast-local-type fishingCap, fishingBonus = select(6,GetSkillLineInfo(fishingSkillID)) else +---@diagnostic disable-next-line: cast-local-type fishingCap,_,_,_,fishingBonus=select(4,GetProfessionInfo(fishingSkillID)) end start.Amount:SetFormattedText(TRADESKILL_RANK_WITH_MODIFIER,fishingSkill,fishingBonus,fishingCap) @@ -363,9 +366,8 @@ function addon:Init() if (CanFish) then if select(4,GetBuildInfo()) < 20000 then fishingName, _, _, fishingSkill, _, _, fishingCap = GetSkillLineInfo(fishing) - fishingTexture = GetSpellTexture(fishingName) else - fishingName,fishingTexture,fishingSkill,fishingCap=GetProfessionInfo(fishing) + fishingName,_,fishingSkill,fishingCap=GetProfessionInfo(fishing) end self:SetupFrames() @@ -425,16 +427,20 @@ function addon:StartFishFrame(atCursor) if (fishingSkillID) then local _ if select(4,GetBuildInfo()) < 20000 then +---@diagnostic disable-next-line: cast-local-type fishingSkill,_,fishingBonus,fishingCap = select(4,GetSkillLineInfo(fishingSkillID)) else +---@diagnostic disable-next-line: cast-local-type fishingSkill,fishingCap,_,_,_,fishingBonus=select(3,GetProfessionInfo(fishingSkillID)) end end start.Amount:SetFormattedText(TRADESKILL_RANK_WITH_MODIFIER,fishingSkill,fishingBonus,fishingCap) +---@diagnostic disable-next-line: undefined-field if _G.ElvUI then MrFishBaitFrame:StripTextures() MrFishBaitFrame:SetTemplate("Default") +---@diagnostic disable-next-line: undefined-field _G.ElvUI[1]:GetModule("Skins"):HandleButton(MrFishStopButton) end end @@ -640,9 +646,10 @@ local icon = LibStub("LibDBIcon-1.0",true) local KEY_BUTTON1=ns.LMB local KEY_BUTTON2=ns.RMB - +---@class ldb:LibDataBroker.DataObjectCommonFields -- ldb extension local oldIsFishing +---@diagnostic disable-next-line: inject-field function ldb:Update() ldb.text=IsFishing and C(Fishing,"GREEN") or C(Fishing,"SILVER") end @@ -657,9 +664,12 @@ function ldb:OnClick(button) end -function ldb:OnTooltipShow(...) +function ldb:OnTooltipShow() +---@diagnostic disable-next-line: undefined-field self:AddLine("MrFish") +---@diagnostic disable-next-line: undefined-field self:AddDoubleLine(KEY_BUTTON1,L['Fishing mode on/off'],nil,nil,nil,C:Green()) +---@diagnostic disable-next-line: undefined-field self:AddDoubleLine(KEY_BUTTON2,L['Open configuration'],nil,nil,nil,C:Green()) end diff --git a/MrFish.toc b/MrFish.toc index 46d0bc7..73fe394 100644 --- a/MrFish.toc +++ b/MrFish.toc @@ -1,6 +1,6 @@ -## Interface: 110000, 110002 +## Interface: 110005 ## Interface-Classic: 11502 -## Interface-Cata: 40400 +## Interface-Cata: 40401,40401 ## IconTexture: Interface\Icons\inv_fishingpole_02 ## git@github.com:alarofrunetotem/MrFish.git ## Title: MrFish diff --git a/RelNotes.json b/RelNotes.json new file mode 100644 index 0000000..5001a6e --- /dev/null +++ b/RelNotes.json @@ -0,0 +1,273 @@ +{ + "NOTES": { + "k021402": { + "major": "2", + "minor": "14", + "patch": "2", + "description": [ + { + "tag": "Fix", + "info": "was not loading" + } + ] + }, + "k021401": { + "major": "2", + "minor": "14", + "patch": "1", + "description": [ + { + "tag": "Feature", + "info": "Library Update" + } + ] + }, + "k021400": { + "major": "2", + "minor": "14", + "patch": "0", + "description": [ + { + "tag": "Toc", + "info": "11.0.0, 11.0.2" + } + ] + }, + "k021300": { + "major": "2", + "minor": "13", + "patch": "0", + "description": [ + { + "tag": "Toc", + "info": "10.2.7" + } + ] + }, + "k021200": { + "major": "2", + "minor": "12", + "patch": "0", + "description": [ + { + "tag": "Feature", + "info": "preliminary support for classic and wrath" + } + ] + }, + "k021102": { + "major": "2", + "minor": "11", + "patch": "2", + "description": [ + { + "tag": "Toc", + "info": "10.2.6" + } + ] + }, + "k020501": { + "major": "2", + "minor": "5", + "patch": "1", + "description": [ + { + "tag": "Fix", + "info": "Updated NSADropdown library" + } + ] + }, + "k020406": { + "major": "2", + "minor": "4", + "patch": "6", + "description": [ + { + "tag": "Fix", + "info": "Update for Shadowlands 9.x" + }, + { + "tag": "Feature", + "info": "Option for \"Fade\" the Mr. Fish Button or simply disappear" + }, + { + "tag": "Feature", + "info": "Skinned some Frames for ElvUI" + }, + { + "tag": "Developer", + "info": "Code Style formated with \"Eclipse LUA Formating\" feature" + } + ] + }, + "k020405": { + "major": "2", + "minor": "4", + "patch": "5", + "description": [ + { + "tag": "Toc", + "info": "8.3.0" + } + ] + }, + "k020404": { + "major": "2", + "minor": "4", + "patch": "4", + "description": [ + { + "tag": "Feature", + "info": "Updated for 8.2" + } + ] + }, + "k020403": { + "major": "2", + "minor": "4", + "patch": "3", + "description": [ + { + "tag": "Fix", + "info": "now uses new itembutton instead of itembuttontemplate" + } + ] + }, + "k020400": { + "major": "2", + "minor": "4", + "patch": "0", + "description": [ + { + "tag": "Feature", + "info": "Thanks to fuba" + }, + { + "tag": "Fix", + "info": "Fixed Weapon Swap when entering Combat in Fishing" + }, + { + "tag": "Fix", + "info": "Fixed wrong Weapon\/Offand Equiped after stop Fishing" + }, + { + "tag": "Fix", + "info": "MrFish will now be disabled when entering Combat" + }, + { + "tag": "Feature", + "info": "You need enable it manually after Combat again" + }, + { + "tag": "Fix", + "info": "Changed to use ItemLink instead of ItemID to Store and Restore Weapons because of Enchants and Sockets" + }, + { + "tag": "Example", + "info": "This will prevent to equip the Wrong Item with the same Name but different Itemlevel, Enchant or Socket(s)" + }, + { + "tag": "Fix", + "info": "Added a Delay of 0.5 Seconds before the Fishing Button appears" + }, + { + "tag": "Feature", + "info": "So the Bonus will now shown correctly after equip a Fishing Pole" + } + ] + }, + "k020300": { + "major": "2", + "minor": "3", + "patch": "0", + "description": [ + { + "tag": "Feature", + "info": "fisihing button is now less invasive" + } + ] + }, + "k020202": { + "major": "2", + "minor": "2", + "patch": "2", + "description": [ + { + "tag": "Fix", + "info": "Version number is now the expected one" + }, + { + "tag": "Fix", + "info": "lua error when starting" + }, + { + "tag": "Feature", + "info": "you can reequip weapons and exit fishing mode just walking for more than 3 seconds" + } + ] + }, + "k010201": { + "major": "1", + "minor": "2", + "patch": "1", + "description": [ + { + "tag": "Feature", + "info": "attempt to be smarter.Tries to keep fish button visible while you add a lure or move to a better spot" + } + ] + }, + "k010101": { + "major": "1", + "minor": "1", + "patch": "1", + "description": [ + { + "tag": "Fix", + "info": "removed an old debug message" + } + ] + }, + "k010001": { + "major": "1", + "minor": "0", + "patch": "1", + "description": [ + { + "tag": "Feature", + "info": "Feature; Portoguese localization" + }, + { + "tag": "Fix", + "info": "fixes a possile crash" + } + ] + }, + "k010000": { + "major": "1", + "minor": "0", + "patch": "0", + "description": [ + { + "tag": "Feature", + "info": "Initial release" + } + ] + } + }, + "PARAGRAPHS": [ + "Description" + ], + "TITLE": { + "addon": "Mr Fish", + "title": "RELNOTES" + }, + "PRE": [ + "Mr Fish manages your fishing needs giving you a quick line cast button and automagically switching eq.", + "It even changes back to weapons if you enter combat", + "", + "\/fish", + "Starts fishing", + "\/nofish" + ] +} \ No newline at end of file diff --git a/RelNotes.lua b/RelNotes.lua index edc7321..81320af 100644 --- a/RelNotes.lua +++ b/RelNotes.lua @@ -1,9 +1,9 @@ -local me,ns=... -local L=LibStub("AceLocale-3.0"):GetLocale(me,true) -local hlp=LibStub("AceAddon-3.0"):GetAddon(me) +-- AUTOGENERATED 2024-11-07T18:43:41+00:00---@diagnostic disable: undefined-field, inject-field +local me=... +local hlp=LibStub('AceAddon-3.0'):GetAddon(me) function hlp:loadHelp() -self:HF_Title("Mr Fish","RELNOTES") -self:HF_Paragraph("Description") +self:HF_Title([[Mr Fish]],[[RELNOTES]]) +self:HF_Paragraph('Description') self:HF_Pre([[ Mr Fish manages your fishing needs giving you a quick line cast button and automagically switching eq. It even changes back to weapons if you enter combat @@ -12,29 +12,28 @@ It even changes back to weapons if you enter combat Starts fishing /nofish ]]) +self:HF_Paragraph('Release Notes') self:RelNotes(2,14,2,[[ - Fix: was not loading +Fix: was not loading ]]) self:RelNotes(2,14,1,[[ - Library Update +Feature: Library Update ]]) self:RelNotes(2,14,0,[[ - Toc: 11.0.0, 11.0.2 +Toc: 11.0.0, 11.0.2 ]]) self:RelNotes(2,13,0,[[ - Toc: 10.2.7 +Toc: 10.2.7 ]]) self:RelNotes(2,12,0,[[ Feature: preliminary support for classic and wrath - ]]) +]]) self:RelNotes(2,11,2,[[ Toc: 10.2.6 ]]) - self:RelNotes(2,5,1,[[ Fix: Updated NSADropdown library ]]) - self:RelNotes(2,4,6,[[ Fix: Update for Shadowlands 9.x Feature: Option for "Fade" the Mr. Fish Button or simply disappear @@ -51,20 +50,19 @@ self:RelNotes(2,4,3,[[ Fix: now uses new itembutton instead of itembuttontemplate ]]) self:RelNotes(2,4,0,[[ -Thanks to fuba +Feature: Thanks to fuba Fix: Fixed Weapon Swap when entering Combat in Fishing Fix: Fixed wrong Weapon/Offand Equiped after stop Fishing Fix: MrFish will now be disabled when entering Combat -You need enable it manually after Combat again +Feature: You need enable it manually after Combat again Fix: Changed to use ItemLink instead of ItemID to Store and Restore Weapons because of Enchants and Sockets Example: This will prevent to equip the Wrong Item with the same Name but different Itemlevel, Enchant or Socket(s) Fix: Added a Delay of 0.5 Seconds before the Fishing Button appears - So the Bonus will now shown correctly after equip a Fishing Pole +Feature: So the Bonus will now shown correctly after equip a Fishing Pole ]]) self:RelNotes(2,3,0,[[ Feature: fisihing button is now less invasive ]]) - self:RelNotes(2,2,2,[[ Fix: Version number is now the expected one Fix: lua error when starting @@ -74,15 +72,13 @@ self:RelNotes(1,2,1,[[ Feature: attempt to be smarter.Tries to keep fish button visible while you add a lure or move to a better spot ]]) self:RelNotes(1,1,1,[[ -Fix:removed an old debug message +Fix: removed an old debug message ]]) self:RelNotes(1,0,1,[[ -Feature; Portoguese localization +Feature: Feature; Portoguese localization Fix: fixes a possile crash ]]) self:RelNotes(1,0,0,[[ -Initial release +Feature: Initial release ]]) - end - diff --git a/pkgmeta.yaml b/pkgmeta.yaml index 4fd3b1b..dafd1bf 100644 --- a/pkgmeta.yaml +++ b/pkgmeta.yaml @@ -11,4 +11,5 @@ externals: ignore: - .buildpath - - .project \ No newline at end of file + - .project + - RelNotes.json \ No newline at end of file