Skip to content

Commit fe60ff5

Browse files
committed
Don't allow trading influence on planets with HQs
Fixes /issues/2212
1 parent 93e74d0 commit fe60ff5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Zero-K.info/Controllers/FactionsController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ public ActionResult ModifyTreaty(int factionTreatyID,
178178
{
179179
effect.PlanetID = planetID.Value;
180180
effect.Planet = db.Planets.Find(planetID.Value);
181+
if (effect.Planet.PlanetStructures.Any(x => x.StructureType.OwnerChangeWinsGame == true) && effectType.TreatyEffects.Any(x => x.TreatyEffectType.EffectGiveInfluence == true))
182+
return Content("Cannot trade influence on victory planets");
181183
}
182184
db.TreatyEffects.InsertOnSubmit(effect);
183185
}

0 commit comments

Comments
 (0)