Example #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>()));
        }
Example #2
0
        public ICharClass Convert(CharClass cc, int xp)
        {
            CharClassType cct = LEGACY_CLASS_TYPE[cc.classType];

            if (cc.classType == 0)
            {
                return(new DeprivedCharClass(classChoiceLevel));
            }
            return(new CharClassImpl(cct, cc.coinBonus, cc.itemFind, cc.myPets, cc.prestige,
                                     cc.preventDeathBonus, cc.successChance, cc.xpBonus, levelCap, xp));
        }
Example #3
0
        new public bool Equals(Object o)
        {
            if (o == null || !(o is CharClassType))
            {
                return(false);
            }

            CharClassType cct = (CharClassType)o;

            return(this.ID.Equals(cct.ID) &&
                   this.name.Equals(cct.name) &&
                   this.nameShort.Equals(cct.nameShort));
        }
Example #4
0
 public CharClassImpl(CharClassType cct, int coinBonus, int itemFnd, IList <Pet> pets,
                      int prestige, float pdb, float sc, int xB, int levelCap, int xE)
 {
     this.CharClassType     = cct;
     this.CoinBonus         = coinBonus;
     this.ItemFind          = itemFnd;
     this.level             = new LevelFactory().createFromXP(levelCap, xE);
     this.MyPets            = pets;
     this.Prestige          = prestige;
     this.PreventDeathBonus = pdb;
     this.SuccessChance     = sc;
     this.XpBonus           = xB;
 }