public abstract class BaseBuyTradeStep extends Object implements ch.sahits.game.openpatrician.model.product.ITradeStep
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.city.ICity |
city |
private int |
maxBuyPrice |
private TradeService |
tradeService |
private ch.sahits.game.openpatrician.model.ship.INavigableVessel |
vessel |
private ch.sahits.game.openpatrician.model.product.IWare |
ware |
| Constructor and Description |
|---|
BaseBuyTradeStep() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
transferFromOfficeOrBuyFromCity(ch.sahits.game.openpatrician.model.IPlayer player,
int maxAmount)
Try transferring the required amount from storage if there is a store manager and the transfer is allowed.
|
@Autowired private TradeService tradeService
private ch.sahits.game.openpatrician.model.city.ICity city
private ch.sahits.game.openpatrician.model.product.IWare ware
private ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel
private int maxBuyPrice
protected void transferFromOfficeOrBuyFromCity(ch.sahits.game.openpatrician.model.IPlayer player,
int maxAmount)
player - for which the transfer happensmaxAmount - maximum amount of wares that should be loaded onto the vessel.Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.