| 1410 | } |
| 1411 | |
| 1412 | GameValue GetUnitById(const GameState* state, GameValuePar oper1) |
| 1413 | { |
| 1414 | const GameArrayType& array = oper1; |
| 1415 | if (!CheckSize(state, array, 2)) |
| 1416 | { |
| 1417 | return OBJECT_NULL; |
| 1418 | } |
| 1419 | if (!CheckType(state, array[0], GameString)) |
| 1420 | { |
| 1421 | return OBJECT_NULL; |
| 1422 | } |
| 1423 | if (!CheckType(state, array[1], GameScalar)) |
| 1424 | { |
| 1425 | return OBJECT_NULL; |
| 1426 | } |
| 1427 | |
| 1428 | GameStringType name = array[0]; |
| 1429 | |
| 1430 | RString netId = Format("%s:%d", name.Data(), toInt((float)array[1])); |
| 1431 | ; |
| 1432 | NetworkObject* obj = NetIdToNetObj(netId); |
| 1433 | Object* ret = dynamic_cast<Object*>(obj); |
| 1434 | return GameValueExt(ret); |
| 1435 | } |
| 1436 | |
| 1437 | static RString ConfigFullName(RString filename) |
| 1438 | { |
nothing calls this directly
no test coverage detected