Exemple #1
0
        public static void Initialize()
        {
            // Featured
            StoreCategory cat = StoreCategory.Featured;

            Register <VirtueShield>(1109616, 1158384, 0x7818, 0, 0, 1500, cat);
            Register <SoulstoneToken>(1158404, 1158405, 0x2A93, 0, 2598, 1000, cat, ConstructSoulstone);
            //Register<DeluxeStarterPackToken>(1158368, 1158369, 0, 0x9CCB, 0, 2000, cat);
            Register <GreenGoblinStatuette>(1125133, 1158015, 0xA095, 0, 0, 600, cat);
            //Register<TotemOfChromaticFortune>(1157606, 1157604, 0, 0x9CC9, 0, 300, cat);
            Register <MythicCharacterToken>(new TextDefinition[] { 1156614, 1156615 }, 1156679, 0x2AAA, 0, 0, 2500, cat);

            // Character
            cat = StoreCategory.Character;

            Register <HABPromotionalToken>(new TextDefinition[] { 1158741, 1156615 }, 1158740, 0x2AAA, 0, 0, 600, cat);
            Register <MysticalPolymorphTotem>(1158780, 1158781, 0xA276, 0, 0, 600, cat);
            //Register<DeluxeStarterPackToken>(1158368, 1158369, 0, 0x9CCB, 0, 2000, cat);
            Register <GreenGoblinStatuette>(1125133, 1158015, 0xA095, 0, 0, 600, cat);
            Register <GreyGoblinStatuette>(1125135, 1158015, 0xA097, 0, 0, 600, cat);
            Register <StableSlotIncreaseToken>(1157608, 1157609, 0x2AAA, 0, 0, 500, cat);
            Register <MythicCharacterToken>(new TextDefinition[] { 1156614, 1156615 }, 1156679, 0x2AAA, 0, 0, 2500, cat);
            Register <CharacterReincarnationToken>(new TextDefinition[] { 1156612, 1156615 }, 1156677, 0x2AAA, 0, 0, 2000, cat);

            Register <AbyssalHairDye>(1149822, 1156676, 0, 0x9C7A, 0, 400, cat);
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071439 }, 1156676, 0, 0x9C78, 0, 400, cat, ConstructHairDye); // Lemon Lime
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071470 }, 1156676, 0, 0x9C6D, 0, 400, cat, ConstructHairDye); // Yew Brown
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071471 }, 1156676, 0, 0x9C6E, 0, 400, cat, ConstructHairDye); // Bloodwood Red
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071438 }, 1156676, 0, 0x9C6F, 0, 400, cat, ConstructHairDye); // Vivid Blue
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071469 }, 1156676, 0, 0x9C71, 0, 400, cat, ConstructHairDye); // Ash Blonde
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071472 }, 1156676, 0, 0x9C72, 0, 400, cat, ConstructHairDye); // Heartwood Green
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071472 }, 1156676, 0, 0x9C85, 0, 400, cat, ConstructHairDye); // Oak Blonde
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071474 }, 1156676, 0, 0x9C70, 0, 400, cat, ConstructHairDye); // Sacred White
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071473 }, 1156676, 0, 0x9C73, 0, 400, cat, ConstructHairDye); // Frostwood Ice Green
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071440 }, 1156676, 0, 0x9C76, 0, 400, cat, ConstructHairDye); // Fiery Blonde
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071437 }, 1156676, 0, 0x9C77, 0, 400, cat, ConstructHairDye); // Bitter Brown
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071442 }, 1156676, 0, 0x9C74, 0, 400, cat, ConstructHairDye); // Gnaw's Twisted Blue
            Register <SpecialHairDye>(new TextDefinition[] { 1071387, 1071441 }, 1156676, 0, 0x9C75, 0, 400, cat, ConstructHairDye); // Dusk Black

            Register <GenderChangeToken>(new TextDefinition[] { 1156609, 1156615 }, 1156642, 0x2AAA, 0, 0, 1000, cat);
            Register <NameChangeToken>(new TextDefinition[] { 1156608, 1156615 }, 1156641, 0x2AAA, 0, 0, 1000, cat);

            // Equipment
            cat = StoreCategory.Equipment;
            Register <VirtueShield>(1109616, 1158384, 0x7818, 0, 0, 1500, cat);
            Register <HoodedBritanniaRobe>(1125155, 1158016, 0xA0AB, 0, 0, 1500, cat, ConstructRobe);
            Register <HoodedBritanniaRobe>(1125155, 1158016, 0xA0AC, 0, 0, 1500, cat, ConstructRobe);
            Register <HoodedBritanniaRobe>(1125155, 1158016, 0xA0AD, 0, 0, 1500, cat, ConstructRobe);
            Register <HoodedBritanniaRobe>(1125155, 1158016, 0xA0AE, 0, 0, 1500, cat, ConstructRobe);
            Register <HoodedBritanniaRobe>(1125155, 1158016, 0xA0AF, 0, 0, 1500, cat, ConstructRobe);

            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1157275 }, 1156671, 0, 0x9CBF, 0, 400, cat, ConstructHaochisPigment); // Heartwood Sienna
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1157274 }, 1156671, 0, 0x9CBD, 0, 400, cat, ConstructHaochisPigment); // Campion White
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1157273 }, 1156671, 0, 0x9CC2, 0, 400, cat, ConstructHaochisPigment); // Yewish Pine
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1157272 }, 1156671, 0, 0x9CC0, 0, 400, cat, ConstructHaochisPigment); // Minocian Fire
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1157269 }, 1156671, 0, 0x9CC1, 0, 400, cat, ConstructHaochisPigment); // Celtic Lime

            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070994 }, 1156906, 0, 0x9CA8, 0, 400, cat, ConstructPigments);     // Nox Green
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079584 }, 1156906, 0, 0x9CAF, 0, 400, cat, ConstructPigments);     // Midnight Coal
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070995 }, 1156906, 0, 0x9CA5, 0, 400, cat, ConstructPigments);     // Rum Red
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079580 }, 1156906, 0, 0x9CA4, 0, 400, cat, ConstructPigments);     // Coal
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079582 }, 1156906, 0, 0x9CA3, 0, 400, cat, ConstructPigments);     // Storm Bronze
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079581 }, 1156906, 0, 0x9CA2, 0, 400, cat, ConstructPigments);     // Faded Gold
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070988 }, 1156906, 0, 0x9CA1, 0, 400, cat, ConstructPigments);     // Violet Courage Purple
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079585 }, 1156906, 0, 0x9CA2, 0, 400, cat, ConstructPigments);     // Faded Bronze
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070996 }, 1156906, 0, 0x9C9F, 0, 400, cat, ConstructPigments);     // Fire Orange
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079586 }, 1156906, 0, 0x9C9E, 0, 400, cat, ConstructPigments);     // Faded Rose
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079583 }, 1156906, 0, 0x9CA7, 0, 400, cat, ConstructPigments);     // Rose
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079587 }, 1156906, 0, 0x9CA9, 0, 400, cat, ConstructPigments);     // Deep Rose
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070990 }, 1156906, 0, 0x9CAA, 0, 400, cat, ConstructPigments);     // Luna White

            Register <CommemorativeRobe>(1157009, 1156908, 0x4B9D, 0, 0, 500, cat);

            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070992 }, 1156906, 0, 0x9CAF, 0, 400, cat, ConstructPigments);     // Shadow Dancer Black
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070989 }, 1156906, 0, 0x9CAE, 0, 400, cat, ConstructPigments);     // Invulnerability Blue
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070991 }, 1156906, 0, 0x9CAD, 0, 400, cat, ConstructPigments);     // Dryad Green
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070993 }, 1156906, 0, 0x9CAC, 0, 400, cat, ConstructPigments);     // Berserker Red
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1079579 }, 1156906, 0, 0x9CAB, 0, 400, cat, ConstructPigments);     // Faded Coal
            Register <PigmentsOfTokuno>(new TextDefinition[] { 1070933, 1070987 }, 1156906, 0, 0x9C9D, 0, 400, cat, ConstructPigments);     // Paragon Gold

            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1071246 }, 1156671, 0, 0x9CAF, 0, 400, cat, ConstructHaochisPigment); // Ninja Black
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1018352 }, 1156671, 0, 0x9C83, 0, 400, cat, ConstructHaochisPigment); // Olive
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1071247 }, 1156671, 0, 0x9C7D, 0, 400, cat, ConstructHaochisPigment); // Dark Reddish Brown
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1071245 }, 1156671, 0, 0x9C85, 0, 400, cat, ConstructHaochisPigment); // Yellow
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1071244 }, 1156671, 0, 0x9C80, 0, 400, cat, ConstructHaochisPigment); // Pretty Pink
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1071248 }, 1156671, 0, 0x9C81, 0, 400, cat, ConstructHaochisPigment); // Midnight Blue
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1023856 }, 1156671, 0, 0x9C7F, 0, 400, cat, ConstructHaochisPigment); // Emerald
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1115467 }, 1156671, 0, 0x9C82, 0, 400, cat, ConstructHaochisPigment); // Smoky Gold
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1115468 }, 1156671, 0, 0x9C7E, 0, 400, cat, ConstructHaochisPigment); // Ghost's Grey
            Register <HaochisPigment>(new TextDefinition[] { 1071249, 1115471 }, 1156671, 0, 0x9C84, 0, 400, cat, ConstructHaochisPigment); // Ocean Blue

            Register <SmugglersEdge>(1071499, 1156664, 0, 0x9C63, 0, 400, cat);
            Register <UndertakersStaff>(1071498, 1156663, 0x13F8, 0, 0, 500, cat);
            Register <ReptalonFormTalisman>(new TextDefinition[] { 1157010, 1075202 }, 1156967, 0x2F59, 0, 0, 100, cat);
            Register <QuiverOfInfinity>(1075201, 1156971, 0x2B02, 0, 0, 100, cat);
            Register <CuSidheFormTalisman>(new TextDefinition[] { 1157010, 1031670 }, 1156970, 0x2F59, 0, 0, 100, cat);
            Register <FerretFormTalisman>(new TextDefinition[] { 1157010, 1031672 }, 1156969, 0x2F59, 0, 0, 100, cat);
            Register <LeggingsOfEmbers>(1062911, 1156956, 0x1411, 0, 0x2C, 100, cat);
            Register <ShaminoCrossbow>(1062915, 1156957, 0x26C3, 0, 0x504, 100, cat);
            Register <SamuraiHelm>(1062923, 1156959, 0x236C, 0, 0, 100, cat);
            Register <HolySword>(1062921, 1156962, 0xF61, 0, 0x482, 100, cat);
            Register <DupresShield>(1075196, 1156963, 0x2B01, 0, 0, 100, cat);
            Register <OssianGrimoire>(1078148, 1156965, 0x2253, 0, 0, 100, cat);
            Register <SquirrelFormTalisman>(new TextDefinition[] { 1157010, 1031671 }, 1156966, 0x2F59, 0, 0, 100, cat);
            Register <EarringsOfProtection>(new TextDefinition[] { 1156821, 1156822 }, 1156659, 0, 0x9C66, 0, 200, cat, ConstructEarrings); // Physcial
            Register <EarringsOfProtection>(1071092, 1156659, 0, 0x9C66, 0, 200, cat, ConstructEarrings);                                   // Fire
            Register <EarringsOfProtection>(1071093, 1156659, 0, 0x9C66, 0, 200, cat, ConstructEarrings);                                   // Cold
            Register <EarringsOfProtection>(1071094, 1156659, 0, 0x9C66, 0, 200, cat, ConstructEarrings);                                   // Poison
            Register <EarringsOfProtection>(1071095, 1156659, 0, 0x9C66, 0, 200, cat, ConstructEarrings);                                   // Energy
            Register <HoodedShroudOfShadows>(1079727, 1156643, 0x2684, 0, 0x455, 1000, cat);

            // decorations
            cat = StoreCategory.Decorations;
            Register <DecorativeDungeonSet>(1159468, 1159475, 0, 0x9D40, 0, 1200, cat);
            Register <MetalLadderDeed>(1159478, 1159479, 0xA55C, 0, 0, 400, cat);
            Register <DecorativeStableSet>(1159272, 1159278, 0, 0x9D3C, 0, 1200, cat);
            Register <DecorativeKitchenSet>(1158970, 1158971, 0, 0x9CE8, 0, 1200, cat);
            Register <SquirrelMailbox>(1158859, 1158857, 0xA207, 0, 0, 400, cat);
            Register <BarrelMailbox>(1158859, 1158857, 0xA1F7, 0, 0, 400, cat);
            Register <DecorativeBlackwidowDeed>(1157897, 1157898, 0, 0x9CD7, 0, 600, cat);
            Register <HildebrandtDragonRugDeed>(1157889, 1157890, 0, 0x9CD8, 0, 700, cat);
            Register <SmallWorldTreeRugAddonDeed>(1157206, 1157898, 0, 0x9CBA, 0, 300, cat);
            Register <LargeWorldTreeRugAddonDeed>(1157207, 1157898, 0, 0x9CBA, 0, 500, cat);
            Register <MountedPixieWhiteDeed>(new TextDefinition[] { 1074482, 1156915 }, 1156974, 0x2A79, 0, 0, 100, cat);
            Register <MountedPixieLimeDeed>(new TextDefinition[] { 1074482, 1156914 }, 1156974, 0x2A77, 0, 0, 100, cat);
            Register <MountedPixieBlueDeed>(new TextDefinition[] { 1074482, 1156913 }, 1156974, 0x2A75, 0, 0, 100, cat);
            Register <MountedPixieOrangeDeed>(new TextDefinition[] { 1074482, 1156912 }, 1156974, 0x2A73, 0, 0, 100, cat);
            Register <MountedPixieGreenDeed>(new TextDefinition[] { 1074482, 1156911 }, 1156974, 0x2A71, 0, 0, 100, cat);
            Register <UnsettlingPortraitDeed>(1074480, 1156973, 0x2A65, 0, 0, 100, cat);
            Register <CreepyPortraitDeed>(1074481, 1156972, 0x2A69, 0, 0, 100, cat);
            Register <DisturbingPortraitDeed>(1074479, 1156955, 0x2A5D, 0, 0, 100, cat);
            Register <DawnsMusicBox>(1075198, 1156968, 0x2AF9, 0, 0, 100, cat);
            Register <BedOfNailsDeed>(1074801, 1156975, 0, 0x9C8D, 0, 100, cat);
            Register <BrokenCoveredChairDeed>(1076257, 1156950, 0xC17, 0, 0, 100, cat);
            Register <BoilingCauldronDeed>(1076267, 1156949, 0, 0x9CB9, 0, 100, cat);
            Register <SuitOfGoldArmorDeed>(1076265, 1156943, 0x3DAA, 0, 0, 100, cat);
            Register <BrokenBedDeed>(1076263, 1156945, 0, 0x9C8F, 0, 100, cat);
            Register <BrokenArmoireDeed>(1076262, 1156946, 0xC12, 0, 0, 100, cat);
            Register <BrokenVanityDeed>(1076260, 1156947, 0, 0x9C90, 0, 100, cat);
            Register <BrokenBookcaseDeed>(1076258, 1156948, 0xC14, 0, 0, 100, cat);
            Register <SacrificialAltarDeed>(1074818, 1156954, 0, 0x9C8E, 0, 100, cat);
            Register <HauntedMirrorDeed>(1074800, 1156953, 0x2A7B, 0, 0, 100, cat);
            Register <BrokenChestOfDrawersDeed>(1076261, 1156951, 0xC24, 0, 0, 100, cat);
            Register <StandingBrokenChairDeed>(1076259, 1156952, 0xC1B, 0, 0, 100, cat);
            Register <FountainOfLifeDeed>(1075197, 1156964, 0x2AC0, 0, 0, 100, cat);
            Register <TapestryOfSosaria>(1062917, 1156961, 0x234E, 0, 0, 100, cat);
            Register <RoseOfTrinsic>(1062913, 1156960, 0x234D, 0, 0, 100, cat);
            Register <HearthOfHomeFireDeed>(1062919, 1156958, 0, 0x9C97, 0, 100, cat);

            Register <StoreSingingBall>(1041245, 1156907, 0, 0x9CB8, 0, 200, cat);
            Register <SecretChest>(1151583, 1156909, 0x9706, 0, 0, 500, cat);

            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1157015 }, 1156916, 0, 0x9CB5, 0, 200, cat, ConstructMiniHouseDeed); // two story wood & plaster
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011317 }, 1156916, 0x22F5, 0, 0, 200, cat, ConstructMiniHouseDeed); // small stone tower
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011307 }, 1156916, 0x22E0, 0, 0, 200, cat, ConstructMiniHouseDeed); // wood and plaster house
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011308 }, 1156916, 0x22E1, 0, 0, 200, cat, ConstructMiniHouseDeed); // thathed-roof cottage
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011312 }, 1156916, 0, 0x9CB2, 0, 200, cat, ConstructMiniHouseDeed); // Tower
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011313 }, 1156916, 0, 0x9CB1, 0, 200, cat, ConstructMiniHouseDeed); // Small stone keep
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011314 }, 1156916, 0, 0x9CB0, 0, 200, cat, ConstructMiniHouseDeed); // Castle

            Register <HangingSwordsDeed>(1076272, 1156936, 0, 0x9C96, 0, 100, cat);
            Register <UnmadeBedDeed>(1076279, 1156935, 0, 0x9C9B, 0, 100, cat);
            Register <CurtainsDeed>(1076280, 1156934, 0, 0x9C93, 0, 100, cat);
            Register <TableWithOrangeClothDeed>(new TextDefinition[] { 1157012, 1157013 }, 1156933, 0x118E, 0, 0, 100, cat);

            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011320 }, 1156916, 0x22F3, 0, 0, 200, cat, ConstructMiniHouseDeed); // sanstone house with patio
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011316 }, 1156916, 0, 0x9CB3, 0, 200, cat, ConstructMiniHouseDeed); // marble house with patio
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011319 }, 1156916, 0x2300, 0, 0, 200, cat, ConstructMiniHouseDeed); // two story villa
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1157014 }, 1156916, 0, 0x9CB6, 0, 200, cat, ConstructMiniHouseDeed); // two story stone & plaster
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011315 }, 1156916, 0, 0x9CB4, 0, 200, cat, ConstructMiniHouseDeed); // Large house with patio
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011309 }, 1156916, 0, 0x9CB7, 0, 200, cat, ConstructMiniHouseDeed); // brick house
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011304 }, 1156916, 0x22C9, 0, 0, 200, cat, ConstructMiniHouseDeed); // field stone house
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011306 }, 1156916, 0x22DF, 0, 0, 200, cat, ConstructMiniHouseDeed); // wooden house
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011305 }, 1156916, 0x22DE, 0, 0, 200, cat, ConstructMiniHouseDeed); // small brick house
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011303 }, 1156916, 0x22E1, 0, 0, 200, cat, ConstructMiniHouseDeed); // stone and plaster house
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011318 }, 1156916, 0x22FB, 0, 0, 200, cat, ConstructMiniHouseDeed); // two-story log cabin
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011321 }, 1156916, 0x22F6, 0, 0, 200, cat, ConstructMiniHouseDeed); // small stone workshop
            Register <MiniHouseDeed>(new TextDefinition[] { 1062096, 1011322 }, 1156916, 0x22F4, 0, 0, 200, cat, ConstructMiniHouseDeed); // small marble workshop

            Register <TableWithBlueClothDeed>(1076276, 1156932, 0x118C, 0, 0, 100, cat);
            Register <CherryBlossomTreeDeed>(1076268, 1156940, 0, 0x9C91, 0, 100, cat);
            Register <IronMaidenDeed>(1076288, 1156924, 0x1249, 0, 0, 100, cat);
            Register <SmallFishingNetDeed>(1076286, 1156923, 0x1EA3, 0, 0, 100, cat);
            Register <StoneStatueDeed>(1076284, 1156922, 0, 0x9C9A, 0, 100, cat);
            Register <WallTorchDeed>(1076282, 1156921, 0x3D98, 0, 0, 100, cat);
            Register <HouseLadderDeed>(1076287, 1156920, 0x2FDE, 0, 0, 100, cat);
            Register <LargeFishingNetDeed>(1076285, 1156919, 0x3D8E, 0, 0, 100, cat);
            Register <FountainDeed>(1076283, 1156918, 0, 0x9C94, 0, 100, cat);
            Register <ScarecrowDeed>(1076608, 1156917, 0x1E34, 0, 0, 100, cat);
            Register <HangingAxesDeed>(1076271, 1156937, 0, 0x9C95, 0, 100, cat);
            Register <AppleTreeDeed>(1076269, 1156938, 0, 0x9C8C, 0, 100, cat);
            Register <GuillotineDeed>(1024656, 1156941, 0x125E, 0, 0, 100, cat);
            Register <SuitOfSilverArmorDeed>(1076266, 1156942, 0x3D86, 0, 0, 100, cat);
            Register <PeachTreeDeed>(1076270, 1156939, 0, 0x9C98, 0, 100, cat);
            Register <CherryBlossomTrunkDeed>(1076784, 1156925, 0x26EE, 0, 0, 100, cat);
            Register <PeachTrunkDeed>(1076786, 1156926, 0xD9C, 0, 0, 100, cat);
            Register <BrokenFallenChairDeed>(1076264, 1156944, 0xC19, 0, 0, 100, cat);
            Register <TableWithRedClothDeed>(1076277, 1156930, 0x118E, 0, 0, 100, cat);
            Register <VanityDeed>(1074027, 1156931, 0, 0x9C9C, 0, 100, cat);
            Register <AppleTrunkDeed>(1076785, 1156927, 0xD98, 0, 0, 100, cat);
            Register <TableWithPurpleClothDeed>(new TextDefinition[] { 1157011, 1157013 }, 1156929, 0x118B, 0, 0, 100, cat);
            Register <WoodenCoffinDeed>(1076274, 1156928, 0, 0x9C92, 0, 100, cat);
            Register <RaisedGardenDeed>(new TextDefinition[] { 1150359, 1156688 }, 1156680, 0, 0x9C8B, 0, 2000, cat, ConstructRaisedGarden);
            Register <HouseTeleporterTileBag>(new TextDefinition[] { 1156683, 1156826 }, 1156668, 0x40B9, 0, 1201, 1000, cat);
            Register <WoodworkersBenchDeed>(1026641, 1156670, 0x14F0, 0, 0, 600, cat);
            Register <LargeGlowingLadyBug>(1071400, 1156660, 0x2CFD, 0, 0, 200, cat);
            Register <FreshGreenLadyBug>(1071401, 1156661, 0x2D01, 0, 0, 200, cat);
            Register <WillowTreeDeed>(1071105, 1156658, 0x224A, 0, 0, 200, cat);

            Register <FallenLogDeed>(1071088, 1156649, 0, 0x9C88, 0, 200, cat);
            Register <LampPost2>(1071089, 1156650, 0xB22, 0, 0, 200, cat, ConstructLampPost);
            Register <HitchingPost>(1071090, 1156651, 0x14E7, 0, 0, 200, cat, ConstructHitchingPost);
            Register <AncestralGravestone>(1071096, 1156653, 0x1174, 0, 0, 200, cat);
            Register <WoodenBookcase>(1071102, 1156655, 0x0A9D, 0, 0, 200, cat);
            Register <SnowTreeDeed>(1071103, 1156656, 0, 0x9C8A, 0, 200, cat);
            Register <MapleTreeDeed>(1071104, 1156657, 0, 0x9C87, 0, 200, cat);

            // mounts
            cat = StoreCategory.Mounts;
            Register <CoconutCrabStatue>(1159165, 1159166, 0xA335, 0, 0, 1000, cat);
            Register <SkeletalCatStatue>(1158462, 1158738, 0xA138, 0, 0, 1000, cat);
            Register <EowmuStatue>(1158082, 1158433, 0xA0C0, 0, 0, 1000, cat);
            Register <WindrunnerStatue>(1124685, 1157373, 0x9ED5, 0, 0, 1000, cat);
            Register <LasherStatue>(1157214, 1157305, 0x9E35, 0, 0, 1000, cat);
            Register <ChargerOfTheFallen>(1075187, 1156646, 0x2D9C, 0, 0, 1000, cat);

            // misc
            cat = StoreCategory.Misc;
            Register <SoulstoneToken>(1158404, 1158405, 0x2A93, 0, 2598, 1000, cat, ConstructSoulstone);
            Register <BagOfBulkOrderCovers>(1071116, 1157603, 0, 0x9CC6, 0, 200, cat, ConstructBOBCoverOne);

            //TODO: UndeadWeddingBundle, TotemOfChromaticFortune,

            Register <PetBrandingIron>(1157314, 1157372, 0, 0x9CC3, 0, 600, cat);
            Register <ImprovedRockHammer>(1157177, 1157306, 0, 0x9CBB, 0, 1000, cat);
            Register <PetBondingPotion>(1152921, 1156678, 0, 0x9CBC, 0, 500, cat);

            Register <ForgedMetalOfArtifacts>(new TextDefinition[] { 1149868, 1156686 }, 1156674, 0, 0x9C65, 0, 1000, cat, ConstructForgedMetal);
            Register <ForgedMetalOfArtifacts>(new TextDefinition[] { 1149868, 1156687 }, 1156675, 0, 0x9C65, 0, 600, cat, ConstructForgedMetal);
            Register <PenOfWisdom>(1115358, 1156669, 0, 0x9C62, 0, 600, cat);

            Register <BritannianShipDeed>(1150100, 1156673, 0, 0x9C6A, 0, 1200, cat);

            Register <SoulstoneToken>(1078835, 1158405, 0x2ADC, 0, 0, 1000, cat, ConstructSoulstone);
            Register <SoulstoneToken>(1078834, 1158405, 0x2A93, 0, 0, 1000, cat, ConstructSoulstone);

            Register <MerchantsTrinket>(new TextDefinition[] { 1156827, 1156681 }, 1156666, 0, 0x9C67, 0, 300, cat, ConstructMerchantsTrinket);
            Register <MerchantsTrinket>(new TextDefinition[] { 1156828, 1156682 }, 1156667, 0, 0x9C67, 0, 500, cat, ConstructMerchantsTrinket);

            Register <ArmorEngravingToolToken>(1080547, 1156652, 0, 0x9C65, 0, 200, cat);
            Register <BagOfBulkOrderCovers>(1071116, 1156654, 0, 0x9CC6, 0, 200, cat, ConstructBOBCoverTwo);
        }
        public override void OnResponse(RelayInfo info)
        {
            int id = info.ButtonID;

            if (id == 0)
            {
                ReleaseHidden(User);
                return;
            }

            PlayerProfile profile = UltimaStore.GetProfile(User);

            switch (id)
            {
            // Change Category
            case 100:
            case 101:
            case 102:
            case 103:
            case 104:
            case 105:
            {
                Search = false;

                StoreCategory oldCat = profile.Category;

                profile.Category = (StoreCategory)id - 99;

                if (oldCat != profile.Category)
                {
                    StoreList = UltimaStore.GetList(Category);
                    Page      = 0;
                }

                Refresh();
                return;
            }

            // Promo Code
            case 106:
            {
                Refresh();
                SendGump(new PromoCodeGump(User, this));
                return;
            }

            // FAQ
            case 107:
            {
                if (!string.IsNullOrWhiteSpace(Configuration.Website))
                {
                    User.LaunchBrowser(Configuration.Website);
                }
                else
                {
                    User.LaunchBrowser("https://uo.com/ultima-store/");
                }

                Refresh();
                return;
            }

            // Change Sort Method
            case 108:
            case 109:
            case 110:
            case 111:
            case 112:
            {
                SortBy oldSort = profile.SortBy;

                profile.SortBy = (SortBy)id - 108;

                if (oldSort != profile.SortBy)
                {
                    // re-orders the list
                    if (oldSort == SortBy.Newest || oldSort == SortBy.Oldest)
                    {
                        ColUtility.Free(StoreList);

                        StoreList = UltimaStore.GetList(Category);
                    }

                    UltimaStore.SortList(StoreList, profile.SortBy);

                    Page = 0;
                }

                Refresh();
                return;
            }

            // Cart View
            case 113:
            {
                if (profile != null)
                {
                    profile.Category = StoreCategory.Cart;
                }

                Refresh();
                return;
            }

            // Search
            case 114:
            {
                TextRelay searchTxt = info.GetTextEntry(0);

                if (searchTxt != null && !string.IsNullOrEmpty(searchTxt.Text))
                {
                    Search     = true;
                    SearchText = searchTxt.Text;
                }
                else
                {
                    User.SendLocalizedMessage(1150315);         // That text is unacceptable.
                }

                Refresh();
                return;
            }

            // Buy
            case 115:
            {
                if (UltimaStore.CartCount(User) == 0)
                {
                    if (profile != null)
                    {
                        profile.Category = StoreCategory.Cart;
                    }

                    Refresh();
                    return;
                }

                int total = UltimaStore.GetSubTotal(Cart);

                if (total <= UltimaStore.GetCurrency(User, true))
                {
                    SendGump(new ConfirmPurchaseGump(User));
                }
                else
                {
                    SendGump(new NoFundsGump(User));
                }

                return;
            }

            // Next Page
            case 116:
            {
                ++Page;

                Refresh();
                return;
            }

            // Previous Page
            case 117:
            {
                --Page;

                Refresh();
                return;
            }
            }

            if (id < 2000) // Add To Cart
            {
                Refresh();

                StoreEntry entry = StoreList[id - 1000];

                if (Cart == null || Cart.Count < 10)
                {
                    SendGump(new ConfirmCartGump(User, this, entry));
                    return;
                }

                User.SendLocalizedMessage(1156745); // Your store cart is currently full.
            }
            else if (id < 3000)                     // Change Amount In Cart
            {
                Refresh();

                StoreEntry entry = UltimaStore.Entries[id - 2000];

                SendGump(new ConfirmCartGump(User, this, entry, Cart != null && Cart.ContainsKey(entry) ? Cart[entry] : 0));
                return;
            }
            else if (id < 4000) // Remove From Cart
            {
                StoreEntry entry = UltimaStore.Entries[id - 3000];

                if (profile != null)
                {
                    profile.RemoveFromCart(entry);
                }

                Refresh();
                return;
            }

            ReleaseHidden(User);
        }
        public IActionResult DetailsStoreCategory(int id)
        {
            StoreCategory storeCategory = _store.GetStoreCategory(id);

            return(View(storeCategory));
        }
Exemple #4
0
 public static List <StoreEntry> GetList(StoreCategory cat)
 {
     return(Entries.Where(e => e.Category == cat).ToList());
 }
Exemple #5
0
 public static StoreCategory ToEntity(this StoreCategoryModel model, StoreCategory destination)
 {
     return(model.MapTo(destination));
 }
        public IActionResult CreateStoreCategory(StoreCatgoryViewModel viewModel)
        {
            if (ModelState.IsValid)
            {
                Store store = _store.GetStore(_user.GetUserStore(User.Identity.Name).UserId);

                if (viewModel.Img != null)
                {
                    if (Path.GetExtension(viewModel.Img.FileName) != ".jpg")
                    {
                        ModelState.AddModelError("Img", "فایل با پسوند jpg بارگزاری شود");
                    }
                    else
                    {
                        string filePath = "";
                        viewModel.ImgName = CodeGenerators.FileCode() + Path.GetExtension(viewModel.Img.FileName);
                        filePath          = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/images/users/stores/", viewModel.ImgName);

                        using (var stream = new FileStream(filePath, FileMode.Create))
                        {
                            viewModel.Img.CopyTo(stream);
                        }

                        StoreCategory storeCategory = new StoreCategory()
                        {
                            CategoryId = viewModel.CategoryId,
                            Date       = pc.GetYear(DateTime.Now).ToString("0000") + "/" + pc.GetMonth(DateTime.Now).ToString("00") +
                                         "/" + pc.GetDayOfMonth(DateTime.Now).ToString("00"),
                            Des      = null,
                            Img      = viewModel.ImgName,
                            IsActive = false,
                            UserId   = store.UserId,
                            Time     = pc.GetHour(DateTime.Now).ToString("00") + ":" + pc.GetMinute(DateTime.Now).ToString("00")
                        };

                        _store.AddStoreCategory(storeCategory);

                        return(RedirectToAction(nameof(ShowStoreCategory)));
                    }
                }
                else
                {
                    StoreCategory storeCategory = new StoreCategory()
                    {
                        CategoryId = viewModel.CategoryId,
                        Date       = pc.GetYear(DateTime.Now).ToString("0000") + "/" + pc.GetMonth(DateTime.Now).ToString("00") +
                                     "/" + pc.GetDayOfMonth(DateTime.Now).ToString("00"),
                        Des      = null,
                        Img      = null,
                        IsActive = false,
                        UserId   = store.UserId,
                        Time     = pc.GetHour(DateTime.Now).ToString("00") + ":" + pc.GetMinute(DateTime.Now).ToString("00")
                    };

                    _store.AddStoreCategory(storeCategory);

                    return(RedirectToAction(nameof(ShowStoreCategory)));
                }
            }

            return(View(viewModel));
        }
Exemple #7
0
 public StoreEntry(Type itemType, TextDefinition name, int tooltip, int itemID, int gumpID, int hue, int cost, StoreCategory cat, Func <Mobile, StoreEntry, Item> constructor = null)
     : this(itemType, new[] { name }, tooltip, itemID, gumpID, hue, cost, cat, constructor)
 {
 }
Exemple #8
0
 public static void Register(Type itemType, TextDefinition name, int tooltip, int itemID, int gumpID, int hue, int cost, StoreCategory cat, Func <Mobile, StoreEntry, Item> constructor = null)
 {
     Register(new StoreEntry(itemType, name, tooltip, itemID, gumpID, hue, cost, cat, constructor));
 }
Exemple #9
0
        public static void Initialize(GroceryContext context)
        {
            try
            {
                context.Database.EnsureCreated();

                // Look for any students.
                if (context.User.Any())
                {
                    return;   // DB has been seeded
                }

                //User
                var users = new User[]
                {
                    new User {
                        UserName = "******", Email = "*****@*****.**", Password = "******", Latitude = "41234214", Longitude = "3412341324", Phone = "4234112", UserType = "Seller"
                    },
                    new User {
                        UserName = "******", Email = "*****@*****.**", Password = "******", Latitude = "41234214", Longitude = "3412341324", Phone = "4234112", UserType = "Customer"
                    },
                    new User {
                        UserName = "******", Email = "*****@*****.**", Password = "******", Latitude = "41234214", Longitude = "3412341324", Phone = "4234112", UserType = "Seller"
                    },
                };
                foreach (User s in users)
                {
                    context.User.Add(s);
                }
                context.SaveChanges();

                //Product
                var products = new Product[]
                {
                    new Product {
                        ProductId = 2, Catagory = "Sanitary", Price = 123, Stock = 123, StoreId = 1, UserId = 1, Discount = "20", Link = "https://www.daraz.pk/products/samsung-s10-lite-8gb-ram-128gb-rom-4500-mah-battery-prism-white-i136130385-s1296426893.html?spm=a2a0e.searchlist.list.1.50bb5130LSO5Iz&search=1"
                    },
                    new Product {
                        ProductId = 3, Catagory = "Shampoo", Price = 123, Stock = 13, StoreId = 1, UserId = 1, Discount = "10", Link = "https://www.amazon.com/Samsung-Galaxy-S9-Display-Resistance/dp/B07WVRJQ7V/ref=sr_1_2?crid=2BXW75J7J6OU&dchild=1&keywords=samsung+s9&qid=1622466509&sprefix=samsung+s9%2Caps%2C445&sr=8-2"
                    },
                    new Product {
                        ProductId = 5, Catagory = "Toothbrush", Price = 123, Stock = 35, StoreId = 2, UserId = 2, Discount = "15", Link = "https://www.amazon.com/Asus-Phoenix-PH-GTX1060-3G-GeForce-Graphic/dp/B07VVMGP4G/ref=sr_1_10?dchild=1&keywords=gtx+1060&qid=1622466554&sr=8-10"
                    },
                    new Product {
                        ProductId = 6, Catagory = "Laptop", Price = 123, Stock = 35, StoreId = 2, UserId = 2, Discount = "5", Link = "https://www.amazon.com/ASUS-Geforce-Phoenix-Graphics-PH-GTX1050TI-4G/dp/B01M360WG6/ref=sr_1_1?dchild=1&keywords=gtx+1050ti&qid=1622530878&sr=8-1"
                    },
                    new Product {
                        ProductId = 4, Catagory = "Shampoo", Price = 123, Stock = 35, StoreId = 3, UserId = 3, Discount = "7", Link = "https://www.amazon.com/PlayStation-Console-Light-System-Greatest-4/dp/B077QT6K94/ref=sr_1_2?dchild=1&keywords=ps4&qid=1622530950&sr=8-2"
                    }
                };
                foreach (Product p in products)
                {
                    context.Product.Add(p);
                }
                context.SaveChanges();

                //Store
                var stores = new Store[]
                {
                    new Store {
                        StoreName = "ExcelMart", StoreCategoryId = 1, UserId = 1, Region = 1
                    },
                    new Store {
                        StoreName = "DMart", StoreCategoryId = 1, UserId = 2, Region = 2
                    },
                    new Store {
                        StoreName = "NewMart", StoreCategoryId = 1, UserId = 3, Region = 3
                    },
                };
                foreach (Store e in stores)
                {
                    context.Store.Add(e);
                }
                context.SaveChanges();

                //StoreCategory
                var StoreCategory = new StoreCategory[]
                {
                    new StoreCategory {
                        Category = "Electronics"
                    },
                    new StoreCategory {
                        Category = "Sanitory"
                    },
                };
                foreach (StoreCategory e in StoreCategory)
                {
                    context.StoreCategory.Add(e);
                }
                context.SaveChanges();


                //Products
                var productModels = new productModel[]
                {
                    new productModel {
                        ProductName = "PowerSupply"
                    },
                    new productModel {
                        ProductName = "SanitaryPipe"
                    },
                    new productModel {
                        ProductName = "BlackSunsilk"
                    },
                    new productModel {
                        ProductName = "Lifebuoy"
                    },
                    new productModel {
                        ProductName = "OralB"
                    },
                    new productModel {
                        ProductName = "DellLaptop"
                    },
                    new productModel {
                        ProductName = "SamusungUHD"
                    },
                    new productModel {
                        ProductName = "PlayStation"
                    },
                    new productModel {
                        ProductName = "Xbox"
                    }
                };
                foreach (productModel e in productModels)
                {
                    context.productModel.Add(e);
                }
                context.SaveChanges();
            }

            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        public ActionResult getCategories()
        {
            StoreCategory c = new StoreCategory();

            return(Json(c.getCategories(), JsonRequestBehavior.AllowGet));
        }
Exemple #11
0
        protected override void Seed(ApplicationDbContext context)
        {
            List <Currency> currencyList = new List <Currency>()
            {
                new Currency()
                {
                    Name = "USD"
                },
                new Currency()
                {
                    Name = "EUR"
                }
            };

            foreach (var item in currencyList)
            {
                context.Currencies
                .AddOrUpdate(c => new { c.Name }, item);
            }

            List <Shop> shopList = new List <Shop>()
            {
                new Shop()
                {
                    Name = "AMAZON"
                },
                new Shop()
                {
                    Name = "EBAY"
                }
            };

            foreach (var item in shopList)
            {
                context.Shops
                .AddOrUpdate(s => new { s.Name }, item);
            }

            List <Category> categories = new List <Category>()
            {
                new Category()
                {
                    Name     = "Electronics",
                    ParentId = "0"
                },
                new Category()
                {
                    Name     = "Accessories and Supplies",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Camera and Photo",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Car and Vehicle Electronics",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Cell Phones and Accessories",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Computers and Accessories",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Electronics Warranties",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "GPS and Navigation",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Headphones",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Home Audio",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Office Electronics",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Portable Audio and Video",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Security and Surveillance",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Service Plans",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Television and Video",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Video Game Consoles and Accessories",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Video Projectors",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "Wearable Technology",
                    ParentId = "1"
                },
                new Category()
                {
                    Name     = "eBook Readers and Accessories",
                    ParentId = "1"
                },
            };

            foreach (var item in categories)
            {
                context.Categories
                .AddOrUpdate(c => new { c.Name, c.ParentId }, item);
            }

            context.SaveChanges();

            var rootCategory = new StoreCategory()
            {
                IdAtStore       = "172282",
                Name            = "Electronics",
                ParentIdAtStore = null,
                ShopId          = 1,
            };

            context.StoreCategories
            .AddOrUpdate(s => new { s.IdAtStore, s.Name, s.ParentIdAtStore, s.ShopId }, rootCategory);

            context.SaveChanges();

            var rootCategory2 = new StoreCategory()
            {
                IdAtStore       = "493964",
                Name            = "Categories",
                ParentIdAtStore = "172282",
                ShopId          = 1,
            };

            context.StoreCategories
            .AddOrUpdate(s => new { s.IdAtStore, s.Name, s.ParentIdAtStore, s.ShopId }, rootCategory2);

            context.SaveChanges();

            List <StoreCategory> storeCategories = new List <StoreCategory>()
            {
                new StoreCategory()
                {
                    IdAtStore       = "281407",
                    Name            = "Accessories & Supplies",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "502394",
                    Name            = "Camera & Photo",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "3248684011",
                    Name            = "Car & Vehicle Electronics",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "2811119011",
                    Name            = "Cell Phones & Accessories",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "541966",
                    Name            = "Computers & Accessories",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "2242348011",
                    Name            = "Electronics Warranties",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "172526",
                    Name            = "GPS & Navigation",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "172541",
                    Name            = "Headphones",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "667846011",
                    Name            = "Home Audio",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "172574",
                    Name            = "Office Electronics",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "172623",
                    Name            = "Portable Audio & Video",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "524136",
                    Name            = "Security & Surveillance",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "16285901",
                    Name            = "Service Plans",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "1266092011",
                    Name            = "Television & Video",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "7926841011",
                    Name            = "Video Game Consoles & Accessories",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "300334",
                    Name            = "Video Projectors",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "10048700011",
                    Name            = "Wearable Technology",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
                new StoreCategory()
                {
                    IdAtStore       = "2642125011",
                    Name            = "eBook Readers & Accessories",
                    ShopId          = 1,
                    ParentIdAtStore = "493964",
                },
            };

            foreach (var item in storeCategories)
            {
                context.StoreCategories
                .AddOrUpdate(s => new { s.IdAtStore, s.Name, s.ParentIdAtStore, s.ShopId }, item);
            }

            context.SaveChanges();
        }
Exemple #12
0
 public async Task DeleteAsync(StoreCategory category)
 {
     _repository.Delete(category);
     await _repository.SaveChangesAsync();
 }
Exemple #13
0
        public static StoreCategory GetFavoriteCategory()
        {
            var db   = new DB();
            var item =
                db.StoreProductFavorites.Where(x => x.UserID == HttpContext.Current.GetCurrentUserUID())
                .Select(x => x.StoreProduct)
                .Where(x => x.IsActive);

            var category = new StoreCategory()
            {
                LastMod = DateTime.Now, ShowBigIcons = false
            };

            switch (category.CatalogFilter.ProductOrder)
            {
            default:
                if (category.CatalogFilter.ProductOrder.StartsWith("Char_"))
                {
                    int cid = category.CatalogFilter.ProductOrder.Replace("Char_", "").ToInt();
                    item =
                        item.OrderBy(
                            x =>
                            (x.StoreCharacterToProducts.FirstOrDefault(
                                 z => z.StoreCharacterValue.CharacterID == cid) ??
                             new StoreCharacterToProduct()
                    {
                        StoreCharacterValue = new StoreCharacterValue()
                        {
                            Value = "ZZZZZZZZZZ"
                        }
                    })
                            .StoreCharacterValue.Value.Length).ThenBy(
                            x =>
                            (x.StoreCharacterToProducts.FirstOrDefault(
                                 z => z.StoreCharacterValue.CharacterID == cid) ??
                             new StoreCharacterToProduct()
                    {
                        StoreCharacterValue =
                            new StoreCharacterValue()
                        {
                            Value = "ZZZZZZZZZZ"
                        }
                    })
                            .StoreCharacterValue.Value);
                }
                else
                {
                    item = item.OrderBy(x => x.StoreProductsToCategories.Any() ? x.StoreProductsToCategories.First().OrderNum : 100000);
                }
                break;

            case "OrderNum":
                item = item.OrderBy(x => x.StoreProductsToCategories.Any() ? x.StoreProductsToCategories.First().OrderNum : 100000);
                break;

            case "AlphaBet":
                item = item.OrderByDescending(x => x.ViewCount).ThenBy(x => x.Name);
                break;

            case "AlphaBetDesc":
                item = item.OrderBy(x => x.ViewCount).ThenByDescending(x => x.Name);
                break;

            case "Cheap":
                item = item.OrderBy(x => x.SitePrice);
                break;

            case "CheapDesc":
                item = item.OrderByDescending(x => x.SitePrice);
                break;

            case "Expensive":
                item =
                    item.OrderByDescending(x => x.Price);
                break;

            case "AddDate":
                item =
                    item.OrderByDescending(x => x.AddDate);
                break;

            case "VoteOverage":
                item =
                    item.OrderByDescending(x => x.VoteOverage);
                break;
            }


            var rd = new RouteValueDictionary();

            category.ProductList = new PagedData <StoreProduct>(item, CatalogBrowser.PageNumber, category.CatalogFilter.ProductCount, rd);

            return(category);
        }
        public ActionResult Index(string word, int?section, int?page)
        {
            var rd = new RouteValueDictionary();

            rd.Add("word", word ?? "");
            rd.Add("section", section ?? 0);
            var category = new StoreCategory()
            {
                LastMod = DateTime.Now, ShowBigIcons = false
            };
            var searcher = new Searcher(word ?? "", section ?? 0);



            var item = searcher.FullTextSearchQuery;

            switch (category.CatalogFilter.ProductOrder)
            {
            default:
                if (category.CatalogFilter.ProductOrder.StartsWith("Char_"))
                {
                    int cid = category.CatalogFilter.ProductOrder.Replace("Char_", "").ToInt();
                    item =
                        item.OrderBy(
                            x =>
                            (x.StoreCharacterToProducts.FirstOrDefault(
                                 z => z.StoreCharacterValue.CharacterID == cid) ??
                             new StoreCharacterToProduct()
                    {
                        StoreCharacterValue = new StoreCharacterValue()
                        {
                            Value = "ZZZZZZZZZZ"
                        }
                    })
                            .StoreCharacterValue.Value.Length).ThenBy(
                            x =>
                            (x.StoreCharacterToProducts.FirstOrDefault(
                                 z => z.StoreCharacterValue.CharacterID == cid) ??
                             new StoreCharacterToProduct()
                    {
                        StoreCharacterValue =
                            new StoreCharacterValue()
                        {
                            Value = "ZZZZZZZZZZ"
                        }
                    })
                            .StoreCharacterValue.Value);
                }
                break;

            case "OrderNum":
                item = item.OrderBy(x => x.StoreProductsToCategories.Any() ? x.StoreProductsToCategories.First().OrderNum : 100000);
                break;

            case "AlphaBet":
                item = item.OrderByDescending(x => x.ViewCount).ThenBy(x => x.Name);
                break;

            case "AlphaBetDesc":
                item = item.OrderBy(x => x.ViewCount).ThenByDescending(x => x.Name);
                break;

            case "Cheap":
                item = item.OrderBy(x => x.SitePrice);
                break;

            case "CheapDesc":
                item = item.OrderByDescending(x => x.SitePrice);
                break;

            case "Expensive":
                item =
                    item.OrderByDescending(x => x.Price);
                break;

            case "AddDate":
                item =
                    item.OrderByDescending(x => x.AddDate);
                break;

            case "VoteOverage":
                item =
                    item.OrderByDescending(x => x.VoteOverage);
                break;
            }

            if ((word ?? "").Length <= 2)
            {
                item = new List <StoreProduct>().AsQueryable();
            }


            var paged = new PagedData <StoreProduct>(item,
                                                     CatalogBrowser.PageNumber,
                                                     category.CatalogFilter.ProductCount, rd);

            category.ProductList = paged;
            return
                (PartialView(category));
        }
Exemple #15
0
 public StoreEntry(Type itemType, TextDefinition[] name, int tooltip, int itemID, int gumpID, int hue, int cost, StoreCategory cat, Func <Mobile, StoreEntry, Item> constructor = null)
 {
     ItemType    = itemType;
     Name        = name;
     Tooltip     = tooltip;
     ItemID      = itemID;
     GumpID      = gumpID;
     Hue         = hue;
     Price       = cost;
     Category    = cat;
     Constructor = constructor;
 }
 public void AddStoreCategory(StoreCategory storeCategory)
 {
     _context.StoreCategories.Add(storeCategory);
     _context.SaveChanges();
 }
 private void BindStoreCategoryNotLinkedList()
 {
     GridViewResult.DataSource = StoreCategory.GetStoreCategoryNotLinkedListByEmployeeIdStoreId(this.employeeId, this.storeId);
     GridViewResult.DataBind();
 }
Exemple #18
0
 public static void Register <T>(TextDefinition[] name, int tooltip, int itemID, int gumpID, int hue, int cost, StoreCategory cat, Func <Mobile, StoreEntry, Item> constructor = null) where T : Item
 {
     Register(typeof(T), name, tooltip, itemID, gumpID, hue, cost, cat, constructor);
 }
Exemple #19
0
 public static StoreCategoryModel ToModel(this StoreCategory entity)
 {
     return(entity.MapTo <StoreCategory, StoreCategoryModel>());
 }