From 7bfe886065760d9835e374fe36a70533276974da Mon Sep 17 00:00:00 2001 From: ygodueltech <67624554+ygodueltech@users.noreply.github.com> Date: Tue, 18 May 2021 18:52:12 -0700 Subject: [PATCH 1/2] bugfix: add new path for arch linux split cjk fonts (#2346) --- gframe/game.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gframe/game.cpp b/gframe/game.cpp index f9ef77afc..8482679c7 100644 --- a/gframe/game.cpp +++ b/gframe/game.cpp @@ -77,6 +77,7 @@ bool Game::Initialize() { L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf", L"/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc", L"/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc", + L"/usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc", L"/System/Library/Fonts/SFNSTextCondensed-Bold.otf", L"/System/Library/Fonts/SFNS.ttf", L"./fonts/numFont.ttf", @@ -99,6 +100,7 @@ bool Game::Initialize() { L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf", L"/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc", L"/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", + L"/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", L"/System/Library/Fonts/PingFang.ttc", L"./fonts/textFont.ttf", L"./fonts/textFont.ttc", From 2c1f3de1314908cd00570642d0ab2ec71bac5903 Mon Sep 17 00:00:00 2001 From: Mercury233 Date: Mon, 24 May 2021 08:15:41 +0800 Subject: [PATCH 2/2] fix ClientField::ClearSelect (#2345) --- gframe/client_field.cpp | 12 ++++++++++++ gframe/duelclient.cpp | 23 ++++------------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/gframe/client_field.cpp b/gframe/client_field.cpp index 3ecb2bcfc..ce8bf3506 100644 --- a/gframe/client_field.cpp +++ b/gframe/client_field.cpp @@ -371,6 +371,18 @@ void ClientField::ClearSelect() { (*cit)->is_selectable = false; (*cit)->is_selected = false; } + for(auto cit = selected_cards.begin(); cit != selected_cards.end(); ++cit) { + (*cit)->is_selectable = false; + (*cit)->is_selected = false; + } + for(auto cit = selectsum_all.begin(); cit != selectsum_all.end(); ++cit) { + (*cit)->is_selectable = false; + (*cit)->is_selected = false; + } + for(auto cit = selectsum_cards.begin(); cit != selectsum_cards.end(); ++cit) { + (*cit)->is_selectable = false; + (*cit)->is_selected = false; + } } void ClientField::ClearChainSelect() { for(auto cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit) { diff --git a/gframe/duelclient.cpp b/gframe/duelclient.cpp index fcab54367..ad905bab5 100644 --- a/gframe/duelclient.cpp +++ b/gframe/duelclient.cpp @@ -3902,7 +3902,10 @@ void DuelClient::SendResponse() { break; } case MSG_SELECT_CARD: - case MSG_SELECT_UNSELECT_CARD: { + case MSG_SELECT_UNSELECT_CARD: + case MSG_SELECT_TRIBUTE: + case MSG_SELECT_SUM: + case MSG_SELECT_COUNTER: { mainGame->dField.ClearSelect(); break; } @@ -3910,24 +3913,6 @@ void DuelClient::SendResponse() { mainGame->dField.ClearChainSelect(); break; } - case MSG_SELECT_TRIBUTE: { - mainGame->dField.ClearSelect(); - break; - } - case MSG_SELECT_COUNTER: { - mainGame->dField.ClearSelect(); - break; - } - case MSG_SELECT_SUM: { - for(int i = 0; i < mainGame->dField.must_select_count; ++i) { - mainGame->dField.selected_cards[i]->is_selected = false; - } - for(size_t i = 0; i < mainGame->dField.selectsum_all.size(); ++i) { - mainGame->dField.selectsum_all[i]->is_selectable = false; - mainGame->dField.selectsum_all[i]->is_selected = false; - } - break; - } } if(mainGame->dInfo.isSingleMode) { SingleMode::SetResponse(response_buf, response_len);