Esempio n. 1
0
        public async Task Payday()
        {
            foreach (var player in this.Players)
            {
                string      id          = PlayerHandler.GetPlayerId(player);
                EconomyData economyData = this.database.GetEconomyDataForPlayer(id);
                Job         playerJob   = economyData.Job;
                UInt64      money       = playerJob.pay;
                this.database.AddMoneyForPlayer(id, money);

                PlayerHandler.Announce(player, $"You just got paid ${money}.");
            }

            await Delay(PayDayInterval);
        }
 private void OnPlayerConnecting([FromSource] Player player, string playerName, dynamic setKickReason, dynamic deferrals)
 {
     this.database.GetEconomyDataForPlayer(PlayerHandler.GetPlayerId(player));
 }