Skip to content

Commit

Permalink
Updated for war within
Browse files Browse the repository at this point in the history
  • Loading branch information
Alar of Runetotem committed Nov 7, 2024
1 parent 7524826 commit f94b55e
Show file tree
Hide file tree
Showing 5 changed files with 308 additions and 28 deletions.
18 changes: 14 additions & 4 deletions MrFish.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions MrFish.toc
Original file line number Diff line number Diff line change
@@ -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
## [email protected]:alarofrunetotem/MrFish.git
## Title: MrFish
Expand Down
273 changes: 273 additions & 0 deletions RelNotes.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
Loading

0 comments on commit f94b55e

Please sign in to comment.