public void RemoveLoot(IBattleManager battleManager, int attackIndex, ICombatObject attacker, ICombatObject defender, out Resource actualLoot) { if (attackIndex != 0 || battleManager.Round < Config.battle_loot_begin_round) { actualLoot = new Resource(); return; } var loot = battleFormulas.GetRewardResource(attacker, defender); city.BeginUpdate(); city.Resource.Subtract(loot, formula.HiddenResource(city, true), out actualLoot); city.EndUpdate(); }
public void RemoveLoot(IBattleManager battleManager, int attackIndex, ICombatObject attacker, ICombatObject defender, out Resource actualLoot) { if (attackIndex != 0) { actualLoot = new Resource(); return; } var loot = battleFormulas.GetRewardResource(attacker, defender); barbarianTribe.BeginUpdate(); barbarianTribe.Resource.Subtract(loot, out actualLoot); barbarianTribe.EndUpdate(); }