Description:
MAX_NR_LOOT_ITEMS is 16 which is incorrect. The actual number of items client can display is 18.
You can see it if you follow these steps:
/run print(GetNumLootItems()) Branch(es):
3.3.5, presumably both
TC rev. hash/commit:
e0835b4673
The question here isnt whats the max value supported by client but what is the blizzlike limit (these values do not have to match, see questlog, 25 cap, space for much more)
Where this 16 comes from then? The comment on MAX_NR_LOOT_ITEMS clearly refers to client limitation. Probably it has to be corrected or removed to avoid ambiguity. By the way, I'm not sure if any loot instance can roll 16+ currently.
He actually meant 16 or higher doesn't matter because there is absolutely no evidence about how many items can >> actually << roll on retail. This does not mean the client limit but the server one.
Only because the client >> can << support 18 items per loot packet does not mean blizzard actually >> uses << that much.
The server-side limit of 16 was added in https://sourceforge.net/p/mangos/code/2530/ on 2006-11-01, so between patches 1.12.2 and 2.0.0/2.0.1 , so maybe not so related to 3.3.5 client-side limit. @trickerer you could dig into different client versions and/or patch notes to see which one is the correct one.
I checked client code for the limit, it is indeed 18 in 3.3.5
I checked several clients, 18 items limit seems to persist through 1.12.1.5875 to 6.x.x at least.
Sorry I didn't mention it, I found this limit by digging through client code, UI is just a better way to present it.
Also, client (at least 3.3.5) works loot container as 6x3 array, so 16 seems kind of improbable even.
Kind of, isn't one of the slots in UI gold (doesn't count against item limit)
Yes, one of the slot can be occupied by gold. But loot pages are generated separately from loot items container: if loot contains gold GetNumLootItems() can return 19. Last loot page can contain up to 4 items - just a nice UI feature, right
nice research @trickerer and @jackpoz
5491cb51a25b6e3c465e97b3c57ba67a8ea0bcce
Most helpful comment
I checked client code for the limit, it is indeed 18 in 3.3.5