Beispiel #1
0
            protected override void OnTick()
            {
                int pay = m_Vendor.ChargePerDay;

                if (m_Vendor.BankAccount < pay)
                {
                    pay -= m_Vendor.BankAccount;
                    m_Vendor.BankAccount = 0;

                    if (m_Vendor.HoldGold < pay)
                    {
                        m_Vendor.Say(503235);                           // I regret nothing!postal
                        m_Vendor.Blessed = false;
                        m_Vendor.Kill();
                    }
                    else
                    {
                        m_Vendor.HoldGold -= pay;
                    }
                }
                else
                {
                    m_Vendor.BankAccount -= pay;
                }
            }