Ejemplo n.º 1
0
        public void Tick(PlayerMobile pm)
        {
            if (pm == null || pm.Experience != this || pm.Region is ZoneInterne || NextExp > DateTime.Now)
            {
                return;
            }

            int tick   = GetNextTick();
            int valeur = ExpGain;

            if (tick == -1)
            {
                valeur = ExpGain / 100;
            }
            else
            {
                valeur = (int)(valeur * (1 - tick * 0.05));
            }

            valeur = Cotes.OctroyerXP(valeur);

            XP += valeur;

            CompensationGump.MJ mj = CompensationGump.GetMJ((Account)pm.Account);
            if (mj != null)
            {
                mj.XpGainedThisWeek += valeur;
                CompensationGump.WriteLine(String.Format("{0} recoit {1} xp. Le total courant de la semaine est de {2}.",
                                                         mj.Nom, valeur, mj.XpGainedThisWeek));
            }

            NextExp = DateTime.Now.AddMinutes(20);
        }
Ejemplo n.º 2
0
 public static void CompenserGMs()
 {
     foreach (CompensationGump.MJ mj in CompensationGump.GetMJs())
     {
         CompensationGump.WriteLine(String.Format(
                                        "Verification de paiement pour {0}. Son prochain paiement est le {1}.",
                                        mj.Nom, mj.NextCompensation.ToString()));
         if (mj.NextCompensation < DateTime.Now)
         {
             mj.PayerXP();
         }
     }
 }