Function SetForceAllianceStateBJ
- Line
- 5234
- Location
- blizzard.j
- Constant?
- no
- Type
- function
- Arguments
- force sourceForce, force targetForce, integer allianceState
- Returns
- nothing
| 5234 | function SetForceAllianceStateBJ takes force sourceForce, force targetForce, integer allianceState returns nothing |
| 5235 | local integer sourceIndex |
| 5236 | local integer targetIndex |
| 5237 | |
| 5238 | set sourceIndex = 0 |
| 5239 | loop
|
| 5240 | |
| 5241 | if (sourceForce==bj_FORCE_ALL_PLAYERS or IsPlayerInForce(Player(sourceIndex), sourceForce)) then |
| 5242 | set targetIndex = 0 |
| 5243 | loop
|
| 5244 | if (targetForce==bj_FORCE_ALL_PLAYERS or IsPlayerInForce(Player(targetIndex), targetForce)) then |
| 5245 | call SetPlayerAllianceStateBJ(Player(sourceIndex), Player(targetIndex), allianceState) |
| 5246 | endif
|
| 5247 | |
| 5248 | set targetIndex = targetIndex + 1 |
| 5249 | exitwhen targetIndex == bj_MAX_PLAYER_SLOTS |
| 5250 | endloop
|
| 5251 | endif
|
| 5252 | |
| 5253 | set sourceIndex = sourceIndex + 1 |
| 5254 | exitwhen sourceIndex == bj_MAX_PLAYER_SLOTS |
| 5255 | endloop
|
| 5256 | endfunction
|