Mission Report Button Plus

Mission Report Button Plus

24.2k Downloads

Lua Error on login on CN region

Closed this issue · 2 comments

commented

Encountered a lua error on login, and Shadowlands icon is selected by the addon.

456x .../MissionReportButtonPlus/MissionReportButtonPlus.lua:1520: attempt to index local 'landingPageInfo' (a nil value)
[string "@MissionReportButtonPlus/MissionReportButtonPlus.lua"]:1520: in function `RefreshExpansionOverlay'
[string "@Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:37: in function <...pansionLandingPage/Blizzard_ExpansionLandingPage.lua:35>

Locals:
self = ExpansionLandingPage {
 Overlay = Frame {
 }
}
newestOverlay = <table> {
}
newestUnlockedExpansionID = nil
landingPageInfo = nil
displayInfo = <table> {
 description = "点击这里显示卡兹阿加概要"
 normalAtlas = "warwithin-landingbutton-up"
 glowAtlas = "warwithin-landingbutton-glow"
 pushedAtlas = "warwithin-landingbutton-down"
 anchorOffset = <table> {
 }
 useDefaultButtonSize = true
 expansionLandingPageType = 2
 title = "卡兹阿加概要"
 highlightAtlas = "warwithin-landingbutton-highlight"
}
(*temporary) = 2
(*temporary) = nil
(*temporary) = "attempt to index local 'landingPageInfo' (a nil value)"
LocalLandingPageTypeUtil = <table> {
 currentGarrisonTypeID = 0
 previousLandingPageTypeID = 0
 previousGarrisonTypeID = 0
 currentLandingPageTypeID = 0
}
LandingPageInfo = <table> {
 8 = <table> {
 }
 9 = <table> {
 }
 6 = <table> {
 }
 10 = <table> {
 }
 7 = <table> {
 }
 5 = <table> {
 }
}
landingPageOverlay = <table> {
 9 = <table> {
 }
 10 = <table> {
 }
}

I've dig some details here, and found that GetMaximumExpansionLevel returns weird info on CN region. But the others returns well.

Dump: value=GetMaximumExpansionLevel() 
[1]=6 
Dump: value=GetExpansionLevel() 
[1]=10 
Dump: value=GetAccountExpansionLevel() 
[1]=10 
Dump: value=GetServerExpansionLevel() 
[1]=10 

And I tried change the following line to return 10;, then the error gone and TWW icon is selected again.

return GetMaximumExpansionLevel();

commented

Thank you for reporting this, especially for the digging part!
I encountered this bug today accidentally myself, but my values for the Get...ExpansionLevel() functions weren't that weirdly off. Maybe this it's not just a problem for the CN region.

I will try to fix this, as soon as possible.

commented

Hi, I just released a fix for this.
I'm now taking the highest number of GetMaximumExpansionLevel(), GetAccountExpansionLevel() and GetClientDisplayExpansionLevel(). This should get the correct expansion level and should work now!

  • Enjoy!