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>())); }
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)); }
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)); }
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; }