* Gets the transfer cost of the currently selected item. * @return Transfer cost. */
| 484 | * @return Transfer cost. |
| 485 | */ |
| 486 | int TransferItemsState::getCost() const |
| 487 | { |
| 488 | int cost = 0; |
| 489 | // Item cost |
| 490 | if (TRANSFER_ITEM == getType(_sel)) |
| 491 | { |
| 492 | cost = 1; |
| 493 | } |
| 494 | // Craft cost |
| 495 | else if (TRANSFER_CRAFT == getType(_sel)) |
| 496 | { |
| 497 | cost = 25; |
| 498 | } |
| 499 | // Personnel cost |
| 500 | else |
| 501 | { |
| 502 | cost = 5; |
| 503 | } |
| 504 | return (int)floor(_distance * cost); |
| 505 | } |
| 506 | |
| 507 | /** |
| 508 | * Gets the quantity of the currently selected item |
no outgoing calls
no test coverage detected