Example #1
0
        public static TrophyData FromConfig(DisassemblygirlTrophyConfig config)
        {
            TrophyData data = new TrophyData();

            data.id            = config.id;
            data.name          = config.name;
            data.threshold     = config.threshold;
            data.type          = (TrophyType)Enum.Parse(typeof(TrophyType), config.type);
            data.conditionType = (TrophyConditionType)Enum.Parse(typeof(TrophyConditionType), config.conditionType);
            data.iconID        = config.iconID;
            return(data);
        }
Example #2
0
        public static UserData CreateDefault()
        {
            UserData user = new UserData();

            user.dungeonIndex = 26;
            user.girlID       = 1;
            user.functions    = new List <FunctionData>();
            user.guides       = new HashSet <int>();
            user.petDatas     = new List <PetData>();

            user.attributeBox = AttributeBox.CreateDefault();
            user.attributeBox.SetAttribute(AttributeKeys.GP, AttributeSetTypes.BaseValue, 999999);
            user.attributeBox.SetAttribute(AttributeKeys.RP, AttributeSetTypes.BaseValue, 999999);

            // Attach Pets
            user.petDatas.Add(PetData.FromConfig(ConfigMgr.GetInstance().DisassemblygirlPet.GetConfigById(1)));
            user.petDatas.Add(PetData.FromConfig(ConfigMgr.GetInstance().DisassemblygirlPet.GetConfigById(7)));
            user.petDatas.Add(PetData.FromConfig(ConfigMgr.GetInstance().DisassemblygirlPet.GetConfigById(13)));

            DisassemblygirlGirlConfig config = ConfigMgr.GetInstance().DisassemblygirlGirl.GetConfigById(user.girlID);

            user.girl = GirlData.FromConfig(config);

            // Attach Weapons
            user.girl.AddWeapon(7);
            user.girl.AddWeapon(13);
            user.girl.AddWeapon(19);
            user.girl.AddWeapon(25);
            user.girl.AddWeapon(31);
            user.girl.AddWeapon(37);

            // Shop Items
            user.shopData = new ShopData();
            user.shopData.attributeBox = AttributeBox.CreateDefault();
            user.shopData.attributeBox.SetAttribute(AttributeKeys.STR, AttributeSetTypes.BaseValue, 0f);
            user.shopData.attributeBox.SetAttribute(AttributeKeys.VIT, AttributeSetTypes.BaseValue, 0f);
            user.shopData.attributeBox.SetAttribute(AttributeKeys.DEX, AttributeSetTypes.BaseValue, 0f);
            user.shopData.attributeBox.SetAttribute(AttributeKeys.SPD, AttributeSetTypes.BaseValue, 0f);

            // Trophies
            user.trophyDatas = new List <TrophyData>();
            foreach (DisassemblygirlTrophyConfig trophyConfig in ConfigMgr.GetInstance().DisassemblygirlTrophy.configs.Values)
            {
                user.trophyDatas.Add(TrophyData.FromConfig(trophyConfig));
            }
            return(user);
        }