Help
Regional FlagBUG: MAX_PLAYER_LEVEL_TABLE and MoPSource
avatar
Vger
Target Source
#1 - 2012/07/26 05:24:00 PM
Some of the WoW UI code uses MAX_PLAYER_LEVEL_TABLE[GetAccountExpansionLevel()] to determine the current player's level cap—I know this code is used in FrameXML/ReputationFrame.lua, and I used it in Pawn, and I'm sure it's used in a bunch of places also. Now that the Mists of Pandaria preorders are available, GetAccountExpansionLevel returns 4, but MAX_PLAYER_LEVEL_TABLE doesn't have a [4] if your running on WoW 4.3 realms, so all of that code breaks now for anyone who's upgraded.

Blizzard—for backward compatibility (including with Blizzard code in the current live client) maybe the server should never send anything higher than 3 for whatever GetAccountExpansionLevel uses on live realms. (Send the actual value on the PTRs and beta realms of course.)

AddOn authors—Time to write a special case!

avatar
Blue Poster
Target Source
#3 - 2012/07/26 07:05:00 PM
Actually this is not a bug.

GetAccountExpansionLevel() is different from GetExpansionLevel().

You should use GetExpansionLevel() when indexing into MAX_PLAYER_LEVEL_TABLE.