Commit 24d62791 authored by chechunchi's avatar chechunchi

fix small

parent 7d31ef65
Pipeline #22481 passed with stages
in 14 minutes and 15 seconds
......@@ -104,7 +104,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break;
}
case "hint": {
onMsgHint(msg.hint);
await onMsgHint(msg.hint);
break;
}
......
......@@ -7,10 +7,10 @@ import {
import MsgHint = ygopro.StocGameMessage.MsgHint;
export default (hint: MsgHint) => {
export default async (hint: MsgHint) => {
switch (hint.hint_type) {
case MsgHint.HintType.HINT_EVENT: {
fetchEsHintMeta({ originMsg: hint.hint_data });
await fetchEsHintMeta({ originMsg: hint.hint_data });
break;
}
case MsgHint.HintType.HINT_MESSAGE: {
......@@ -18,7 +18,7 @@ export default (hint: MsgHint) => {
break;
}
case MsgHint.HintType.HINT_SELECTMSG: {
fetchSelectHintMeta({
await fetchSelectHintMeta({
selectHintData: hint.hint_data,
esHint: "",
});
......
......@@ -63,7 +63,7 @@ export default async (selectChain: MsgSelectChain) => {
case 2: // 处理多张
case 3: {
// 处理强制发动的卡
fetchSelectHintMeta({
await fetchSelectHintMeta({
selectHintData: 203,
});
const { selecteds, mustSelects, selectables } = await fetchCheckCardMeta(
......
......@@ -72,8 +72,8 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
const [submitable, setSubmitable] = useState(false);
const hint = useSnapshot(matStore.hint);
const preHintMsg = hint?.esHint || "";
const selectHintMsg = hint?.esSelectHint || "请选择卡片";
const preHintMsg = hint.esHint || "";
const selectHintMsg = hint.esSelectHint || "请选择卡片";
const minMaxText = min === max ? min : `${min}-${max}`;
......
......@@ -6,20 +6,9 @@ import classnames from "classnames";
import React, { type CSSProperties, useEffect, useState } from "react";
import { proxy, useSnapshot } from "valtio";
import {
fetchStrings,
getCardStr,
sendSelectIdleCmdResponse,
ygopro,
} from "@/api";
import { getCardStr, sendSelectIdleCmdResponse, ygopro } from "@/api";
import { eventbus, Task } from "@/infra";
import {
cardStore,
CardType,
Interactivity,
InteractType,
matStore,
} from "@/stores";
import { cardStore, CardType, Interactivity, InteractType } from "@/stores";
import { showCardModal as displayCardModal } from "@/ui/Duel/Message/CardModal";
import { YgoCard } from "@/ui/Shared";
......@@ -297,12 +286,7 @@ const handleDropdownMenu = (cards: CardType[], isField: boolean) => {
sendSelectIdleCmdResponse(getNonEffectResponse(action, card));
} else {
// 场地: 选择卡片
// 更新hint
matStore.hint = {
code: 0,
esSelectHint: fetchStrings("!system", 509),
};
// TODO: hint
const option = await displaySimpleSelectCardsModal({
selectables: cards.map((card) => ({
meta: card.meta,
......@@ -335,11 +319,7 @@ const handleDropdownMenu = (cards: CardType[], isField: boolean) => {
card = cards[0];
} else {
// 场地: 选择卡片
// 更新hint
matStore.hint = {
code: 0,
esSelectHint: fetchStrings("!system", 566),
};
// TODO: hint
const option = await displaySimpleSelectCardsModal({
selectables: cards
// 过滤掉不能发效果的卡
......
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