Commit 12904264 authored by Chunchi Che's avatar Chunchi Che

fix error

parent 7fea9cf7
Pipeline #20653 failed with stages
in 8 minutes and 50 seconds
......@@ -17,9 +17,17 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
#[wasm_bindgen]
pub struct MsgUpdateHp {
pub player: Option<u8>,
pub type_: Option<u8>,
pub value: Option<i32>,
}
#[repr(u8)]
enum ActionType {
_Unknown = 0,
Damage = 1,
_Recover = 2,
}
#[wasm_bindgen]
pub fn ocgDamageAdapter(data: js_sys::Uint8Array) -> MsgUpdateHp {
let data = data.to_vec();
......@@ -29,6 +37,7 @@ pub fn ocgDamageAdapter(data: js_sys::Uint8Array) -> MsgUpdateHp {
MsgUpdateHp {
player: Some(player),
type_: Some(ActionType::Damage as u8),
value,
}
}
......@@ -16,6 +16,12 @@ export const store = configureStore({
mora: moraReducer,
duel: duelReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: {
ignoredActions: ["duel/updateHp"],
},
}),
});
// Ref: https://github.com/reduxjs/redux/issues/303
......
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