Exemplo n.º 1
0
        public TransactionResult PayForResistanceBattle(Citizen attacker, Region defenderRegion, IWarService warService)
        {
            var adminCurrency = Persistent.Currencies.Gold;
            var defEntity     = defenderRegion.Country.Entity;
            var attEntity     = attacker.Entity;

            var adminMoney = warService.GetMoneyNeededToStartResistanceBattle(defenderRegion);

            var adminTransaction = new Transaction()
            {
                Arg1 = "Ressistance war fee",
                Arg2 = string.Format("{0}({1}) Attacked {2}({3})", attEntity.Name, attEntity.EntityID, defEntity.Name, defEntity.EntityID),
                DestinationEntityID = null,
                Money           = adminMoney,
                SourceEntityID  = attEntity.EntityID,
                TransactionType = TransactionTypeEnum.RessistanceWar
            };

            return(MakeTransaction(adminTransaction, useTransaction: false));
        }