Commit 595e4e0e authored by Chunchi Che's avatar Chunchi Che

Merge branch 'optimize/auto' into 'main'

当选择区域且只有一个区域可选时,自动选取

See merge request !375
parents e141102a 49f69d67
Pipeline #27258 passed with stages
in 7 minutes and 47 seconds
import { ygopro } from "@/api";
import { sendSelectPlaceResponse, ygopro } from "@/api";
import { InteractType, placeStore } from "@/stores";
type MsgSelectPlace = ygopro.StocGameMessage.MsgSelectPlace;
......@@ -9,6 +9,17 @@ export default (selectPlace: MsgSelectPlace) => {
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) {
switch (place.zone) {
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