Commit 468bd07b authored by chechunchi's avatar chechunchi

update interface Option

parent 892fb37f
Pipeline #21578 passed with stages
in 16 minutes and 42 seconds
......@@ -27,13 +27,13 @@ export const fetchCheckCardMeta = async (
? code
: matStore.in(location.location).of(controller)[location.sequence]
?.occupant?.id || 0;
const meta = await fetchCard(code);
const meta = await fetchCard(newID);
const effectDesc = effectDescCode
? getCardStr(meta, effectDescCode & 0xf)
: undefined;
const newOption = {
code: newID,
meta,
location: location.toObject(),
level1,
level2,
......
......@@ -3,7 +3,7 @@ type CardLocation = ReturnType<typeof ygopro.CardLocation.prototype.toObject>;
interface Option {
// card id
code: number;
meta: CardMeta;
location?: CardLocation;
// 效果
effectDesc?: string;
......
......@@ -135,10 +135,10 @@ export const SelectActionsModal = () => {
style={{ width: 120 }}
cover={
<img
alt={option.code.toString()}
alt={option.meta.id.toString()}
src={
option.code
? `${NeosConfig.cardImgUrl}/${option.code}.jpg`
option.meta.id
? `${NeosConfig.cardImgUrl}/${option.meta.id}.jpg`
: `${NeosConfig.assetsPath}/card_back.jpg`
}
style={{ width: 100 }}
......@@ -159,10 +159,10 @@ export const SelectActionsModal = () => {
style={{ width: 120 }}
cover={
<img
alt={option.code.toString()}
alt={option.meta.id.toString()}
src={
option.code
? `${NeosConfig.cardImgUrl}/${option.code}.jpg`
option.meta.id
? `${NeosConfig.cardImgUrl}/${option.meta.id}.jpg`
: `${NeosConfig.assetsPath}/card_back.jpg`
}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment