Explorar o código

Build boat in allied shipyards is allowed now

Andrii Danylchenko %!s(int64=7) %!d(string=hai) anos
pai
achega
9a36572446
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      server/NetPacksServer.cpp

+ 3 - 1
server/NetPacksServer.cpp

@@ -272,7 +272,9 @@ bool HireHero::applyGh(CGameHandler * gh)
 
 bool BuildBoat::applyGh(CGameHandler * gh)
 {
-	throwOnWrongOwner(gh, objid);
+	if(gh->getPlayerRelations(gh->getOwner(objid), gh->getPlayerAt(c)) == PlayerRelations::ENEMIES)
+		throwAndCompain(gh, "Can't build boat at enemy shipyard");
+
 	return gh->buildBoat(objid);
 }