public MegaBuyAccounting(IAccount playerAccount) { _playerAccount = playerAccount; _currentRate = new PerCallRate(0); _pendingPayments = new List <int>(); _dayPayment = new DayPayment(); World.Subscribe(EventSubscription.Create <HourChanged>(HourChanged, this)); World.Subscribe(EventSubscription.Create <CallSucceeded>(CallSucceeded, this)); World.Subscribe(EventSubscription.Create <CallRated>(CallRated, this)); World.Subscribe(EventSubscription.Create <TechnicalMistakeOccurred>(TechnicalMistakeOccurred, this)); World.Subscribe(EventSubscription.Create <CallFailed>(CallFailed, this)); World.Subscribe(EventSubscription.Create <JobChanged>(JobRoleChanged, this)); }
private void JobRoleChanged(JobChanged job) { _currentRate = JobTraits.Rates[job.Job]; }