Function ReducePlayerTechMaxAllowed
- Line
- 8331
- Location
- blizzard.j
- Constant?
- no
- Type
- function
- Arguments
- player whichPlayer, integer techId, integer limit
- Returns
- nothing
| 8331 | function ReducePlayerTechMaxAllowed takes player whichPlayer, integer techId, integer limit returns nothing |
| 8332 | local integer oldMax = GetPlayerTechMaxAllowed(whichPlayer, techId) |
| 8333 | |
| 8334 | // A value of -1 is used to indicate no limit, so check for that as well.
|
| 8335 | if (oldMax < 0 or oldMax > limit) then |
| 8336 | call SetPlayerTechMaxAllowed(whichPlayer, techId, limit) |
| 8337 | endif
|
| 8338 | endfunction
|