Ejemplo n.º 1
0
        public IPlayer Create(IPlayer player, CharClassType type)
        {
            ICharClass icc = charClassRepository.GetById(type.ID);

            icc.AddXp(player.CharClass.PlayerLevelInfo.XP);

            return(new Player(player.Name, icc, player.Coins, player.LastDailyGroupFinder,
                              new List <IItem>(), new Dictionary <EquipSlot, IEquipment>()));
        }
Ejemplo n.º 2
0
        public void AddXP(int xp)
        {
            int before = charClass.Level;

            charClass.AddXp(xp);
            int after = charClass.Level;

            if (before != after)
            {
                UpdateAll(before, after);
            }
        }