Benik / BenikUI

BenikUI is an external ElvUI mod, adding different frame style and new features like detatched portraits and dashboards.
https://www.curseforge.com/wow/addons/benikui
7 stars 6 forks source link

Error in Missions datatext #39

Closed Bauxite closed 1 year ago

Bauxite commented 1 year ago

Describe the bug and post the error message, if there is one: When shift-clicking on the BenikUI Missions datatext to show previous expansions, an error is thrown because of a change to the GarrisonFollowerType enum.

1x ElvUI_BenikUI/modules/datatexts/missions.lua:123: Usage: GetInProgressMissions([missionList,] garrFollowerTypeID)
[string "=[C]"]: ?

[string "@ElvUI_BenikUI/modules/datatexts/missions.lua"]:123: in function <ElvUI_BenikUI/modules/datatexts/missions.lua:120>

[string "@ElvUI_BenikUI/modules/datatexts/missions.lua"]:305: in function <ElvUI_BenikUI/modules/datatexts/missions.lua:213>

[string "@ElvUI_BenikUI/modules/datatexts/missions.lua"]:407: in function <ElvUI_BenikUI/modules/datatexts/missions.lua:361>

To Reproduce Add the Missions (BenikUI) datatext to any datatext slot. Shift-click to view previous expansion data.

Expected behavior Previous expansion's mission data is displayed in a popup.

Please include the addon and game versions: BenikUI: 4 .36 ElvUI: 13.32 WoW game variation (retail, WotLK, Classic Era): Retail, 10.1

Additional context: ElvUI has a mission datatext built-in now, so I'm not sure if the BenikUI mission datatext still provides any value and is worth maintaining separately.

It looks like this same error was fixed in version 13.29 of ElvUI for the default datatext. The GarrisonFollowerType.FollowerType_6_2_GarrisonFollower enum value was changed to GarrisonFollowerType.FollowerType_6_0_Boat

https://github.com/tukui-org/ElvUI/issues/914 https://github.com/tukui-org/ElvUI/commit/d27787d3cf12484ebf4e9658d73a640dd6895be6

Benik commented 1 year ago

Both ElvUI and BenikUI Missions dts have the same tooltip, the difference is in what the panel displays. Anyway, I applied a draft fix for it in the dev version. If you have time to give it a try, it would be much appreciated. Thank you :)

Bauxite commented 1 year ago

In 4.37 the error is still there, looks like a missed usage of the old enum value on line 305:

304 DT.tooltip:AddDoubleLine(L["Naval Mission(s) Report:"], AddInfo(1101), nil, nil, nil, 1, 1 , 1) 305 AddInProgressMissions(LE_FOLLOWER_TYPE_GARRISON_6_2)

Thank you for the quick turnaround - I see the difference now between ElvUI's default datatext and yours, when I load ElvUI without BenikUI. When they are both loaded it looks like Elv's mission datatext appearance is overwritten by yours.

Benik commented 1 year ago

Tbh l was thinking of removing it in the latest version, since the tooltip is exactly the same with ElvUI one (but broken in BenikUI) and also cause Missions is something that isn't used on daily basis from the majority of the players.

If you come up with a fix, it would be much appreciated, cause l cannot test, since l barely play old stuff. If not, l will just remove it.

Thank you for your effort and feedback <3

Benik commented 1 year ago

Probably just copying the OnEnter function from ElvUI Missions will do

Bauxite commented 1 year ago

Fixed the remaining error on 305 and updated the OnClick() method to open Dragon Isles Summary instead of Covenant Summary: https://github.com/Benik/BenikUI/pull/41

This is tested and working in Retail - thanks again!