Function PlayersAreCoAllied
- Line
- 5261
- Location
- blizzard.j
- Constant?
- no
- Type
- function
- Arguments
- player playerA, player playerB
- Returns
- boolean
| 5261 | function PlayersAreCoAllied takes player playerA, player playerB returns boolean |
| 5262 | // Players are considered to be allied with themselves.
|
| 5263 | if (playerA == playerB) then |
| 5264 | return true |
| 5265 | endif
|
| 5266 | |
| 5267 | // Co-allies are both allied with each other.
|
| 5268 | if GetPlayerAlliance(playerA, playerB, ALLIANCE_PASSIVE) then |
| 5269 | if GetPlayerAlliance(playerB, playerA, ALLIANCE_PASSIVE) then |
| 5270 | return true |
| 5271 | endif
|
| 5272 | endif
|
| 5273 | return false |
| 5274 | endfunction
|