[Marketplace] When Adding the 12th Unit to All Marketplaces via Trigger

Level 3
Joined
Jun 24, 2019
Messages
24
Hello everyone,
Today I encountered a weird bug with latest version of World Editor (1.31):
1. Using trigger to add unit type to all marketplaces (Neutral Buddings category)
2. When adding the first 11 unit types, everything works perfectly
3. When adding the 12th unit type (the last unit type since UI only has 12 slots), bug occurs:

One of previous 11 unit types will be automatically removed from marketplaces, and then 12th unit type will succeed to add to marketplaces.

^ In general, the 12th unit type will force one of previous unit type disappear when itself added. As a result, there is no way to show 12 unit types in marketplaces at once :(

An interesting thing is, when using object editor to add unit type to sell, all 12 unit types can be added without any issue. However, when doing so, there is no way we can remove any unit type from marketplaces via trigger!

Please help me! Thank you so much and have a good weekend :)
 
Level 12
Joined
Jun 12, 2010
Messages
415
Hello everyone,
Today I encountered a weird bug with latest version of World Editor (1.31):
1. Using trigger to add unit type to all marketplaces (Neutral Buddings category)
2. When adding the first 11 unit types, everything works perfectly
3. When adding the 12th unit type (the last unit type since UI only has 12 slots), bug occurs:

One of previous 11 unit types will be automatically removed from marketplaces, and then 12th unit type will succeed to add to marketplaces.

^ In general, the 12th unit type will force one of previous unit type disappear when itself added. As a result, there is no way to show 12 unit types in marketplaces at once :(

An interesting thing is, when using object editor to add unit type to sell, all 12 unit types can be added without any issue. However, when doing so, there is no way we can remove any unit type from marketplaces via trigger!

Please help me! Thank you so much and have a good weekend :)

In the 49th line of common.j (well, it's probably another line after the new patches, but I'm using the one from the JASS manual), you will find this: constant integer bj_MAX_STOCK_UNIT_SLOTS = 11

At least for now, the maximum number of unit slots in a marketplace that can be added through triggers is 11, as per the common.j documentation.
 
Level 3
Joined
Jun 24, 2019
Messages
24
In the 49th line of common.j (well, it's probably another line after the new patches, but I'm using the one from the JASS manual), you will find this: constant integer bj_MAX_STOCK_UNIT_SLOTS = 11

At least for now, the maximum number of unit slots in a marketplace that can be added through triggers is 11, as per the common.j documentation.
Thanks for your reply. I just realized this. But it's weird right? The number, 11 not 12 :(
 

Wrda

Spell Reviewer
Level 23
Joined
Nov 18, 2012
Messages
1,731
Increase limit by what? by 1? Even if they increased it beyond that, where would all other stock units slots go?
Anyway, maybe try to hide the icon of the ability that makes you able to switch among units.
 
Level 3
Joined
Jun 24, 2019
Messages
24
Increase limit by what? by 1? Even if they increased it beyond that, where would all other stock units slots go?
Anyway, maybe try to hide the icon of the ability that makes you able to switch among units.
Thanks guys, what I mean is so far:
(1) using object editor, we can add 12 slots
(2) using trigger, we can only add 11 < 12 slots

^ That's my original confusion, so even for current UI, adding the 12th via trigger shouldn't be a problem tho :)
 
Top