Commit 23c357fa authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/announce' into 'main'

Fix/announce

See merge request mycard/Neos!216
parents 2ca691a4 be345c45
......@@ -38,14 +38,15 @@ export default async (announce: MsgAnnounce) => {
}
case MsgAnnounce.AnnounceType.Card: {
announceModal.title = fetchStrings("!system", 564);
announceModal.options = await Promise.all(
announce.options.map(async (option) => ({
info: await fetchCard(option.code).then(
(meta) => meta.text.name ?? "[?]"
),
for (const option of announce.options) {
const meta = await fetchCard(option.code);
if (meta.text.name) {
announceModal.options.push({
info: meta.text.name,
response: option.response,
}))
);
});
}
}
announceModal.isOpen = true;
break;
......
......@@ -136,7 +136,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break;
}
case "select_option": {
onMsgSelectOption(msg.select_option);
await onMsgSelectOption(msg.select_option);
break;
}
......
......@@ -157,6 +157,7 @@ const onCardClick = (card: CardType) => {
(interactivity) => ({
desc: interactTypeToString(interactivity.interactType),
response: interactivity.response,
effectCode: interactivity.activateIndex,
})
);
messageStore.cardModal.counters = card.counters;
......
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