public bool AddPet(PetInfo pet) { if (pets.Count < m_MaxCount) { pets.Add(pet); return(true); } return(false); }
public PetInfo Drop(PetParameters parameters, PetDropSettings settings, PetSkillCollection skills, PetPassiveBonusCollection passiveBonuses) { PetInfo pet = new PetInfo(); pet.SetId(Guid.NewGuid().ToString()); pet.SetExp(0); pet.SetColor(GetColor(parameters, settings)); pet.SetType(GetType(parameters, settings)); pet.SetPassiveSkill(GetPassiveSkill(parameters, settings, passiveBonuses)); pet.SetActiveSkills(GetActiveSkills(pet.color, parameters, settings, skills)); pet.SetActive(false); float attackBaseAdd = Rand.Float(parameters.damage.BaseMin(), parameters.damage.BaseMax()); float attackColorAdd = Rand.Float(parameters.damage.ColorMin(), parameters.damage.ColorMax()); float attackLevelAdd = Rand.Float(parameters.damage.LevelMin(), parameters.damage.LevelMax()); pet.SetAttackParameters(attackBaseAdd, attackColorAdd, attackLevelAdd); float hpBaseAdd = Rand.Float(parameters.hp.BaseMin(), parameters.hp.BaseMax()); float hpColorAdd = Rand.Float(parameters.hp.ColorMin(), parameters.hp.ColorMax()); float hpLevelAdd = Rand.Float(parameters.hp.LevelMin(), parameters.hp.LevelMax()); pet.SetHpParameters(hpBaseAdd, hpColorAdd, hpLevelAdd); float odBaseAdd = Rand.Float(parameters.od.BaseMin(), parameters.od.BaseMax()); float odColorAdd = Rand.Float(parameters.od.ColorMin(), parameters.od.ColorMax()); float odLevelAdd = Rand.Float(parameters.od.LevelMin(), parameters.od.LevelMax()); pet.SetOptimalDistanceParameters(odBaseAdd, odColorAdd, odLevelAdd); pet.SetDamageType(GetDamageType(parameters, settings)); pet.SetMastery(GetMastery(parameters, settings)); return(pet); }
public bool Add(PetInfo pet) { return(AddPet(pet)); }