@rpg-engine/long-bow 0.8.72 → 0.8.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DailyTasks/DailyTaskItem.d.ts +1 -0
- package/dist/hooks/useCharacterSkinNavigation.d.ts +7 -0
- package/dist/hooks/usePackFiltering.d.ts +7 -0
- package/dist/hooks/useQuantityControl.d.ts +10 -0
- package/dist/hooks/useStoreFiltering.d.ts +11 -0
- package/dist/long-bow.cjs.development.js +629 -272
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +631 -274
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/DailyTasks/DailyRewardsTooltip.tsx +69 -38
- package/src/components/DailyTasks/DailyTaskItem.tsx +272 -76
- package/src/components/DailyTasks/DailyTasks.tsx +230 -46
- package/src/components/DailyTasks/GlobalDailyProgress.tsx +31 -24
- package/src/components/DailyTasks/TaskProgress.tsx +31 -20
- package/src/components/Store/StoreCharacterSkinRow.tsx +63 -45
- package/src/components/Store/StoreItemRow.tsx +51 -53
- package/src/components/Store/sections/StoreItemsSection.tsx +72 -21
- package/src/components/Store/sections/StorePacksSection.tsx +5 -10
- package/src/hooks/useCharacterSkinNavigation.ts +34 -0
- package/src/hooks/usePackFiltering.ts +20 -0
- package/src/hooks/useQuantityControl.ts +41 -0
- package/src/hooks/useStoreFiltering.ts +51 -0
- package/src/mocks/dailyTasks.mocks.ts +6 -6
- package/src/stories/Features/store/Store.stories.tsx +35 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICharacterDailyTask, RewardType, TaskDifficulty, TaskStatus, TaskType } from "@rpg-engine/shared";
|
|
2
2
|
|
|
3
3
|
export const mockTasks: ICharacterDailyTask[] = [
|
|
4
4
|
{
|
|
5
|
-
key:
|
|
5
|
+
key: 'hunt-rats',
|
|
6
6
|
name: 'Kill Rats',
|
|
7
7
|
description: 'Eliminate 5 rats in the forest',
|
|
8
8
|
type: TaskType.KillMobs,
|
|
@@ -43,7 +43,7 @@ export const mockTasks: ICharacterDailyTask[] = [
|
|
|
43
43
|
tier: 0
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
key:
|
|
46
|
+
key: 'craft-cheese',
|
|
47
47
|
name: 'Gather Resources',
|
|
48
48
|
description: 'Collect 10 pieces of wood',
|
|
49
49
|
type: TaskType.CollectItems,
|
|
@@ -84,7 +84,7 @@ export const mockTasks: ICharacterDailyTask[] = [
|
|
|
84
84
|
tier: 0
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
key:
|
|
87
|
+
key: 'hunt-elora-the-queen',
|
|
88
88
|
name: 'Slay the Dragon',
|
|
89
89
|
description: 'Defeat the Queen Dragon',
|
|
90
90
|
type: TaskType.KillMobs,
|
|
@@ -125,7 +125,7 @@ export const mockTasks: ICharacterDailyTask[] = [
|
|
|
125
125
|
tier: 0
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
|
-
key:
|
|
128
|
+
key: 'explore-village',
|
|
129
129
|
name: "Village Ilya Explorer",
|
|
130
130
|
description: "Visit the key locations in the ilya village",
|
|
131
131
|
difficulty: TaskDifficulty.Regular,
|
|
@@ -167,7 +167,7 @@ export const mockTasks: ICharacterDailyTask[] = [
|
|
|
167
167
|
tier: 0
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
|
-
key:
|
|
170
|
+
key: 'craft-life-potion',
|
|
171
171
|
name: 'Craft Potions',
|
|
172
172
|
description: 'Craft 5 health potions for the local alchemist',
|
|
173
173
|
type: TaskType.CraftItems,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IItemPack,
|
|
1
|
+
import { IItemPack, IProductBlueprint, IPurchase, ItemRarities, ItemSubType, ItemType, MetadataType, PaymentCurrency, PurchaseType, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { RPGUIRoot } from '../../../components/RPGUI/RPGUIRoot';
|
|
@@ -39,7 +39,7 @@ const storeItems: IProductBlueprint[] = mockItems.map((item, index) => ({
|
|
|
39
39
|
textureAtlas: 'items',
|
|
40
40
|
textureKey: item.texturePath,
|
|
41
41
|
type: PurchaseType.Item,
|
|
42
|
-
onPurchase: async () => {},
|
|
42
|
+
onPurchase: async () => { },
|
|
43
43
|
itemType: item.type,
|
|
44
44
|
itemSubType: item.subType,
|
|
45
45
|
rarity: item.rarity,
|
|
@@ -48,6 +48,7 @@ const storeItems: IProductBlueprint[] = mockItems.map((item, index) => ({
|
|
|
48
48
|
maxStackSize: item.maxStackSize || 1,
|
|
49
49
|
isUsable: true,
|
|
50
50
|
requiredAccountType: item.rarity === 'Legendary' ? [UserAccountTypes.PremiumGold] : [],
|
|
51
|
+
|
|
51
52
|
}));
|
|
52
53
|
|
|
53
54
|
// Sample character skins
|
|
@@ -69,6 +70,28 @@ const availableCharacters = [
|
|
|
69
70
|
},
|
|
70
71
|
];
|
|
71
72
|
|
|
73
|
+
// Create character name change item
|
|
74
|
+
const characterNameChangeItem: IProductBlueprint = {
|
|
75
|
+
key: 'character-name-change',
|
|
76
|
+
name: 'Character Name Change',
|
|
77
|
+
description: 'Change your character\'s name to something new',
|
|
78
|
+
price: 9.99,
|
|
79
|
+
currency: PaymentCurrency.USD,
|
|
80
|
+
texturePath: 'items/character_customization.png',
|
|
81
|
+
textureAtlas: 'items',
|
|
82
|
+
textureKey: 'items/character_customization.png',
|
|
83
|
+
type: PurchaseType.Item,
|
|
84
|
+
onPurchase: async () => { },
|
|
85
|
+
itemType: ItemType.Other,
|
|
86
|
+
itemSubType: ItemSubType.Other,
|
|
87
|
+
rarity: ItemRarities.Common,
|
|
88
|
+
weight: 0,
|
|
89
|
+
isStackable: false,
|
|
90
|
+
maxStackSize: 1,
|
|
91
|
+
isUsable: true,
|
|
92
|
+
inputPlaceholder: 'Enter new character name',
|
|
93
|
+
};
|
|
94
|
+
|
|
72
95
|
// Create character skin items
|
|
73
96
|
const characterSkinItems: IProductBlueprint[] = [
|
|
74
97
|
{
|
|
@@ -81,7 +104,7 @@ const characterSkinItems: IProductBlueprint[] = [
|
|
|
81
104
|
textureAtlas: 'items',
|
|
82
105
|
textureKey: 'items/character_customization.png',
|
|
83
106
|
type: PurchaseType.Item,
|
|
84
|
-
onPurchase: async () => {},
|
|
107
|
+
onPurchase: async () => { },
|
|
85
108
|
itemType: ItemType.Other,
|
|
86
109
|
itemSubType: ItemSubType.Other,
|
|
87
110
|
rarity: ItemRarities.Rare,
|
|
@@ -95,6 +118,9 @@ const characterSkinItems: IProductBlueprint[] = [
|
|
|
95
118
|
atlasJSON: entitiesAtlasJSON,
|
|
96
119
|
atlasIMG: entitiesAtlasIMG,
|
|
97
120
|
},
|
|
121
|
+
store: {
|
|
122
|
+
isHighlighted: true, // Highlight the first character skin item
|
|
123
|
+
},
|
|
98
124
|
},
|
|
99
125
|
{
|
|
100
126
|
key: 'skin-premium-character-pack',
|
|
@@ -106,7 +132,7 @@ const characterSkinItems: IProductBlueprint[] = [
|
|
|
106
132
|
textureAtlas: 'items',
|
|
107
133
|
textureKey: 'items/premium_character_pack.png',
|
|
108
134
|
type: PurchaseType.Item,
|
|
109
|
-
onPurchase: async () => {},
|
|
135
|
+
onPurchase: async () => { },
|
|
110
136
|
itemType: ItemType.Other,
|
|
111
137
|
itemSubType: ItemSubType.Other,
|
|
112
138
|
rarity: ItemRarities.Epic,
|
|
@@ -127,6 +153,7 @@ const characterSkinItems: IProductBlueprint[] = [
|
|
|
127
153
|
// Create duplicated items once with unique keys
|
|
128
154
|
const duplicatedItems: IProductBlueprint[] = [
|
|
129
155
|
...storeItems,
|
|
156
|
+
characterNameChangeItem,
|
|
130
157
|
...characterSkinItems,
|
|
131
158
|
...storeItems.map((item, index) => ({
|
|
132
159
|
...item,
|
|
@@ -160,20 +187,20 @@ const mockPacks: IItemPack[] = [
|
|
|
160
187
|
image: customSkinImage,
|
|
161
188
|
},
|
|
162
189
|
|
|
163
|
-
|
|
190
|
+
{
|
|
164
191
|
key: 'ultimate-pack',
|
|
165
192
|
title: '👑 Ultimate Premium Pack',
|
|
166
193
|
description: 'The most exclusive collection of items, effects, and perks. Includes everything from previous tiers plus legendary items!',
|
|
167
194
|
priceUSD: 99.99,
|
|
168
195
|
image: customSkinImage,
|
|
169
196
|
},
|
|
170
|
-
|
|
197
|
+
{
|
|
171
198
|
key: 'gold-pack',
|
|
172
199
|
title: '🥇 Gold Premium Pack',
|
|
173
200
|
description: 'The ultimate premium experience with rare items, unique effects, and exclusive content. For true champions!',
|
|
174
201
|
priceUSD: 49.99,
|
|
175
202
|
image: customSkinImage,
|
|
176
|
-
},
|
|
203
|
+
},
|
|
177
204
|
{
|
|
178
205
|
key: 'silver-pack',
|
|
179
206
|
title: '🥈 Silver Premium Pack',
|
|
@@ -209,7 +236,7 @@ export const Default: Story = {
|
|
|
209
236
|
hidePremiumTab={true}
|
|
210
237
|
tabOrder={['items', 'packs']}
|
|
211
238
|
defaultActiveTab="items"
|
|
212
|
-
textInputItemKeys={['original-greater-life-potion-2', 'original-angelic-sword-1']}
|
|
239
|
+
textInputItemKeys={['original-greater-life-potion-2', 'original-angelic-sword-1', 'character-name-change']}
|
|
213
240
|
/>
|
|
214
241
|
),
|
|
215
242
|
};
|