public static UsersPetinfo CreatePet(PetTemplateInfo info, int userID, int place) { UsersPetinfo usersPetinfo = new UsersPetinfo(); int starLevel = info.StarLevel; int minValue = 200 + 100 * starLevel; int maxValue = 350 + 100 * starLevel; int minValue2 = 1700 + 1000 * starLevel; int maxValue2 = 2200 + 2500 * starLevel; usersPetinfo.BloodGrow = PetMgr.rand.Next(minValue2, maxValue2); usersPetinfo.AttackGrow = PetMgr.rand.Next(minValue, maxValue); usersPetinfo.DefenceGrow = PetMgr.rand.Next(minValue, maxValue); usersPetinfo.AgilityGrow = PetMgr.rand.Next(minValue, maxValue); usersPetinfo.LuckGrow = PetMgr.rand.Next(minValue, maxValue); usersPetinfo.DamageGrow = 0; usersPetinfo.GuardGrow = 0; double num = (double)PetMgr.rand.Next(54, 61) * 0.1; double num2 = (double)PetMgr.rand.Next(9, 13) * 0.1; usersPetinfo.Blood = (int)((double)(PetMgr.rand.Next(minValue2, maxValue2) / 10) * 0.1 * num); usersPetinfo.Attack = (int)((double)(PetMgr.rand.Next(minValue, maxValue) / 10) * 0.1 * num2); usersPetinfo.Defence = (int)((double)(PetMgr.rand.Next(minValue, maxValue) / 10) * 0.1 * num2); usersPetinfo.Agility = (int)((double)(PetMgr.rand.Next(minValue, maxValue) / 10) * 0.1 * num2); usersPetinfo.Luck = (int)((double)(PetMgr.rand.Next(minValue, maxValue) / 10) * 0.1 * num2); usersPetinfo.Damage = 0; usersPetinfo.Guard = 0; usersPetinfo.Hunger = 10000; usersPetinfo.TemplateID = info.TemplateID; usersPetinfo.Name = info.Name; usersPetinfo.UserID = userID; usersPetinfo.Place = place; usersPetinfo.Level = 1; usersPetinfo.Skill = PetMgr.UpdateSkillPet(1, info.TemplateID); usersPetinfo.SkillEquip = PetMgr.ActiveEquipSkill(1); return(usersPetinfo); }