| 1386 | } |
| 1387 | |
| 1388 | GameValue GetNetworkId(const GameState* state, GameValuePar oper1) |
| 1389 | { |
| 1390 | Object* obj = GetObject(oper1); |
| 1391 | if (!obj) |
| 1392 | { |
| 1393 | return NOTHING; |
| 1394 | } |
| 1395 | |
| 1396 | if (GWorld->GetMode() != GModeNetware) |
| 1397 | { |
| 1398 | return GameArrayType(); |
| 1399 | } |
| 1400 | |
| 1401 | NetworkId id = obj->GetNetworkId(); |
| 1402 | |
| 1403 | GameValue value = state->CreateGameValue(GameArray); |
| 1404 | GameArrayType& array = value; |
| 1405 | array.Resize(2); |
| 1406 | array[0] = Format("%d", id.creator); |
| 1407 | array[1] = float(id.id); |
| 1408 | |
| 1409 | return array; |
| 1410 | } |
| 1411 | |
| 1412 | GameValue GetUnitById(const GameState* state, GameValuePar oper1) |
| 1413 | { |
no test coverage detected