Commit 432e7baa authored by Chunchi Che's avatar Chunchi Che

fix some callings of playEffect, but still remain problems

parent 915262c5
Pipeline #27231 passed with stages
in 7 minutes and 37 seconds
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { AudioActionType, playEffect } from "@/infra/audio";
import { fetchEsHintMeta } from "@/stores"; import { fetchEsHintMeta } from "@/stores";
export default (_: ygopro.StocGameMessage.MsgFlipSummoned) => { export default (_: ygopro.StocGameMessage.MsgFlipSummoned) => {
playEffect(AudioActionType.SOUND_FILP);
fetchEsHintMeta({ originMsg: 1608 }); fetchEsHintMeta({ originMsg: 1608 });
}; };
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { AudioActionType, playEffect } from "@/infra/audio";
import { fetchEsHintMeta } from "@/stores"; import { fetchEsHintMeta } from "@/stores";
export default (flipSummoning: ygopro.StocGameMessage.MsgFlipSummoning) => { export default (flipSummoning: ygopro.StocGameMessage.MsgFlipSummoning) => {
playEffect(AudioActionType.SOUND_FILP);
fetchEsHintMeta({ fetchEsHintMeta({
originMsg: "「[?]」反转召唤宣言时", originMsg: "「[?]」反转召唤宣言时",
cardID: flipSummoning.code, cardID: flipSummoning.code,
......
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { AudioActionType, playEffect } from "@/infra/audio";
import { fetchEsHintMeta } from "@/stores"; import { fetchEsHintMeta } from "@/stores";
export default (_: ygopro.StocGameMessage.MsgSpSummoned) => { export default (_: ygopro.StocGameMessage.MsgSpSummoned) => {
// 这里服务器没有传特殊召唤的怪兽的ID,
// 所以如果要判断是否是衍生物召唤的话,需要从`MsgSpSummoning`中获取
// 并保存,在处理这个消息的时候再取出来进行判断。
//
// 这里暂时在所有情况下都播放`SOUND_SPECIAL_SUMMON`
playEffect(AudioActionType.SOUND_SPECIAL_SUMMON);
fetchEsHintMeta({ originMsg: 1606 }); fetchEsHintMeta({ originMsg: 1606 });
}; };
import { ygopro } from "@/api"; import { fetchCard, ygopro } from "@/api";
import { TYPE_TOKEN } from "@/common";
import { AudioActionType, playEffect } from "@/infra/audio";
import { fetchEsHintMeta } from "@/stores"; import { fetchEsHintMeta } from "@/stores";
export default (spSummoning: ygopro.StocGameMessage.MsgSpSummoning) => { export default (spSummoning: ygopro.StocGameMessage.MsgSpSummoning) => {
const card = fetchCard(spSummoning.code);
if (card.data.type && card.data.type & TYPE_TOKEN) {
playEffect(AudioActionType.SOUND_TOKEN);
} else {
playEffect(AudioActionType.SOUND_SPECIAL_SUMMON);
}
fetchEsHintMeta({ fetchEsHintMeta({
originMsg: "「[?]」特殊召唤宣言时", originMsg: "「[?]」特殊召唤宣言时",
cardID: spSummoning.code, cardID: spSummoning.code,
......
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { AudioActionType, playEffect } from "@/infra/audio";
import { fetchEsHintMeta } from "@/stores"; import { fetchEsHintMeta } from "@/stores";
export default (_: ygopro.StocGameMessage.MsgSummoned) => { export default (_: ygopro.StocGameMessage.MsgSummoned) => {
playEffect(AudioActionType.SOUND_SUMMON);
fetchEsHintMeta({ originMsg: 1604 }); fetchEsHintMeta({ originMsg: 1604 });
}; };
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