Commit a4c32592 authored by Chunchi Che's avatar Chunchi Che

update hint service

parent ac124f5c
Pipeline #18789 passed with stages
in 4 minutes and 13 seconds
import { ygopro } from "../../api/ocgcore/idl/ocgcore"; import { ygopro } from "../../api/ocgcore/idl/ocgcore";
import { AppDispatch } from "../../store"; import { AppDispatch } from "../../store";
import { fetchHintMeta } from "../../reducers/duel/hint";
import MsgHint = ygopro.StocGameMessage.MsgHint;
export default ( export default (hint: MsgHint, dispatch: AppDispatch) => {
hint: ygopro.StocGameMessage.MsgHint, const player = hint.player;
dispatch: AppDispatch switch (hint.hint_type) {
) => { case MsgHint.HintType.HINT_EVENT:
// TODO case MsgHint.HintType.HINT_MESSAGE: {
console.log(hint); dispatch(fetchHintMeta([player, hint.hint_data]));
break;
}
default: {
console.log(`Unhandled hint type ${MsgHint.HintType[hint.hint_type]}`);
}
}
}; };
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