Commit 49f69d67 authored by Chunchi Che's avatar Chunchi Che

make selectPlace auto send

parent e141102a
Pipeline #27257 passed with stages
in 8 minutes and 19 seconds
import { ygopro } from "@/api"; import { sendSelectPlaceResponse, ygopro } from "@/api";
import { InteractType, placeStore } from "@/stores"; import { InteractType, placeStore } from "@/stores";
type MsgSelectPlace = ygopro.StocGameMessage.MsgSelectPlace; type MsgSelectPlace = ygopro.StocGameMessage.MsgSelectPlace;
...@@ -9,6 +9,17 @@ export default (selectPlace: MsgSelectPlace) => { ...@@ -9,6 +9,17 @@ export default (selectPlace: MsgSelectPlace) => {
return; return;
} }
if (selectPlace.places.length === 1) {
const place = selectPlace.places[0];
sendSelectPlaceResponse({
controller: place.controller,
zone: place.zone,
sequence: place.sequence,
});
return;
}
for (const place of selectPlace.places) { for (const place of selectPlace.places) {
switch (place.zone) { switch (place.zone) {
case ygopro.CardZone.MZONE: case ygopro.CardZone.MZONE:
......
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