mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Use own resources when buying boat in allied shipyard
This commit is contained in:
@ -5698,7 +5698,7 @@ void CGameHandler::objectVisitEnded(const CObjectVisitQuery & query)
|
||||
ObjectVisitEnded::defaultExecute(serverEventBus.get(), endVisit, query.players.front(), query.visitingHero->id);
|
||||
}
|
||||
|
||||
bool CGameHandler::buildBoat(ObjectInstanceID objid)
|
||||
bool CGameHandler::buildBoat(ObjectInstanceID objid, PlayerColor playerID)
|
||||
{
|
||||
const IShipyard *obj = IShipyard::castFrom(getObj(objid));
|
||||
|
||||
@ -5714,7 +5714,6 @@ bool CGameHandler::buildBoat(ObjectInstanceID objid)
|
||||
return false;
|
||||
}
|
||||
|
||||
const PlayerColor playerID = obj->o->tempOwner;
|
||||
TResources boatCost;
|
||||
obj->getBoatCost(boatCost);
|
||||
TResources aviable = getPlayerState(playerID)->resources;
|
||||
|
Reference in New Issue
Block a user