Commit a66f5ae6 authored by Chunchi Che's avatar Chunchi Che

update selectSum service

parent 9a9f9641
......@@ -50,7 +50,6 @@ export const setCheckCardModalV3ResponseAbleImpl: DuelReducer<boolean> = (
export const fetchCheckCardMetasV3 = createAsyncThunk(
"duel/fetchCheckCardMetaV3",
async (param: {
controler: number;
mustSelect: boolean;
options: {
code: number;
......@@ -65,7 +64,6 @@ export const fetchCheckCardMetasV3 = createAsyncThunk(
})
);
const response = {
controler: param.controler,
mustSelect: param.mustSelect,
metas,
};
......
import { ygopro } from "../../api/ocgcore/idl/ocgcore";
import {
setCheckCardModalV3AllLevel,
setCheckCardModalV3MinMax,
setCheckCardModalV3OverFlow,
} from "../../reducers/duel/mod";
import { fetchCheckCardMetasV3 } from "../../reducers/duel/modal/checkCardModalV3Slice";
import { AppDispatch } from "../../store";
import MsgSelectSum = ygopro.StocGameMessage.MsgSelectSum;
export default (selectSum: MsgSelectSum, dispatch: AppDispatch) => {
console.log(selectSum);
dispatch(setCheckCardModalV3OverFlow(selectSum.overflow != 0));
dispatch(setCheckCardModalV3AllLevel(selectSum.level_sum));
dispatch(
setCheckCardModalV3MinMax({ min: selectSum.min, max: selectSum.max })
);
dispatch(
fetchCheckCardMetasV3({
mustSelect: true,
options: selectSum.must_select_cards,
})
);
dispatch(
fetchCheckCardMetasV3({
mustSelect: false,
options: selectSum.selectable_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