diff --git a/proto/StarRail.proto b/proto/StarRail.proto index c82f4b7..2e69835 100644 --- a/proto/StarRail.proto +++ b/proto/StarRail.proto @@ -17188,7 +17188,7 @@ message MarkPresetLineupCsReq { bool _is_favourite = 8; uint32 index = 10; } -message SetTeamFavourite { +message MarkPresetLineupScRsp { bool _is_favourite = 2; uint32 index = 9; uint32 retcode = 14; diff --git a/proto/cmdids.txt b/proto/cmdids.txt index 28f58b4..d3b5606 100644 --- a/proto/cmdids.txt +++ b/proto/cmdids.txt @@ -221,7 +221,7 @@ SyncAllPresetLineupNotify = 767 SwapLineupScRsp = 770 JoinLineupScRsp = 771 SwitchLineupIndexScRsp = 775 -SetTeamFavourite = 780 +MarkPresetLineupScRsp = 780 ReplaceLineupCsReq = 782 GetCurLineupDataScRsp = 787 SetLineupNameScRsp = 792 diff --git a/proto/seeds.txt b/proto/seeds.txt index 110531f..9cc7bfc 100644 --- a/proto/seeds.txt +++ b/proto/seeds.txt @@ -117,7 +117,7 @@ GetLineupAvatarDataScRsp RecoverAllLineupCsReq RecoverAllLineupScRsp MarkPresetLineupCsReq -SetTeamFavourite +MarkPresetLineupScRsp SyncLineupNotify # ---- scene ---- diff --git a/src/game/lineup_handlers.cpp b/src/game/lineup_handlers.cpp index f691855..9ea8d99 100644 --- a/src/game/lineup_handlers.cpp +++ b/src/game/lineup_handlers.cpp @@ -189,7 +189,7 @@ void onMarkPresetLineup(net::Session& session, const proto::MarkPresetLineupCsRe Player* player = playerOf(session, "MarkPresetLineup"); if (player == nullptr) return; - proto::SetTeamFavourite rsp; + proto::MarkPresetLineupScRsp rsp; rsp.index = req.index; rsp._is_favourite = req._is_favourite; if (req.index >= kSquadCount) { @@ -199,9 +199,7 @@ void onMarkPresetLineup(net::Session& session, const proto::MarkPresetLineupCsRe player->saveNow(); rsp.retcode = 0; } - // The dump never names a MarkPresetLineupScRsp; 773 is it, under the name the - // client's own symbols use. - session.send(cmd::SetTeamFavourite, rsp); + session.send(cmd::MarkPresetLineupScRsp, rsp); } } // namespace diff --git a/tests/test_flow.cpp b/tests/test_flow.cpp index 907ab30..2c1a768 100644 --- a/tests/test_flow.cpp +++ b/tests/test_flow.cpp @@ -979,8 +979,8 @@ void runFlowTests() { mark.index = 0; mark._is_favourite = true; client.send(cmd::MarkPresetLineupCsReq, mark); - check(client.await(cmd::SetTeamFavourite, packet), "marking a preset answers on 773"); - proto::SetTeamFavourite markRsp; + check(client.await(cmd::MarkPresetLineupScRsp, packet), "marking a preset answers on 780"); + proto::MarkPresetLineupScRsp markRsp; check(parseBody(packet, markRsp), "the mark parses"); check(markRsp.retcode == 0 && markRsp._is_favourite, "the squad is now a favourite");