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

Merge branch 'fix/announce' into 'main'

Fix/announce

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