Пример #1
0
    public static void CheckAtrophy(Mobile from)
    {
        if (from is not PlayerMobile pm)
        {
            return;
        }

        try
        {
            if (pm.LastValorLoss + LossDelay < Core.Now)
            {
                if (VirtueHelper.Atrophy(from, VirtueName.Valor, LossAmount))
                {
                    from.SendLocalizedMessage(1054040); // You have lost some Valor.
                }

                pm.LastValorLoss = Core.Now;
            }
        }
        catch
        {
            // ignored
        }
    }