From 48461534ae8e34bffa6075138b8da48520ba6917 Mon Sep 17 00:00:00 2001 From: DragonAura Date: Sat, 18 Mar 2023 23:53:21 +0800 Subject: [PATCH 1/5] feat(proto): :art: change map reading --- dependency/proto/Message2Clients.proto | 1 + dependency/proto/Services.proto | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dependency/proto/Message2Clients.proto b/dependency/proto/Message2Clients.proto index 1f026ad..33cdb6f 100755 --- a/dependency/proto/Message2Clients.proto +++ b/dependency/proto/Message2Clients.proto @@ -169,6 +169,7 @@ message MessageOfObj MessageOfChest chest_message = 9; MessageOfHiddenGate hidden_gate_message = 10; MessageOfNews news_message = 11; + MessageOfMap map_message = 12; } } diff --git a/dependency/proto/Services.proto b/dependency/proto/Services.proto index f9d5837..7e053c5 100755 --- a/dependency/proto/Services.proto +++ b/dependency/proto/Services.proto @@ -30,5 +30,4 @@ service AvailableService rpc StartOpenGate (IDMsg) returns (BoolRes); // 开闸门 rpc StartOpenChest (IDMsg) returns (BoolRes); rpc EndAllAction (IDMsg) returns (BoolRes); // 结束所有动作 - rpc GetMap (IDMsg) returns (MessageOfMap); // 游戏开始时候获取地图 } From 7422806eba4b644de9acea287618971588eda272 Mon Sep 17 00:00:00 2001 From: DragonAura Date: Sun, 19 Mar 2023 01:09:51 +0800 Subject: [PATCH 2/5] feat(CAPI): :sparkles: update with new proto --- CAPI/cpp/API/include/Communication.h | 8 - CAPI/cpp/API/include/logic.h | 3 +- CAPI/cpp/API/include/structures.h | 28 +- CAPI/cpp/API/include/utils.hpp | 18 +- CAPI/cpp/API/src/AI.cpp | 2 +- CAPI/cpp/API/src/Communication.cpp | 50 - CAPI/cpp/API/src/DebugAPI.cpp | 6 +- CAPI/cpp/API/src/logic.cpp | 331 +++- CAPI/cpp/API/src/main.cpp | 23 +- CAPI/cpp/proto/Message2Clients.pb.cc | 2170 +++++++++++++++++--------- CAPI/cpp/proto/Message2Clients.pb.h | 2092 ++++++++++++++++++------- CAPI/cpp/proto/Message2Server.pb.h | 2 +- CAPI/cpp/proto/MessageType.pb.h | 2 +- CAPI/cpp/proto/Services.grpc.pb.cc | 140 +- CAPI/cpp/proto/Services.grpc.pb.h | 537 ++----- CAPI/cpp/proto/Services.pb.cc | 19 +- CAPI/cpp/proto/Services.pb.h | 2 +- 17 files changed, 3508 insertions(+), 1925 deletions(-) diff --git a/CAPI/cpp/API/include/Communication.h b/CAPI/cpp/API/include/Communication.h index 70a15ac..e054086 100644 --- a/CAPI/cpp/API/include/Communication.h +++ b/CAPI/cpp/API/include/Communication.h @@ -13,7 +13,6 @@ #include #include #include -#include "ConcurrentQueue.hpp" class Logic; @@ -28,8 +27,6 @@ public: bool PickProp(THUAI6::PropType prop, int64_t playerID); bool UseProp(THUAI6::PropType prop, int64_t playerID); bool UseSkill(int32_t skillID, int64_t playerID); - std::optional> GetMessage(); - bool HaveMessage(); bool SendMessage(int64_t toID, std::string message, int64_t playerID); bool OpenDoor(int64_t playerID); bool CloseDoor(int64_t playerID); @@ -50,15 +47,10 @@ public: protobuf::MessageToClient GetMessage2Client(); void AddPlayer(int64_t playerID, THUAI6::PlayerType playerType, THUAI6::StudentType studentType, THUAI6::TrickerType trickerType); - [[nodiscard]] std::vector> GetMap(int64_t playerID); - - void ReadMessage(int64_t playerID); - private: std::unique_ptr THUAI6Stub; bool haveNewMessage = false; protobuf::MessageToClient message2Client; - ConcurrentQueue> messageQueue; std::mutex mtxMessage; std::condition_variable cvMessage; }; diff --git a/CAPI/cpp/API/include/logic.h b/CAPI/cpp/API/include/logic.h index 047724a..41cf9bb 100644 --- a/CAPI/cpp/API/include/logic.h +++ b/CAPI/cpp/API/include/logic.h @@ -29,6 +29,7 @@ #include "structures.h" #include "state.h" #include "Communication.h" +#include "ConcurrentQueue.hpp" // 封装了通信组件和对AI对象进行操作 class Logic : public ILogic @@ -63,7 +64,7 @@ private: std::condition_variable cvAI; // 信息队列 - std::queue> messageQueue; + ConcurrentQueue> messageQueue; // 存储状态,分别是现在的状态和缓冲区的状态。 State state[2]; diff --git a/CAPI/cpp/API/include/structures.h b/CAPI/cpp/API/include/structures.h index ae81ccd..32542e3 100644 --- a/CAPI/cpp/API/include/structures.h +++ b/CAPI/cpp/API/include/structures.h @@ -142,6 +142,9 @@ namespace THUAI6 DoorMessage = 7, GateMessage = 8, ChestMessage = 9, + MapMessage = 10, + NewsMessage = 11, + HiddenGateMessage = 12, }; // 玩家类 @@ -154,13 +157,16 @@ namespace THUAI6 int64_t playerID; // 玩家ID int64_t guid; // 全局唯一ID int16_t radius; // 圆形物体的半径或正方形物体的内切圆半径 + int32_t score; // 分数 + + double facingDirection; // 朝向 - int32_t damage; // 攻击伤害 std::vector timeUntilSkillAvailable; // 技能冷却时间 PlayerType playerType; // 玩家类型 std::vector props; PlaceType place; // 所处格子的类型 + BulletType bulletType; PlayerState playerState; }; @@ -168,14 +174,21 @@ namespace THUAI6 struct Student : public Player { StudentType studentType; - int32_t determination; // 剩余毅力(本次Emo之前还能承受的伤害) - int32_t addiction; - + int32_t determination; // 剩余毅力 + int32_t addiction; // 沉迷程度 + int32_t learningSpeed; + int32_t treatSpeed; + int32_t treatProgress; + int32_t rescueProgress; + double dangerAlert; std::vector buff; // buff }; struct Tricker : public Player { + int32_t damage; + double trickDesire; + double classVolume; TrickerType trickerType; // 捣蛋鬼类型 std::vector buff; // buff }; @@ -190,6 +203,7 @@ namespace THUAI6 PlayerType team; // 子弹所属队伍 PlaceType place; // 所处格子的类型 double bombRange; // 炸弹爆炸范围 + int32_t speed; // 子弹速度 }; struct BombedBullet @@ -221,8 +235,11 @@ namespace THUAI6 std::map, int32_t> gateState; std::map, bool> doorState; + std::map, int32_t> doorNumber; std::map, int32_t> chestState; + + std::map, bool> hiddenGateState; }; struct GameInfo @@ -313,6 +330,9 @@ namespace THUAI6 {MessageOfObj::DoorMessage, "DoorMessage"}, {MessageOfObj::GateMessage, "GateMessage"}, {MessageOfObj::ChestMessage, "ChestMessage"}, + {MessageOfObj::MapMessage, "MapMessage"}, + {MessageOfObj::NewsMessage, "NewsMessage"}, + {MessageOfObj::HiddenGateMessage, "HiddenGateMessage"}, }; } // namespace THUAI6 diff --git a/CAPI/cpp/API/include/utils.hpp b/CAPI/cpp/API/include/utils.hpp index 5ffdf42..919d6c5 100644 --- a/CAPI/cpp/API/include/utils.hpp +++ b/CAPI/cpp/API/include/utils.hpp @@ -167,6 +167,9 @@ namespace Proto2THUAI6 {protobuf::MessageOfObj::MessageOfObjCase::kGateMessage, THUAI6::MessageOfObj::GateMessage}, {protobuf::MessageOfObj::MessageOfObjCase::kChestMessage, THUAI6::MessageOfObj::ChestMessage}, {protobuf::MessageOfObj::MessageOfObjCase::MESSAGE_OF_OBJ_NOT_SET, THUAI6::MessageOfObj::NullMessageOfObj}, + {protobuf::MessageOfObj::MessageOfObjCase::kMapMessage, THUAI6::MessageOfObj::MapMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kNewsMessage, THUAI6::MessageOfObj::NewsMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kHiddenGateMessage, THUAI6::MessageOfObj::HiddenGateMessage}, }; @@ -177,6 +180,11 @@ namespace Proto2THUAI6 tricker->x = trickerMsg.x(); tricker->y = trickerMsg.y(); tricker->speed = trickerMsg.speed(); + tricker->score = trickerMsg.score(); + tricker->facingDirection = trickerMsg.facing_direction(); + tricker->bulletType = bulletTypeDict[trickerMsg.bullet_type()]; + tricker->trickDesire = trickerMsg.trick_desire(); + tricker->classVolume = trickerMsg.class_volume(); tricker->damage = trickerMsg.damage(); for (int i = 0; i < trickerMsg.time_until_skill_available().size(); i++) tricker->timeUntilSkillAvailable.push_back(trickerMsg.time_until_skill_available(i)); @@ -205,9 +213,16 @@ namespace Proto2THUAI6 student->playerID = studentMsg.player_id(); student->guid = studentMsg.guid(); student->radius = studentMsg.radius(); + student->score = studentMsg.score(); + student->facingDirection = studentMsg.facing_direction(); + student->bulletType = bulletTypeDict[studentMsg.bullet_type()]; + student->learningSpeed = studentMsg.learning_speed(); + student->treatSpeed = studentMsg.treat_speed(); + student->treatProgress = studentMsg.treat_progress(); + student->rescueProgress = studentMsg.rescue_progress(); + student->dangerAlert = studentMsg.danger_alert(); for (int i = 0; i < studentMsg.time_until_skill_available().size(); i++) student->timeUntilSkillAvailable.push_back(studentMsg.time_until_skill_available(i)); - student->damage = studentMsg.damage(); student->playerType = THUAI6::PlayerType::StudentPlayer; for (int i = 0; i < studentMsg.prop().size(); i++) student->props.push_back(propTypeDict[studentMsg.prop(i)]); @@ -262,6 +277,7 @@ namespace Proto2THUAI6 bullet->team = playerTypeDict[bulletMsg.team()]; bullet->place = placeTypeDict[bulletMsg.place()]; bullet->bombRange = bulletMsg.bomb_range(); + bullet->speed = bulletMsg.speed(); return bullet; } diff --git a/CAPI/cpp/API/src/AI.cpp b/CAPI/cpp/API/src/AI.cpp index feae554..fcdad3b 100644 --- a/CAPI/cpp/API/src/AI.cpp +++ b/CAPI/cpp/API/src/AI.cpp @@ -17,7 +17,7 @@ extern const THUAI6::StudentType studentType = THUAI6::StudentType::StudentType1 void AI::play(IStudentAPI& api) { - api.Move(1, 1); + api.Move(100, 1); } void AI::play(ITrickerAPI& api) diff --git a/CAPI/cpp/API/src/Communication.cpp b/CAPI/cpp/API/src/Communication.cpp index 4f9ef99..558342e 100644 --- a/CAPI/cpp/API/src/Communication.cpp +++ b/CAPI/cpp/API/src/Communication.cpp @@ -231,32 +231,6 @@ protobuf::MessageToClient Communication::GetMessage2Client() return message2Client; } -std::optional> Communication::GetMessage() -{ - return messageQueue.tryPop(); -} - -bool Communication::HaveMessage() -{ - return !messageQueue.empty(); -} - -void Communication::ReadMessage(int64_t playerID) -{ - auto tRead = [=]() - { - auto request = THUAI62Proto::THUAI62ProtobufID(playerID); - ClientContext context; - protobuf::MsgRes messageReceived; - auto reader = THUAI6Stub->GetMessage(&context, request); - while (reader->Read(&messageReceived)) - { - messageQueue.emplace(messageReceived.from_player_id(), messageReceived.message_received()); - } - }; - std::thread(tRead).detach(); -} - void Communication::AddPlayer(int64_t playerID, THUAI6::PlayerType playerType, THUAI6::StudentType studentType, THUAI6::TrickerType trickerType) { auto tMessage = [=]() @@ -276,27 +250,3 @@ void Communication::AddPlayer(int64_t playerID, THUAI6::PlayerType playerType, T }; std::thread(tMessage).detach(); } - -std::vector> Communication::GetMap(int64_t playerID) -{ - protobuf::MessageOfMap mapResult; - ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID); - auto status = THUAI6Stub->GetMap(&context, request, &mapResult); - if (status.ok()) - { - std::vector> map; - for (int i = 0; i < mapResult.row_size(); i++) - { - std::vector row; - for (int j = 0; j < mapResult.row(i).col_size(); j++) - { - row.push_back(Proto2THUAI6::placeTypeDict[mapResult.row(i).col(j)]); - } - map.push_back(std::move(row)); - } - return map; - } - else - return {}; -} diff --git a/CAPI/cpp/API/src/DebugAPI.cpp b/CAPI/cpp/API/src/DebugAPI.cpp index cd8dca6..bdf0e74 100644 --- a/CAPI/cpp/API/src/DebugAPI.cpp +++ b/CAPI/cpp/API/src/DebugAPI.cpp @@ -546,7 +546,7 @@ void StudentDebugAPI::PrintStudent() const { logger->info("******Student Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); - logger->info("speed={}, view range={}, damage={}, place={}", student->speed, student->viewRange, student->damage, THUAI6::placeTypeDict[student->place]); + logger->info("speed={}, view range={}, place={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place]); logger->info("state={}, determination={}, addiction={}", THUAI6::playerStateDict[student->playerState], student->determination, student->addiction); std::string skillTime = "skill time="; for (const auto& time : student->timeUntilSkillAvailable) @@ -570,7 +570,7 @@ void TrickerDebugAPI::PrintStudent() const { logger->info("******Student Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); - logger->info("speed={}, view range={}, damage={}, place={}", student->speed, student->viewRange, student->damage, THUAI6::placeTypeDict[student->place]); + logger->info("speed={}, view range={}, place={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place]); logger->info("state={}, determination={}, addiction={}", THUAI6::playerStateDict[student->playerState], student->determination, student->addiction); std::string skillTime = "skill time="; for (const auto& time : student->timeUntilSkillAvailable) @@ -661,7 +661,7 @@ void StudentDebugAPI::PrintSelfInfo() const auto self = logic.StudentGetSelfInfo(); logger->info("******Self Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y); - logger->info("speed={}, view range={}, damage={}, place={}", self->speed, self->viewRange, self->damage, THUAI6::placeTypeDict[self->place]); + logger->info("speed={}, view range={}, place={}", self->speed, self->viewRange, THUAI6::placeTypeDict[self->place]); logger->info("state={}, determination={}, addiction", THUAI6::playerStateDict[self->playerState], self->determination, self->addiction); std::string skillTime = "skill time="; for (const auto& time : self->timeUntilSkillAvailable) diff --git a/CAPI/cpp/API/src/logic.cpp b/CAPI/cpp/API/src/logic.cpp index 48809c6..857441e 100644 --- a/CAPI/cpp/API/src/logic.cpp +++ b/CAPI/cpp/API/src/logic.cpp @@ -159,13 +159,13 @@ bool Logic::SendMessage(int64_t toID, std::string message) bool Logic::HaveMessage() { logger->debug("Called HaveMessage"); - return pComm->HaveMessage(); + return !messageQueue.empty(); } std::optional> Logic::GetMessage() { logger->debug("Called GetMessage"); - return pComm->GetMessage(); + return messageQueue.tryPop(); } bool Logic::Graduate() @@ -246,9 +246,6 @@ void Logic::ProcessMessage() { logger->info("Message thread start!"); pComm->AddPlayer(playerID, playerType, studentType, trickerType); - currentState->gameMap = pComm->GetMap(playerID); - bufferState->gameMap = currentState->gameMap; - pComm->ReadMessage(playerID); while (gameState != THUAI6::GameState::GameEnd) { auto clientMsg = pComm->GetMessage2Client(); // 在获得新消息之前阻塞 @@ -270,6 +267,24 @@ void Logic::ProcessMessage() currentState->guids = playerGUIDs; bufferState->guids = playerGUIDs; + // 读取地图 + for (const auto& item : clientMsg.obj_message()) + if (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()] == THUAI6::MessageOfObj::MapMessage) + { + auto map = std::vector>(); + auto mapResult = item.map_message(); + for (int i = 0; i < item.map_message().row_size(); i++) + { + std::vector row; + for (int j = 0; j < mapResult.row(i).col_size(); j++) + { + row.push_back(Proto2THUAI6::placeTypeDict[mapResult.row(i).col(j)]); + } + map.push_back(std::move(row)); + } + bufferState->gameMap = std::move(map); + currentState->gameMap = bufferState->gameMap; + } LoadBuffer(clientMsg); AILoop = true; @@ -282,6 +297,12 @@ void Logic::ProcessMessage() for (const auto& obj : clientMsg.obj_message()) if (Proto2THUAI6::messageOfObjDict[obj.message_of_obj_case()] == THUAI6::MessageOfObj::StudentMessage) playerGUIDs.push_back(obj.student_message().guid()); + else if (Proto2THUAI6::messageOfObjDict[obj.message_of_obj_case()] == THUAI6::MessageOfObj::NewsMessage) + { + auto news = obj.news_message(); + if (news.to_id() == playerID) + messageQueue.emplace(std::make_pair(news.from_id(), news.news())); + } for (const auto& obj : clientMsg.obj_message()) if (Proto2THUAI6::messageOfObjDict[obj.message_of_obj_case()] == THUAI6::MessageOfObj::TrickerMessage) playerGUIDs.push_back(obj.tricker_message().guid()); @@ -334,12 +355,126 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message) logger->debug("Add Student!"); } for (const auto& item : message.obj_message()) - if (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()] == THUAI6::MessageOfObj::TrickerMessage) - if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.tricker_message().x(), item.tricker_message().y(), bufferState->studentSelf->place, Proto2THUAI6::placeTypeDict[item.tricker_message().place()], bufferState->gameMap)) - { - bufferState->trickers.push_back(Proto2THUAI6::Protobuf2THUAI6Tricker(item.tricker_message())); - logger->debug("Add Tricker!"); - } + switch (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()]) + { + case THUAI6::MessageOfObj::PropMessage: + if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.prop_message().x(), item.prop_message().y(), bufferState->studentSelf->place, Proto2THUAI6::placeTypeDict[item.prop_message().place()], currentState->gameMap)) + { + bufferState->props.push_back(Proto2THUAI6::Protobuf2THUAI6Prop(item.prop_message())); + logger->debug("Add Prop!"); + } + break; + case THUAI6::MessageOfObj::BulletMessage: + if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.prop_message().x(), item.prop_message().y(), bufferState->studentSelf->place, Proto2THUAI6::placeTypeDict[item.prop_message().place()], currentState->gameMap)) + { + bufferState->bullets.push_back(Proto2THUAI6::Protobuf2THUAI6Bullet(item.bullet_message())); + logger->debug("Add Bullet!"); + } + break; + case THUAI6::MessageOfObj::ClassroomMessage: + { + if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.classroom_message().x(), item.classroom_message().y(), bufferState->studentSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.classroom_message().x(), item.classroom_message().y()); + if (bufferState->mapInfo->classRoomState.count(pos) == 0) + { + bufferState->mapInfo->classRoomState.emplace(pos, item.classroom_message().progress()); + logger->debug("Add Classroom!"); + } + else + { + bufferState->mapInfo->classRoomState[pos] = item.classroom_message().progress(); + logger->debug("Update Classroom!"); + } + } + break; + } + case THUAI6::MessageOfObj::ChestMessage: + { + if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.chest_message().x(), item.chest_message().y(), bufferState->studentSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.chest_message().x(), item.chest_message().y()); + if (bufferState->mapInfo->chestState.count(pos) == 0) + { + bufferState->mapInfo->chestState.emplace(pos, item.chest_message().progress()); + logger->debug("Add Chest!"); + } + else + { + bufferState->mapInfo->chestState[pos] = item.chest_message().progress(); + logger->debug("Update Chest!"); + } + } + break; + } + case THUAI6::MessageOfObj::DoorMessage: + { + if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.door_message().x(), item.door_message().y(), bufferState->studentSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.door_message().x(), item.door_message().y()); + if (bufferState->mapInfo->doorState.count(pos) == 0) + { + bufferState->mapInfo->doorState.emplace(pos, item.door_message().is_open()); + bufferState->mapInfo->doorNumber.emplace(pos, item.door_message().number()); + logger->debug("Add Door!"); + } + else + { + bufferState->mapInfo->doorState[pos] = item.door_message().is_open(); + bufferState->mapInfo->doorNumber[pos] = item.door_message().number(); + logger->debug("Update Door!"); + } + } + break; + } + case THUAI6::MessageOfObj::HiddenGateMessage: + { + if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.hidden_gate_message().x(), item.hidden_gate_message().y(), bufferState->studentSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.hidden_gate_message().x(), item.hidden_gate_message().y()); + if (bufferState->mapInfo->hiddenGateState.count(pos) == 0) + { + bufferState->mapInfo->hiddenGateState.emplace(pos, item.hidden_gate_message().opened()); + logger->debug("Add HiddenGate!"); + } + else + { + bufferState->mapInfo->hiddenGateState[pos] = item.hidden_gate_message().opened(); + logger->debug("Update HiddenGate!"); + } + } + break; + } + case THUAI6::MessageOfObj::GateMessage: + { + if (!AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.gate_message().x(), item.gate_message().y(), bufferState->studentSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.gate_message().x(), item.gate_message().y()); + if (bufferState->mapInfo->gateState.count(pos) == 0) + { + bufferState->mapInfo->gateState.emplace(pos, item.gate_message().progress()); + logger->debug("Add Gate!"); + } + else + { + bufferState->mapInfo->gateState[pos] = item.gate_message().progress(); + logger->debug("Update Gate!"); + } + } + break; + } + case THUAI6::MessageOfObj::TrickerMessage: + { + if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.tricker_message().x(), item.tricker_message().y(), bufferState->studentSelf->place, Proto2THUAI6::placeTypeDict[item.tricker_message().place()], bufferState->gameMap)) + { + bufferState->trickers.push_back(Proto2THUAI6::Protobuf2THUAI6Tricker(item.tricker_message())); + logger->debug("Add Tricker!"); + } + } + case THUAI6::MessageOfObj::NullMessageOfObj: + default: + break; + } } else { @@ -356,92 +491,127 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message) } } for (const auto& item : message.obj_message()) - if (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()] == THUAI6::MessageOfObj::StudentMessage) - if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.student_message().x(), item.student_message().y(), bufferState->trickerSelf->place, Proto2THUAI6::placeTypeDict[item.student_message().place()], bufferState->gameMap)) - { - bufferState->students.push_back(Proto2THUAI6::Protobuf2THUAI6Student(item.student_message())); - logger->debug("Add Student!"); - } - } - for (const auto& item : message.obj_message()) - switch (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()]) - { - case THUAI6::MessageOfObj::PropMessage: - bufferState->props.push_back(Proto2THUAI6::Protobuf2THUAI6Prop(item.prop_message())); - logger->debug("Add Prop!"); - break; - case THUAI6::MessageOfObj::BulletMessage: - bufferState->bullets.push_back(Proto2THUAI6::Protobuf2THUAI6Bullet(item.bullet_message())); - logger->debug("Add Bullet!"); - break; - case THUAI6::MessageOfObj::BombedBulletMessage: - bufferState->bombedBullets.push_back(Proto2THUAI6::Protobuf2THUAI6BombedBullet(item.bombed_bullet_message())); - logger->debug("Add BombedBullet!"); - break; - case THUAI6::MessageOfObj::ClassroomMessage: - { - auto pos = std::make_pair(item.classroom_message().x(), item.classroom_message().y()); - if (bufferState->mapInfo->classRoomState.count(pos) == 0) + switch (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()]) + { + case THUAI6::MessageOfObj::PropMessage: + if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.prop_message().x(), item.prop_message().y(), bufferState->trickerSelf->place, Proto2THUAI6::placeTypeDict[item.prop_message().place()], currentState->gameMap)) { - bufferState->mapInfo->classRoomState.emplace(pos, item.classroom_message().progress()); - logger->debug("Add Classroom!"); + bufferState->props.push_back(Proto2THUAI6::Protobuf2THUAI6Prop(item.prop_message())); + logger->debug("Add Prop!"); } - else + break; + case THUAI6::MessageOfObj::BulletMessage: + if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.prop_message().x(), item.prop_message().y(), bufferState->trickerSelf->place, Proto2THUAI6::placeTypeDict[item.prop_message().place()], currentState->gameMap)) { - bufferState->mapInfo->classRoomState[pos] = item.classroom_message().progress(); - logger->debug("Update Classroom!"); + bufferState->bullets.push_back(Proto2THUAI6::Protobuf2THUAI6Bullet(item.bullet_message())); + logger->debug("Add Bullet!"); } break; - } - case THUAI6::MessageOfObj::ChestMessage: - { - auto pos = std::make_pair(item.chest_message().x(), item.chest_message().y()); - if (bufferState->mapInfo->chestState.count(pos) == 0) + case THUAI6::MessageOfObj::ClassroomMessage: { - bufferState->mapInfo->chestState.emplace(pos, item.chest_message().progress()); - logger->debug("Add Chest!"); + if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.classroom_message().x(), item.classroom_message().y(), bufferState->trickerSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.classroom_message().x(), item.classroom_message().y()); + if (bufferState->mapInfo->classRoomState.count(pos) == 0) + { + bufferState->mapInfo->classRoomState.emplace(pos, item.classroom_message().progress()); + logger->debug("Add Classroom!"); + } + else + { + bufferState->mapInfo->classRoomState[pos] = item.classroom_message().progress(); + logger->debug("Update Classroom!"); + } + } + break; } - else + case THUAI6::MessageOfObj::ChestMessage: { - bufferState->mapInfo->chestState[pos] = item.chest_message().progress(); - logger->debug("Update Chest!"); + if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.chest_message().x(), item.chest_message().y(), bufferState->trickerSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.chest_message().x(), item.chest_message().y()); + if (bufferState->mapInfo->chestState.count(pos) == 0) + { + bufferState->mapInfo->chestState.emplace(pos, item.chest_message().progress()); + logger->debug("Add Chest!"); + } + else + { + bufferState->mapInfo->chestState[pos] = item.chest_message().progress(); + logger->debug("Update Chest!"); + } + } + break; } - break; - } - case THUAI6::MessageOfObj::DoorMessage: - { - auto pos = std::make_pair(item.door_message().x(), item.door_message().y()); - if (bufferState->mapInfo->doorState.count(pos) == 0) + case THUAI6::MessageOfObj::DoorMessage: { - bufferState->mapInfo->doorState.emplace(pos, item.door_message().is_open()); - logger->debug("Add Door!"); + if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.door_message().x(), item.door_message().y(), bufferState->trickerSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.door_message().x(), item.door_message().y()); + if (bufferState->mapInfo->doorState.count(pos) == 0) + { + bufferState->mapInfo->doorState.emplace(pos, item.door_message().is_open()); + bufferState->mapInfo->doorNumber.emplace(pos, item.door_message().number()); + logger->debug("Add Door!"); + } + else + { + bufferState->mapInfo->doorState[pos] = item.door_message().is_open(); + bufferState->mapInfo->doorNumber[pos] = item.door_message().number(); + logger->debug("Update Door!"); + } + } + break; } - else + case THUAI6::MessageOfObj::HiddenGateMessage: { - bufferState->mapInfo->doorState[pos] = item.door_message().is_open(); - logger->debug("Update Door!"); + if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.hidden_gate_message().x(), item.hidden_gate_message().y(), bufferState->trickerSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.hidden_gate_message().x(), item.hidden_gate_message().y()); + if (bufferState->mapInfo->hiddenGateState.count(pos) == 0) + { + bufferState->mapInfo->hiddenGateState.emplace(pos, item.hidden_gate_message().opened()); + logger->debug("Add HiddenGate!"); + } + else + { + bufferState->mapInfo->hiddenGateState[pos] = item.hidden_gate_message().opened(); + logger->debug("Update HiddenGate!"); + } + } + break; } - break; - } - case THUAI6::MessageOfObj::GateMessage: - { - auto pos = std::make_pair(item.gate_message().x(), item.gate_message().y()); - if (bufferState->mapInfo->gateState.count(pos) == 0) + case THUAI6::MessageOfObj::GateMessage: { - bufferState->mapInfo->gateState.emplace(pos, item.gate_message().progress()); - logger->debug("Add Gate!"); + if (!AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.gate_message().x(), item.gate_message().y(), bufferState->trickerSelf->place, THUAI6::PlaceType::Land, currentState->gameMap)) + { + auto pos = std::make_pair(item.gate_message().x(), item.gate_message().y()); + if (bufferState->mapInfo->gateState.count(pos) == 0) + { + bufferState->mapInfo->gateState.emplace(pos, item.gate_message().progress()); + logger->debug("Add Gate!"); + } + else + { + bufferState->mapInfo->gateState[pos] = item.gate_message().progress(); + logger->debug("Update Gate!"); + } + } + break; } - else + case THUAI6::MessageOfObj::StudentMessage: { - bufferState->mapInfo->gateState[pos] = item.gate_message().progress(); - logger->debug("Update Gate!"); + if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.student_message().x(), item.student_message().y(), bufferState->trickerSelf->place, Proto2THUAI6::placeTypeDict[item.student_message().place()], bufferState->gameMap)) + { + bufferState->students.push_back(Proto2THUAI6::Protobuf2THUAI6Student(item.student_message())); + logger->debug("Add Student!"); + } } + case THUAI6::MessageOfObj::NullMessageOfObj: + default: break; - } - case THUAI6::MessageOfObj::NullMessageOfObj: - default: - break; - } + } + } if (asynchronous) { { @@ -522,7 +692,10 @@ void Logic::Main(CreateAIFunc createAI, std::string IP, std::string port, bool f fileLogger->set_pattern(pattern); printLogger->set_pattern(pattern); if (file) + { fileLogger->set_level(spdlog::level::trace); + spdlog::flush_every(std::chrono::seconds(1)); + } else fileLogger->set_level(spdlog::level::off); if (print) diff --git a/CAPI/cpp/API/src/main.cpp b/CAPI/cpp/API/src/main.cpp index 8391f5c..512ea43 100644 --- a/CAPI/cpp/API/src/main.cpp +++ b/CAPI/cpp/API/src/main.cpp @@ -9,9 +9,9 @@ int THUAI6Main(int argc, char** argv, CreateAIFunc AIBuilder) { - int pID = 114514; - std::string sIP = "114.51.41.91"; - std::string sPort = "9810"; + int pID = 0; + std::string sIP = "183.172.213.88"; + std::string sPort = "8888"; bool file = false; bool print = false; bool warnOnly = false; @@ -19,13 +19,13 @@ int THUAI6Main(int argc, char** argv, CreateAIFunc AIBuilder) extern const THUAI6::TrickerType trickerType; extern const THUAI6::StudentType studentType; // 仅供早期调试使用 - { - file = false; - print = true; - Logic logic(playerType, pID, trickerType, studentType); - logic.Main(AIBuilder, sIP, sPort, file, print, warnOnly); - return 0; - } + // { + // file = false; + // print = true; + // Logic logic(playerType, pID, trickerType, studentType); + // logic.Main(AIBuilder, sIP, sPort, file, print, warnOnly); + // return 0; + // } // 使用cmdline的正式版本 try @@ -35,7 +35,7 @@ int THUAI6Main(int argc, char** argv, CreateAIFunc AIBuilder) TCLAP::ValueArg serverIP("I", "serverIP", "Server`s IP 127.0.0.1 in default", false, "127.0.0.1", "string"); cmd.add(serverIP); - TCLAP::ValueArg serverPort("P", "serverPort", "Port the server listens to 7777 in default", false, 7777, "USORT"); + TCLAP::ValueArg serverPort("P", "serverPort", "Port the server listens to 7777 in default", false, "7777", "USORT"); cmd.add(serverPort); std::vector validPlayerIDs{0, 1, 2, 3}; @@ -70,6 +70,7 @@ int THUAI6Main(int argc, char** argv, CreateAIFunc AIBuilder) std::cerr << "Parsing error: " << e.error() << " for arg " << e.argId() << std::endl; return 1; } + std::cout << file << std::endl; Logic logic(playerType, pID, trickerType, studentType); logic.Main(AIBuilder, sIP, sPort, file, print, warnOnly); return 0; diff --git a/CAPI/cpp/proto/Message2Clients.pb.cc b/CAPI/cpp/proto/Message2Clients.pb.cc index 8fdc6bb..20b7ee8 100644 --- a/CAPI/cpp/proto/Message2Clients.pb.cc +++ b/CAPI/cpp/proto/Message2Clients.pb.cc @@ -26,7 +26,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.time_until_skill_available_)*/ {}, /*decltype(_impl_.prop_)*/ {}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, /*decltype(_impl_.buff_)*/ {}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.speed_)*/ 0, /*decltype(_impl_.determination_)*/ 0, /*decltype(_impl_.addiction_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.player_state_)*/ 0, /*decltype(_impl_.state_)*/ 0, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.view_range_)*/ 0, /*decltype(_impl_.radius_)*/ 0, /*decltype(_impl_.danger_alert_)*/ 0, /*decltype(_impl_.damage_)*/ 0, /*decltype(_impl_.score_)*/ 0, /*decltype(_impl_.treat_progress_)*/ 0, /*decltype(_impl_.rescue_progress_)*/ 0, /*decltype(_impl_.student_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.time_until_skill_available_)*/ {}, /*decltype(_impl_.prop_)*/ {}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, /*decltype(_impl_.buff_)*/ {}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.speed_)*/ 0, /*decltype(_impl_.determination_)*/ 0, /*decltype(_impl_.addiction_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.player_state_)*/ 0, /*decltype(_impl_.state_)*/ 0, /*decltype(_impl_.bullet_type_)*/ 0, /*decltype(_impl_.learning_speed_)*/ 0, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.treat_speed_)*/ 0, /*decltype(_impl_.view_range_)*/ 0, /*decltype(_impl_.radius_)*/ 0, /*decltype(_impl_.score_)*/ 0, /*decltype(_impl_.danger_alert_)*/ 0, /*decltype(_impl_.treat_progress_)*/ 0, /*decltype(_impl_.rescue_progress_)*/ 0, /*decltype(_impl_.facing_direction_)*/ 0, /*decltype(_impl_.student_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageOfStudentDefaultTypeInternal @@ -48,7 +48,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.time_until_skill_available_)*/ {}, /*decltype(_impl_.prop_)*/ {}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, /*decltype(_impl_.buff_)*/ {}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.speed_)*/ 0, /*decltype(_impl_.damage_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.tricker_type_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.movable_)*/ false, /*decltype(_impl_.view_range_)*/ 0, /*decltype(_impl_.radius_)*/ 0, /*decltype(_impl_.player_state_)*/ 0, /*decltype(_impl_.trick_desire_)*/ 0, /*decltype(_impl_.class_volume_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.time_until_skill_available_)*/ {}, /*decltype(_impl_.prop_)*/ {}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, /*decltype(_impl_.buff_)*/ {}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.speed_)*/ 0, /*decltype(_impl_.damage_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.tricker_type_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.score_)*/ 0, /*decltype(_impl_.view_range_)*/ 0, /*decltype(_impl_.radius_)*/ 0, /*decltype(_impl_.player_state_)*/ 0, /*decltype(_impl_.trick_desire_)*/ 0, /*decltype(_impl_.class_volume_)*/ 0, /*decltype(_impl_.facing_direction_)*/ 0, /*decltype(_impl_.bullet_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageOfTrickerDefaultTypeInternal @@ -70,7 +70,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.type_)*/ 0, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.facing_direction_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.team_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.bomb_range_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.type_)*/ 0, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.facing_direction_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.team_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.bomb_range_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.speed_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageOfBulletDefaultTypeInternal @@ -198,11 +198,33 @@ namespace protobuf }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOfGateDefaultTypeInternal _MessageOfGate_default_instance_; + PROTOBUF_CONSTEXPR MessageOfHiddenGate::MessageOfHiddenGate( + ::_pbi::ConstantInitialized + ) : + _impl_{ + /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.opened_)*/ false, /*decltype(_impl_._cached_size_)*/ {}} + { + } + struct MessageOfHiddenGateDefaultTypeInternal + { + PROTOBUF_CONSTEXPR MessageOfHiddenGateDefaultTypeInternal() : + _instance(::_pbi::ConstantInitialized{}) + { + } + ~MessageOfHiddenGateDefaultTypeInternal() + { + } + union + { + MessageOfHiddenGate _instance; + }; + }; + PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOfHiddenGateDefaultTypeInternal _MessageOfHiddenGate_default_instance_; PROTOBUF_CONSTEXPR MessageOfDoor::MessageOfDoor( ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.is_open_)*/ false, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.is_open_)*/ false, /*decltype(_impl_.number_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageOfDoorDefaultTypeInternal @@ -286,6 +308,28 @@ namespace protobuf }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOfMapDefaultTypeInternal _MessageOfMap_default_instance_; + PROTOBUF_CONSTEXPR MessageOfNews::MessageOfNews( + ::_pbi::ConstantInitialized + ) : + _impl_{ + /*decltype(_impl_.news_)*/ {&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}, /*decltype(_impl_.from_id_)*/ int64_t{0}, /*decltype(_impl_.to_id_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}} + { + } + struct MessageOfNewsDefaultTypeInternal + { + PROTOBUF_CONSTEXPR MessageOfNewsDefaultTypeInternal() : + _instance(::_pbi::ConstantInitialized{}) + { + } + ~MessageOfNewsDefaultTypeInternal() + { + } + union + { + MessageOfNews _instance; + }; + }; + PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOfNewsDefaultTypeInternal _MessageOfNews_default_instance_; PROTOBUF_CONSTEXPR MessageOfObj::MessageOfObj( ::_pbi::ConstantInitialized ) : @@ -396,30 +440,8 @@ namespace protobuf }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoolResDefaultTypeInternal _BoolRes_default_instance_; - PROTOBUF_CONSTEXPR MsgRes::MsgRes( - ::_pbi::ConstantInitialized - ) : - _impl_{ - /*decltype(_impl_.message_received_)*/ {&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}, /*decltype(_impl_.from_player_id_)*/ int64_t{0}, /*decltype(_impl_.have_message_)*/ false, /*decltype(_impl_._cached_size_)*/ {}} - { - } - struct MsgResDefaultTypeInternal - { - PROTOBUF_CONSTEXPR MsgResDefaultTypeInternal() : - _instance(::_pbi::ConstantInitialized{}) - { - } - ~MsgResDefaultTypeInternal() - { - } - union - { - MsgRes _instance; - }; - }; - PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MsgResDefaultTypeInternal _MsgRes_default_instance_; } // namespace protobuf -static ::_pb::Metadata file_level_metadata_Message2Clients_2eproto[18]; +static ::_pb::Metadata file_level_metadata_Message2Clients_2eproto[19]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_Message2Clients_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_Message2Clients_2eproto = nullptr; @@ -441,15 +463,18 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.player_state_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.guid_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.state_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.bullet_type_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.learning_speed_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.treat_speed_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.view_range_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.radius_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.damage_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.danger_alert_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.score_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.treat_progress_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.rescue_progress_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.student_type_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.facing_direction_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.buff_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _internal_metadata_), @@ -466,13 +491,15 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.prop_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.tricker_type_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.guid_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.movable_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.score_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.view_range_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.radius_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.player_state_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.trick_desire_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.class_volume_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.facing_direction_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.bullet_type_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfTricker, _impl_.buff_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfBullet, _internal_metadata_), @@ -488,6 +515,7 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfBullet, _impl_.team_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfBullet, _impl_.place_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfBullet, _impl_.bomb_range_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfBullet, _impl_.speed_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfBombedBullet, _internal_metadata_), ~0u, // no _extensions_ @@ -544,6 +572,15 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfGate, _impl_.y_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfGate, _impl_.progress_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHiddenGate, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHiddenGate, _impl_.x_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHiddenGate, _impl_.y_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHiddenGate, _impl_.opened_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfDoor, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -552,6 +589,7 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfDoor, _impl_.x_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfDoor, _impl_.y_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfDoor, _impl_.is_open_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfDoor, _impl_.number_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfChest, _internal_metadata_), ~0u, // no _extensions_ @@ -576,6 +614,15 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfMap, _impl_.row_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfNews, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfNews, _impl_.news_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfNews, _impl_.from_id_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfNews, _impl_.to_id_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfObj, _internal_metadata_), ~0u, // no _extensions_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfObj, _impl_._oneof_case_[0]), @@ -590,6 +637,9 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfObj, _impl_.message_of_obj_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _internal_metadata_), @@ -631,35 +681,27 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::BoolRes, _impl_.act_success_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protobuf::MsgRes, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protobuf::MsgRes, _impl_.have_message_), - PROTOBUF_FIELD_OFFSET(::protobuf::MsgRes, _impl_.from_player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::MsgRes, _impl_.message_received_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { {0, -1, -1, sizeof(::protobuf::MessageOfStudent)}, - {27, -1, -1, sizeof(::protobuf::MessageOfTricker)}, - {50, -1, -1, sizeof(::protobuf::MessageOfBullet)}, - {64, -1, -1, sizeof(::protobuf::MessageOfBombedBullet)}, - {76, -1, -1, sizeof(::protobuf::MessageOfProp)}, - {90, -1, -1, sizeof(::protobuf::MessageOfPickedProp)}, - {101, -1, -1, sizeof(::protobuf::MessageOfClassroom)}, - {110, -1, -1, sizeof(::protobuf::MessageOfGate)}, - {119, -1, -1, sizeof(::protobuf::MessageOfDoor)}, - {128, -1, -1, sizeof(::protobuf::MessageOfChest)}, - {137, -1, -1, sizeof(::protobuf::MessageOfMap_Row)}, - {144, -1, -1, sizeof(::protobuf::MessageOfMap)}, - {151, -1, -1, sizeof(::protobuf::MessageOfObj)}, - {167, -1, -1, sizeof(::protobuf::MessageOfAll)}, - {182, -1, -1, sizeof(::protobuf::MessageToClient)}, - {191, -1, -1, sizeof(::protobuf::MoveRes)}, - {200, -1, -1, sizeof(::protobuf::BoolRes)}, - {207, -1, -1, sizeof(::protobuf::MsgRes)}, + {30, -1, -1, sizeof(::protobuf::MessageOfTricker)}, + {55, -1, -1, sizeof(::protobuf::MessageOfBullet)}, + {70, -1, -1, sizeof(::protobuf::MessageOfBombedBullet)}, + {82, -1, -1, sizeof(::protobuf::MessageOfProp)}, + {96, -1, -1, sizeof(::protobuf::MessageOfPickedProp)}, + {107, -1, -1, sizeof(::protobuf::MessageOfClassroom)}, + {116, -1, -1, sizeof(::protobuf::MessageOfGate)}, + {125, -1, -1, sizeof(::protobuf::MessageOfHiddenGate)}, + {134, -1, -1, sizeof(::protobuf::MessageOfDoor)}, + {144, -1, -1, sizeof(::protobuf::MessageOfChest)}, + {153, -1, -1, sizeof(::protobuf::MessageOfMap_Row)}, + {160, -1, -1, sizeof(::protobuf::MessageOfMap)}, + {167, -1, -1, sizeof(::protobuf::MessageOfNews)}, + {176, -1, -1, sizeof(::protobuf::MessageOfObj)}, + {195, -1, -1, sizeof(::protobuf::MessageOfAll)}, + {210, -1, -1, sizeof(::protobuf::MessageToClient)}, + {219, -1, -1, sizeof(::protobuf::MoveRes)}, + {228, -1, -1, sizeof(::protobuf::BoolRes)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -671,71 +713,80 @@ static const ::_pb::Message* const file_default_instances[] = { &::protobuf::_MessageOfPickedProp_default_instance_._instance, &::protobuf::_MessageOfClassroom_default_instance_._instance, &::protobuf::_MessageOfGate_default_instance_._instance, + &::protobuf::_MessageOfHiddenGate_default_instance_._instance, &::protobuf::_MessageOfDoor_default_instance_._instance, &::protobuf::_MessageOfChest_default_instance_._instance, &::protobuf::_MessageOfMap_Row_default_instance_._instance, &::protobuf::_MessageOfMap_default_instance_._instance, + &::protobuf::_MessageOfNews_default_instance_._instance, &::protobuf::_MessageOfObj_default_instance_._instance, &::protobuf::_MessageOfAll_default_instance_._instance, &::protobuf::_MessageToClient_default_instance_._instance, &::protobuf::_MoveRes_default_instance_._instance, &::protobuf::_BoolRes_default_instance_._instance, - &::protobuf::_MsgRes_default_instance_._instance, }; const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\025Message2Clients.proto\022\010protobuf\032\021Messa" - "geType.proto\"\237\004\n\020MessageOfStudent\022\t\n\001x\030\001" + "geType.proto\"\201\005\n\020MessageOfStudent\022\t\n\001x\030\001" " \001(\005\022\t\n\001y\030\002 \001(\005\022\r\n\005speed\030\003 \001(\005\022\025\n\rdeterm" "ination\030\004 \001(\005\022\021\n\taddiction\030\005 \001(\005\022\"\n\032time" "_until_skill_available\030\006 \003(\001\022\"\n\005place\030\007 " "\001(\0162\023.protobuf.PlaceType\022 \n\004prop\030\010 \003(\0162\022" ".protobuf.PropType\022+\n\014player_state\030\t \001(\016" "2\025.protobuf.PlayerState\022\014\n\004guid\030\n \001(\003\022$\n" - "\005state\030\013 \001(\0162\025.protobuf.PlayerState\022\021\n\tp" - "layer_id\030\017 \001(\003\022\022\n\nview_range\030\020 \001(\005\022\016\n\006ra" - "dius\030\021 \001(\005\022\016\n\006damage\030\022 \001(\005\022\024\n\014danger_ale" - "rt\030\023 \001(\001\022\r\n\005score\030\024 \001(\005\022\026\n\016treat_progres" - "s\030\025 \001(\005\022\027\n\017rescue_progress\030\026 \001(\005\022+\n\014stud" - "ent_type\030\027 \001(\0162\025.protobuf.StudentType\022\'\n" - "\004buff\030\030 \003(\0162\031.protobuf.StudentBuffType\"\266" - "\003\n\020MessageOfTricker\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(" - "\005\022\r\n\005speed\030\003 \001(\005\022\016\n\006damage\030\004 \001(\005\022\"\n\032time" - "_until_skill_available\030\005 \003(\001\022\"\n\005place\030\006 " - "\001(\0162\023.protobuf.PlaceType\022 \n\004prop\030\007 \003(\0162\022" - ".protobuf.PropType\022+\n\014tricker_type\030\010 \001(\016" - "2\025.protobuf.TrickerType\022\014\n\004guid\030\t \001(\003\022\017\n" - "\007movable\030\n \001(\010\022\021\n\tplayer_id\030\013 \001(\003\022\022\n\nvie" - "w_range\030\014 \001(\005\022\016\n\006radius\030\r \001(\005\022+\n\014player_" - "state\030\016 \001(\0162\025.protobuf.PlayerState\022\024\n\014tr" - "ick_desire\030\017 \001(\001\022\024\n\014class_volume\030\020 \001(\001\022\'" - "\n\004buff\030\021 \003(\0162\031.protobuf.TrickerBuffType\"" - "\317\001\n\017MessageOfBullet\022\"\n\004type\030\001 \001(\0162\024.prot" - "obuf.BulletType\022\t\n\001x\030\002 \001(\005\022\t\n\001y\030\003 \001(\005\022\030\n" - "\020facing_direction\030\004 \001(\001\022\014\n\004guid\030\005 \001(\003\022\"\n" - "\004team\030\006 \001(\0162\024.protobuf.PlayerType\022\"\n\005pla" - "ce\030\007 \001(\0162\023.protobuf.PlaceType\022\022\n\nbomb_ra" - "nge\030\010 \001(\001\"\223\001\n\025MessageOfBombedBullet\022\"\n\004t" - "ype\030\001 \001(\0162\024.protobuf.BulletType\022\t\n\001x\030\002 \001" + "\005state\030\013 \001(\0162\025.protobuf.PlayerState\022)\n\013b" + "ullet_type\030\014 \001(\0162\024.protobuf.BulletType\022\026" + "\n\016learning_speed\030\r \001(\005\022\023\n\013treat_speed\030\016 " + "\001(\005\022\021\n\tplayer_id\030\017 \001(\003\022\022\n\nview_range\030\020 \001" + "(\005\022\016\n\006radius\030\021 \001(\005\022\024\n\014danger_alert\030\023 \001(\001" + "\022\r\n\005score\030\024 \001(\005\022\026\n\016treat_progress\030\025 \001(\005\022" + "\027\n\017rescue_progress\030\026 \001(\005\022+\n\014student_type" + "\030\027 \001(\0162\025.protobuf.StudentType\022\030\n\020facing_" + "direction\030\030 \001(\001\022\'\n\004buff\030\031 \003(\0162\031.protobuf" + ".StudentBuffType\"\371\003\n\020MessageOfTricker\022\t\n" + "\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\r\n\005speed\030\003 \001(\005\022\016\n\006da" + "mage\030\004 \001(\005\022\"\n\032time_until_skill_available" + "\030\005 \003(\001\022\"\n\005place\030\006 \001(\0162\023.protobuf.PlaceTy" + "pe\022 \n\004prop\030\007 \003(\0162\022.protobuf.PropType\022+\n\014" + "tricker_type\030\010 \001(\0162\025.protobuf.TrickerTyp" + "e\022\014\n\004guid\030\t \001(\003\022\r\n\005score\030\n \001(\005\022\021\n\tplayer" + "_id\030\013 \001(\003\022\022\n\nview_range\030\014 \001(\005\022\016\n\006radius\030" + "\r \001(\005\022+\n\014player_state\030\016 \001(\0162\025.protobuf.P" + "layerState\022\024\n\014trick_desire\030\017 \001(\001\022\024\n\014clas" + "s_volume\030\020 \001(\001\022\030\n\020facing_direction\030\021 \001(\001" + "\022)\n\013bullet_type\030\022 \001(\0162\024.protobuf.BulletT" + "ype\022\'\n\004buff\030\023 \003(\0162\031.protobuf.TrickerBuff" + "Type\"\336\001\n\017MessageOfBullet\022\"\n\004type\030\001 \001(\0162\024" + ".protobuf.BulletType\022\t\n\001x\030\002 \001(\005\022\t\n\001y\030\003 \001" + "(\005\022\030\n\020facing_direction\030\004 \001(\001\022\014\n\004guid\030\005 \001" + "(\003\022\"\n\004team\030\006 \001(\0162\024.protobuf.PlayerType\022\"" + "\n\005place\030\007 \001(\0162\023.protobuf.PlaceType\022\022\n\nbo" + "mb_range\030\010 \001(\001\022\r\n\005speed\030\t \001(\005\"\223\001\n\025Messag" + "eOfBombedBullet\022\"\n\004type\030\001 \001(\0162\024.protobuf" + ".BulletType\022\t\n\001x\030\002 \001(\005\022\t\n\001y\030\003 \001(\005\022\030\n\020fac" + "ing_direction\030\004 \001(\001\022\022\n\nmapping_id\030\005 \001(\003\022" + "\022\n\nbomb_range\030\006 \001(\001\"\264\001\n\rMessageOfProp\022 \n" + "\004type\030\001 \001(\0162\022.protobuf.PropType\022\t\n\001x\030\002 \001" "(\005\022\t\n\001y\030\003 \001(\005\022\030\n\020facing_direction\030\004 \001(\001\022" - "\022\n\nmapping_id\030\005 \001(\003\022\022\n\nbomb_range\030\006 \001(\001\"" - "\264\001\n\rMessageOfProp\022 \n\004type\030\001 \001(\0162\022.protob" - "uf.PropType\022\t\n\001x\030\002 \001(\005\022\t\n\001y\030\003 \001(\005\022\030\n\020fac" - "ing_direction\030\004 \001(\001\022\014\n\004guid\030\005 \001(\003\022\"\n\005pla" - "ce\030\006 \001(\0162\023.protobuf.PlaceType\022\014\n\004size\030\007 " - "\001(\005\022\021\n\tis_moving\030\010 \001(\010\"{\n\023MessageOfPicke" - "dProp\022 \n\004type\030\001 \001(\0162\022.protobuf.PropType\022" - "\t\n\001x\030\002 \001(\005\022\t\n\001y\030\003 \001(\005\022\030\n\020facing_directio" - "n\030\004 \001(\001\022\022\n\nmapping_id\030\005 \001(\003\"<\n\022MessageOf" - "Classroom\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\020\n\010progr" - "ess\030\003 \001(\005\"7\n\rMessageOfGate\022\t\n\001x\030\001 \001(\005\022\t\n" - "\001y\030\002 \001(\005\022\020\n\010progress\030\003 \001(\005\"6\n\rMessageOfD" - "oor\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\017\n\007is_open\030\003 \001" - "(\010\"8\n\016MessageOfChest\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001" - "(\005\022\020\n\010progress\030\003 \001(\005\"`\n\014MessageOfMap\022\'\n\003" - "row\030\002 \003(\0132\032.protobuf.MessageOfMap.Row\032\'\n" - "\003Row\022 \n\003col\030\001 \003(\0162\023.protobuf.PlaceType\"\206" - "\004\n\014MessageOfObj\0225\n\017student_message\030\001 \001(\013" + "\014\n\004guid\030\005 \001(\003\022\"\n\005place\030\006 \001(\0162\023.protobuf." + "PlaceType\022\014\n\004size\030\007 \001(\005\022\021\n\tis_moving\030\010 \001" + "(\010\"{\n\023MessageOfPickedProp\022 \n\004type\030\001 \001(\0162" + "\022.protobuf.PropType\022\t\n\001x\030\002 \001(\005\022\t\n\001y\030\003 \001(" + "\005\022\030\n\020facing_direction\030\004 \001(\001\022\022\n\nmapping_i" + "d\030\005 \001(\003\"<\n\022MessageOfClassroom\022\t\n\001x\030\001 \001(\005" + "\022\t\n\001y\030\002 \001(\005\022\020\n\010progress\030\003 \001(\005\"7\n\rMessage" + "OfGate\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\020\n\010progress" + "\030\003 \001(\005\";\n\023MessageOfHiddenGate\022\t\n\001x\030\001 \001(\005" + "\022\t\n\001y\030\002 \001(\005\022\016\n\006opened\030\003 \001(\010\"F\n\rMessageOf" + "Door\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\017\n\007is_open\030\003 " + "\001(\010\022\016\n\006number\030\004 \001(\005\"8\n\016MessageOfChest\022\t\n" + "\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\020\n\010progress\030\003 \001(\005\"`\n" + "\014MessageOfMap\022\'\n\003row\030\002 \003(\0132\032.protobuf.Me" + "ssageOfMap.Row\032\'\n\003Row\022 \n\003col\030\001 \003(\0162\023.pro" + "tobuf.PlaceType\"=\n\rMessageOfNews\022\014\n\004news" + "\030\001 \001(\t\022\017\n\007from_id\030\002 \001(\003\022\r\n\005to_id\030\003 \001(\003\"\244" + "\005\n\014MessageOfObj\0225\n\017student_message\030\001 \001(\013" "2\032.protobuf.MessageOfStudentH\000\0225\n\017tricke" "r_message\030\002 \001(\0132\032.protobuf.MessageOfTric" "kerH\000\022/\n\014prop_message\030\003 \001(\0132\027.protobuf.M" @@ -747,22 +798,24 @@ const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_ "_message\030\007 \001(\0132\027.protobuf.MessageOfDoorH" "\000\022/\n\014gate_message\030\010 \001(\0132\027.protobuf.Messa" "geOfGateH\000\0221\n\rchest_message\030\t \001(\0132\030.prot" - "obuf.MessageOfChestH\000B\020\n\016message_of_obj\"" - "\350\001\n\014MessageOfAll\022\021\n\tgame_time\030\001 \001(\005\022\024\n\014s" - "ubject_left\030\002 \001(\005\022\031\n\021student_graduated\030\003" - " \001(\005\022\026\n\016student_quited\030\004 \001(\005\022\025\n\rstudent_" - "score\030\005 \001(\005\022\025\n\rtricker_score\030\006 \001(\005\022\023\n\013ga" - "te_opened\030\007 \001(\010\022\035\n\025hidden_gate_refreshed" - "\030\010 \001(\010\022\032\n\022hidden_gate_opened\030\t \001(\010\"\224\001\n\017M" - "essageToClient\022+\n\013obj_message\030\001 \003(\0132\026.pr" - "otobuf.MessageOfObj\022\'\n\ngame_state\030\002 \001(\0162" - "\023.protobuf.GameState\022+\n\013all_message\030\003 \001(" - "\0132\026.protobuf.MessageOfAll\"J\n\007MoveRes\022\024\n\014" - "actual_speed\030\001 \001(\003\022\024\n\014actual_angle\030\002 \001(\001" - "\022\023\n\013act_success\030\003 \001(\010\"\036\n\007BoolRes\022\023\n\013act_" - "success\030\001 \001(\010\"P\n\006MsgRes\022\024\n\014have_message\030" - "\001 \001(\010\022\026\n\016from_player_id\030\002 \001(\003\022\030\n\020message" - "_received\030\003 \001(\tb\006proto3"; + "obuf.MessageOfChestH\000\022<\n\023hidden_gate_mes" + "sage\030\n \001(\0132\035.protobuf.MessageOfHiddenGat" + "eH\000\022/\n\014news_message\030\013 \001(\0132\027.protobuf.Mes" + "sageOfNewsH\000\022-\n\013map_message\030\014 \001(\0132\026.prot" + "obuf.MessageOfMapH\000B\020\n\016message_of_obj\"\350\001" + "\n\014MessageOfAll\022\021\n\tgame_time\030\001 \001(\005\022\024\n\014sub" + "ject_left\030\002 \001(\005\022\031\n\021student_graduated\030\003 \001" + "(\005\022\026\n\016student_quited\030\004 \001(\005\022\025\n\rstudent_sc" + "ore\030\005 \001(\005\022\025\n\rtricker_score\030\006 \001(\005\022\023\n\013gate" + "_opened\030\007 \001(\010\022\035\n\025hidden_gate_refreshed\030\010" + " \001(\010\022\032\n\022hidden_gate_opened\030\t \001(\010\"\224\001\n\017Mes" + "sageToClient\022+\n\013obj_message\030\001 \003(\0132\026.prot" + "obuf.MessageOfObj\022\'\n\ngame_state\030\002 \001(\0162\023." + "protobuf.GameState\022+\n\013all_message\030\003 \001(\0132" + "\026.protobuf.MessageOfAll\"J\n\007MoveRes\022\024\n\014ac" + "tual_speed\030\001 \001(\003\022\024\n\014actual_angle\030\002 \001(\001\022\023" + "\n\013act_success\030\003 \001(\010\"\036\n\007BoolRes\022\023\n\013act_su" + "ccess\030\001 \001(\010b\006proto3"; static const ::_pbi::DescriptorTable* const descriptor_table_Message2Clients_2eproto_deps[1] = { &::descriptor_table_MessageType_2eproto, }; @@ -770,13 +823,13 @@ static ::_pbi::once_flag descriptor_table_Message2Clients_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Message2Clients_2eproto = { false, false, - 3143, + 3539, descriptor_table_protodef_Message2Clients_2eproto, "Message2Clients.proto", &descriptor_table_Message2Clients_2eproto_once, descriptor_table_Message2Clients_2eproto_deps, 1, - 18, + 19, schemas, file_default_instances, TableStruct_Message2Clients_2eproto::offsets, @@ -813,7 +866,7 @@ namespace protobuf MessageOfStudent* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.time_until_skill_available_){from._impl_.time_until_skill_available_}, decltype(_impl_.prop_){from._impl_.prop_}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){from._impl_.buff_}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.speed_){}, decltype(_impl_.determination_){}, decltype(_impl_.addiction_){}, decltype(_impl_.place_){}, decltype(_impl_.guid_){}, decltype(_impl_.player_state_){}, decltype(_impl_.state_){}, decltype(_impl_.player_id_){}, decltype(_impl_.view_range_){}, decltype(_impl_.radius_){}, decltype(_impl_.danger_alert_){}, decltype(_impl_.damage_){}, decltype(_impl_.score_){}, decltype(_impl_.treat_progress_){}, decltype(_impl_.rescue_progress_){}, decltype(_impl_.student_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.time_until_skill_available_){from._impl_.time_until_skill_available_}, decltype(_impl_.prop_){from._impl_.prop_}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){from._impl_.buff_}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.speed_){}, decltype(_impl_.determination_){}, decltype(_impl_.addiction_){}, decltype(_impl_.place_){}, decltype(_impl_.guid_){}, decltype(_impl_.player_state_){}, decltype(_impl_.state_){}, decltype(_impl_.bullet_type_){}, decltype(_impl_.learning_speed_){}, decltype(_impl_.player_id_){}, decltype(_impl_.treat_speed_){}, decltype(_impl_.view_range_){}, decltype(_impl_.radius_){}, decltype(_impl_.score_){}, decltype(_impl_.danger_alert_){}, decltype(_impl_.treat_progress_){}, decltype(_impl_.rescue_progress_){}, decltype(_impl_.facing_direction_){}, decltype(_impl_.student_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.student_type_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.student_type_)); @@ -827,7 +880,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.time_until_skill_available_){arena}, decltype(_impl_.prop_){arena}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){arena}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.speed_){0}, decltype(_impl_.determination_){0}, decltype(_impl_.addiction_){0}, decltype(_impl_.place_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.player_state_){0}, decltype(_impl_.state_){0}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.view_range_){0}, decltype(_impl_.radius_){0}, decltype(_impl_.danger_alert_){0}, decltype(_impl_.damage_){0}, decltype(_impl_.score_){0}, decltype(_impl_.treat_progress_){0}, decltype(_impl_.rescue_progress_){0}, decltype(_impl_.student_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.time_until_skill_available_){arena}, decltype(_impl_.prop_){arena}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){arena}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.speed_){0}, decltype(_impl_.determination_){0}, decltype(_impl_.addiction_){0}, decltype(_impl_.place_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.player_state_){0}, decltype(_impl_.state_){0}, decltype(_impl_.bullet_type_){0}, decltype(_impl_.learning_speed_){0}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.treat_speed_){0}, decltype(_impl_.view_range_){0}, decltype(_impl_.radius_){0}, decltype(_impl_.score_){0}, decltype(_impl_.danger_alert_){0}, decltype(_impl_.treat_progress_){0}, decltype(_impl_.rescue_progress_){0}, decltype(_impl_.facing_direction_){0}, decltype(_impl_.student_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } MessageOfStudent::~MessageOfStudent() @@ -1003,6 +1056,37 @@ namespace protobuf else goto handle_unusual; continue; + // .protobuf.BulletType bullet_type = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) + { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_bullet_type(static_cast<::protobuf::BulletType>(val)); + } + else + goto handle_unusual; + continue; + // int32 learning_speed = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) + { + _impl_.learning_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // int32 treat_speed = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) + { + _impl_.treat_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; // int64 player_id = 15; case 15: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) @@ -1033,16 +1117,6 @@ namespace protobuf else goto handle_unusual; continue; - // int32 damage = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) - { - _impl_.damage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; // double danger_alert = 19; case 19: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 153)) @@ -1094,14 +1168,24 @@ namespace protobuf else goto handle_unusual; continue; - // repeated .protobuf.StudentBuffType buff = 24; + // double facing_direction = 24; case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 194)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 193)) + { + _impl_.facing_direction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(double); + } + else + goto handle_unusual; + continue; + // repeated .protobuf.StudentBuffType buff = 25; + case 25: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 202)) { ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_buff(), ptr, ctx); CHK_(ptr); } - else if (static_cast(tag) == 192) + else if (static_cast(tag) == 200) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); @@ -1230,6 +1314,29 @@ namespace protobuf ); } + // .protobuf.BulletType bullet_type = 12; + if (this->_internal_bullet_type() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 12, this->_internal_bullet_type(), target + ); + } + + // int32 learning_speed = 13; + if (this->_internal_learning_speed() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_learning_speed(), target); + } + + // int32 treat_speed = 14; + if (this->_internal_treat_speed() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_treat_speed(), target); + } + // int64 player_id = 15; if (this->_internal_player_id() != 0) { @@ -1251,13 +1358,6 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt32ToArray(17, this->_internal_radius(), target); } - // int32 damage = 18; - if (this->_internal_damage() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(18, this->_internal_damage(), target); - } - // double danger_alert = 19; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_danger_alert = this->_internal_danger_alert(); @@ -1299,13 +1399,24 @@ namespace protobuf ); } - // repeated .protobuf.StudentBuffType buff = 24; + // double facing_direction = 24; + static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); + double tmp_facing_direction = this->_internal_facing_direction(); + uint64_t raw_facing_direction; + memcpy(&raw_facing_direction, &tmp_facing_direction, sizeof(tmp_facing_direction)); + if (raw_facing_direction != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(24, this->_internal_facing_direction(), target); + } + + // repeated .protobuf.StudentBuffType buff = 25; { int byte_size = _impl_._buff_cached_byte_size_.load(std::memory_order_relaxed); if (byte_size > 0) { target = stream->WriteEnumPacked( - 24, _impl_.buff_, byte_size, target + 25, _impl_.buff_, byte_size, target ); } } @@ -1361,7 +1472,7 @@ namespace protobuf total_size += data_size; } - // repeated .protobuf.StudentBuffType buff = 24; + // repeated .protobuf.StudentBuffType buff = 25; { size_t data_size = 0; unsigned int count = static_cast(this->_internal_buff_size()); @@ -1438,12 +1549,31 @@ namespace protobuf ::_pbi::WireFormatLite::EnumSize(this->_internal_state()); } + // .protobuf.BulletType bullet_type = 12; + if (this->_internal_bullet_type() != 0) + { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_bullet_type()); + } + + // int32 learning_speed = 13; + if (this->_internal_learning_speed() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_learning_speed()); + } + // int64 player_id = 15; if (this->_internal_player_id() != 0) { total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } + // int32 treat_speed = 14; + if (this->_internal_treat_speed() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_treat_speed()); + } + // int32 view_range = 16; if (this->_internal_view_range() != 0) { @@ -1462,6 +1592,15 @@ namespace protobuf ); } + // int32 score = 20; + if (this->_internal_score() != 0) + { + total_size += 2 + + ::_pbi::WireFormatLite::Int32Size( + this->_internal_score() + ); + } + // double danger_alert = 19; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_danger_alert = this->_internal_danger_alert(); @@ -1472,24 +1611,6 @@ namespace protobuf total_size += 2 + 8; } - // int32 damage = 18; - if (this->_internal_damage() != 0) - { - total_size += 2 + - ::_pbi::WireFormatLite::Int32Size( - this->_internal_damage() - ); - } - - // int32 score = 20; - if (this->_internal_score() != 0) - { - total_size += 2 + - ::_pbi::WireFormatLite::Int32Size( - this->_internal_score() - ); - } - // int32 treat_progress = 21; if (this->_internal_treat_progress() != 0) { @@ -1508,6 +1629,16 @@ namespace protobuf ); } + // double facing_direction = 24; + static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); + double tmp_facing_direction = this->_internal_facing_direction(); + uint64_t raw_facing_direction; + memcpy(&raw_facing_direction, &tmp_facing_direction, sizeof(tmp_facing_direction)); + if (raw_facing_direction != 0) + { + total_size += 2 + 8; + } + // .protobuf.StudentType student_type = 23; if (this->_internal_student_type() != 0) { @@ -1574,10 +1705,22 @@ namespace protobuf { _this->_internal_set_state(from._internal_state()); } + if (from._internal_bullet_type() != 0) + { + _this->_internal_set_bullet_type(from._internal_bullet_type()); + } + if (from._internal_learning_speed() != 0) + { + _this->_internal_set_learning_speed(from._internal_learning_speed()); + } if (from._internal_player_id() != 0) { _this->_internal_set_player_id(from._internal_player_id()); } + if (from._internal_treat_speed() != 0) + { + _this->_internal_set_treat_speed(from._internal_treat_speed()); + } if (from._internal_view_range() != 0) { _this->_internal_set_view_range(from._internal_view_range()); @@ -1586,6 +1729,10 @@ namespace protobuf { _this->_internal_set_radius(from._internal_radius()); } + if (from._internal_score() != 0) + { + _this->_internal_set_score(from._internal_score()); + } static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_danger_alert = from._internal_danger_alert(); uint64_t raw_danger_alert; @@ -1594,14 +1741,6 @@ namespace protobuf { _this->_internal_set_danger_alert(from._internal_danger_alert()); } - if (from._internal_damage() != 0) - { - _this->_internal_set_damage(from._internal_damage()); - } - if (from._internal_score() != 0) - { - _this->_internal_set_score(from._internal_score()); - } if (from._internal_treat_progress() != 0) { _this->_internal_set_treat_progress(from._internal_treat_progress()); @@ -1610,6 +1749,14 @@ namespace protobuf { _this->_internal_set_rescue_progress(from._internal_rescue_progress()); } + static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); + double tmp_facing_direction = from._internal_facing_direction(); + uint64_t raw_facing_direction; + memcpy(&raw_facing_direction, &tmp_facing_direction, sizeof(tmp_facing_direction)); + if (raw_facing_direction != 0) + { + _this->_internal_set_facing_direction(from._internal_facing_direction()); + } if (from._internal_student_type() != 0) { _this->_internal_set_student_type(from._internal_student_type()); @@ -1671,10 +1818,10 @@ namespace protobuf MessageOfTricker* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.time_until_skill_available_){from._impl_.time_until_skill_available_}, decltype(_impl_.prop_){from._impl_.prop_}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){from._impl_.buff_}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.speed_){}, decltype(_impl_.damage_){}, decltype(_impl_.place_){}, decltype(_impl_.tricker_type_){}, decltype(_impl_.guid_){}, decltype(_impl_.player_id_){}, decltype(_impl_.movable_){}, decltype(_impl_.view_range_){}, decltype(_impl_.radius_){}, decltype(_impl_.player_state_){}, decltype(_impl_.trick_desire_){}, decltype(_impl_.class_volume_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.time_until_skill_available_){from._impl_.time_until_skill_available_}, decltype(_impl_.prop_){from._impl_.prop_}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){from._impl_.buff_}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.speed_){}, decltype(_impl_.damage_){}, decltype(_impl_.place_){}, decltype(_impl_.tricker_type_){}, decltype(_impl_.guid_){}, decltype(_impl_.player_id_){}, decltype(_impl_.score_){}, decltype(_impl_.view_range_){}, decltype(_impl_.radius_){}, decltype(_impl_.player_state_){}, decltype(_impl_.trick_desire_){}, decltype(_impl_.class_volume_){}, decltype(_impl_.facing_direction_){}, decltype(_impl_.bullet_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.class_volume_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.class_volume_)); + ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.bullet_type_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.bullet_type_)); // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfTricker) } @@ -1685,7 +1832,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.time_until_skill_available_){arena}, decltype(_impl_.prop_){arena}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){arena}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.speed_){0}, decltype(_impl_.damage_){0}, decltype(_impl_.place_){0}, decltype(_impl_.tricker_type_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.movable_){false}, decltype(_impl_.view_range_){0}, decltype(_impl_.radius_){0}, decltype(_impl_.player_state_){0}, decltype(_impl_.trick_desire_){0}, decltype(_impl_.class_volume_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.time_until_skill_available_){arena}, decltype(_impl_.prop_){arena}, /*decltype(_impl_._prop_cached_byte_size_)*/ {0}, decltype(_impl_.buff_){arena}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.speed_){0}, decltype(_impl_.damage_){0}, decltype(_impl_.place_){0}, decltype(_impl_.tricker_type_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.score_){0}, decltype(_impl_.view_range_){0}, decltype(_impl_.radius_){0}, decltype(_impl_.player_state_){0}, decltype(_impl_.trick_desire_){0}, decltype(_impl_.class_volume_){0}, decltype(_impl_.facing_direction_){0}, decltype(_impl_.bullet_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } MessageOfTricker::~MessageOfTricker() @@ -1722,7 +1869,7 @@ namespace protobuf _impl_.time_until_skill_available_.Clear(); _impl_.prop_.Clear(); _impl_.buff_.Clear(); - ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.class_volume_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.class_volume_)); + ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.bullet_type_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.bullet_type_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1840,11 +1987,11 @@ namespace protobuf else goto handle_unusual; continue; - // bool movable = 10; + // int32 score = 10; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { - _impl_.movable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.score_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else @@ -1911,14 +2058,35 @@ namespace protobuf else goto handle_unusual; continue; - // repeated .protobuf.TrickerBuffType buff = 17; + // double facing_direction = 17; case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 138)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 137)) + { + _impl_.facing_direction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(double); + } + else + goto handle_unusual; + continue; + // .protobuf.BulletType bullet_type = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) + { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_bullet_type(static_cast<::protobuf::BulletType>(val)); + } + else + goto handle_unusual; + continue; + // repeated .protobuf.TrickerBuffType buff = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 154)) { ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_buff(), ptr, ctx); CHK_(ptr); } - else if (static_cast(tag) == 136) + else if (static_cast(tag) == 152) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); @@ -2031,11 +2199,11 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(9, this->_internal_guid(), target); } - // bool movable = 10; - if (this->_internal_movable() != 0) + // int32 score = 10; + if (this->_internal_score() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_movable(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_score(), target); } // int64 player_id = 11; @@ -2090,13 +2258,33 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteDoubleToArray(16, this->_internal_class_volume(), target); } - // repeated .protobuf.TrickerBuffType buff = 17; + // double facing_direction = 17; + static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); + double tmp_facing_direction = this->_internal_facing_direction(); + uint64_t raw_facing_direction; + memcpy(&raw_facing_direction, &tmp_facing_direction, sizeof(tmp_facing_direction)); + if (raw_facing_direction != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(17, this->_internal_facing_direction(), target); + } + + // .protobuf.BulletType bullet_type = 18; + if (this->_internal_bullet_type() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 18, this->_internal_bullet_type(), target + ); + } + + // repeated .protobuf.TrickerBuffType buff = 19; { int byte_size = _impl_._buff_cached_byte_size_.load(std::memory_order_relaxed); if (byte_size > 0) { target = stream->WriteEnumPacked( - 17, _impl_.buff_, byte_size, target + 19, _impl_.buff_, byte_size, target ); } } @@ -2152,7 +2340,7 @@ namespace protobuf total_size += data_size; } - // repeated .protobuf.TrickerBuffType buff = 17; + // repeated .protobuf.TrickerBuffType buff = 19; { size_t data_size = 0; unsigned int count = static_cast(this->_internal_buff_size()); @@ -2222,10 +2410,10 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // bool movable = 10; - if (this->_internal_movable() != 0) + // int32 score = 10; + if (this->_internal_score() != 0) { - total_size += 1 + 1; + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_score()); } // int32 view_range = 12; @@ -2267,6 +2455,23 @@ namespace protobuf total_size += 2 + 8; } + // double facing_direction = 17; + static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); + double tmp_facing_direction = this->_internal_facing_direction(); + uint64_t raw_facing_direction; + memcpy(&raw_facing_direction, &tmp_facing_direction, sizeof(tmp_facing_direction)); + if (raw_facing_direction != 0) + { + total_size += 2 + 8; + } + + // .protobuf.BulletType bullet_type = 18; + if (this->_internal_bullet_type() != 0) + { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_bullet_type()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -2322,9 +2527,9 @@ namespace protobuf { _this->_internal_set_player_id(from._internal_player_id()); } - if (from._internal_movable() != 0) + if (from._internal_score() != 0) { - _this->_internal_set_movable(from._internal_movable()); + _this->_internal_set_score(from._internal_score()); } if (from._internal_view_range() != 0) { @@ -2354,9 +2559,21 @@ namespace protobuf { _this->_internal_set_class_volume(from._internal_class_volume()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - } - + static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); + double tmp_facing_direction = from._internal_facing_direction(); + uint64_t raw_facing_direction; + memcpy(&raw_facing_direction, &tmp_facing_direction, sizeof(tmp_facing_direction)); + if (raw_facing_direction != 0) + { + _this->_internal_set_facing_direction(from._internal_facing_direction()); + } + if (from._internal_bullet_type() != 0) + { + _this->_internal_set_bullet_type(from._internal_bullet_type()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + } + void MessageOfTricker::CopyFrom(const MessageOfTricker& from) { // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfTricker) @@ -2379,7 +2596,7 @@ namespace protobuf _impl_.prop_.InternalSwap(&other->_impl_.prop_); _impl_.buff_.InternalSwap(&other->_impl_.buff_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MessageOfTricker, _impl_.class_volume_) + sizeof(MessageOfTricker::_impl_.class_volume_) - PROTOBUF_FIELD_OFFSET(MessageOfTricker, _impl_.x_)>( + PROTOBUF_FIELD_OFFSET(MessageOfTricker, _impl_.bullet_type_) + sizeof(MessageOfTricker::_impl_.bullet_type_) - PROTOBUF_FIELD_OFFSET(MessageOfTricker, _impl_.x_)>( reinterpret_cast(&_impl_.x_), reinterpret_cast(&other->_impl_.x_) ); @@ -2411,10 +2628,10 @@ namespace protobuf MessageOfBullet* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.type_){}, decltype(_impl_.x_){}, decltype(_impl_.facing_direction_){}, decltype(_impl_.y_){}, decltype(_impl_.team_){}, decltype(_impl_.guid_){}, decltype(_impl_.bomb_range_){}, decltype(_impl_.place_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.type_){}, decltype(_impl_.x_){}, decltype(_impl_.facing_direction_){}, decltype(_impl_.y_){}, decltype(_impl_.team_){}, decltype(_impl_.guid_){}, decltype(_impl_.bomb_range_){}, decltype(_impl_.place_){}, decltype(_impl_.speed_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.type_, &from._impl_.type_, static_cast(reinterpret_cast(&_impl_.place_) - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.place_)); + ::memcpy(&_impl_.type_, &from._impl_.type_, static_cast(reinterpret_cast(&_impl_.speed_) - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.speed_)); // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfBullet) } @@ -2425,7 +2642,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.type_){0}, decltype(_impl_.x_){0}, decltype(_impl_.facing_direction_){0}, decltype(_impl_.y_){0}, decltype(_impl_.team_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.bomb_range_){0}, decltype(_impl_.place_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.type_){0}, decltype(_impl_.x_){0}, decltype(_impl_.facing_direction_){0}, decltype(_impl_.y_){0}, decltype(_impl_.team_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.bomb_range_){0}, decltype(_impl_.place_){0}, decltype(_impl_.speed_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } MessageOfBullet::~MessageOfBullet() @@ -2456,7 +2673,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.type_, 0, static_cast(reinterpret_cast(&_impl_.place_) - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.place_)); + ::memset(&_impl_.type_, 0, static_cast(reinterpret_cast(&_impl_.speed_) - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.speed_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2554,6 +2771,16 @@ namespace protobuf else goto handle_unusual; continue; + // int32 speed = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) + { + _impl_.speed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2658,6 +2885,13 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteDoubleToArray(8, this->_internal_bomb_range(), target); } + // int32 speed = 9; + if (this->_internal_speed() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_speed(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -2736,6 +2970,12 @@ namespace protobuf ::_pbi::WireFormatLite::EnumSize(this->_internal_place()); } + // int32 speed = 9; + if (this->_internal_speed() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_speed()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -2796,6 +3036,10 @@ namespace protobuf { _this->_internal_set_place(from._internal_place()); } + if (from._internal_speed() != 0) + { + _this->_internal_set_speed(from._internal_speed()); + } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2818,7 +3062,7 @@ namespace protobuf using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MessageOfBullet, _impl_.place_) + sizeof(MessageOfBullet::_impl_.place_) - PROTOBUF_FIELD_OFFSET(MessageOfBullet, _impl_.type_)>( + PROTOBUF_FIELD_OFFSET(MessageOfBullet, _impl_.speed_) + sizeof(MessageOfBullet::_impl_.speed_) - PROTOBUF_FIELD_OFFSET(MessageOfBullet, _impl_.type_)>( reinterpret_cast(&_impl_.type_), reinterpret_cast(&other->_impl_.type_) ); @@ -4507,43 +4751,43 @@ namespace protobuf // =================================================================== - class MessageOfDoor::_Internal + class MessageOfHiddenGate::_Internal { public: }; - MessageOfDoor::MessageOfDoor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + MessageOfHiddenGate::MessageOfHiddenGate(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfDoor) + // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfHiddenGate) } - MessageOfDoor::MessageOfDoor(const MessageOfDoor& from) : + MessageOfHiddenGate::MessageOfHiddenGate(const MessageOfHiddenGate& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - MessageOfDoor* const _this = this; + MessageOfHiddenGate* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.is_open_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.opened_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.is_open_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.is_open_)); - // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfDoor) + ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.opened_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.opened_)); + // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfHiddenGate) } - inline void MessageOfDoor::SharedCtor( + inline void MessageOfHiddenGate::SharedCtor( ::_pb::Arena* arena, bool is_message_owned ) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.is_open_){false}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.opened_){false}, /*decltype(_impl_._cached_size_)*/ {}}; } - MessageOfDoor::~MessageOfDoor() + MessageOfHiddenGate::~MessageOfHiddenGate() { - // @@protoc_insertion_point(destructor:protobuf.MessageOfDoor) + // @@protoc_insertion_point(destructor:protobuf.MessageOfHiddenGate) if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; @@ -4552,28 +4796,28 @@ namespace protobuf SharedDtor(); } - inline void MessageOfDoor::SharedDtor() + inline void MessageOfHiddenGate::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } - void MessageOfDoor::SetCachedSize(int size) const + void MessageOfHiddenGate::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } - void MessageOfDoor::Clear() + void MessageOfHiddenGate::Clear() { - // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfDoor) + // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfHiddenGate) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.is_open_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.is_open_)); + ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.opened_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.opened_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - const char* MessageOfDoor::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) + const char* MessageOfHiddenGate::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) \ if (PROTOBUF_PREDICT_FALSE(!(x))) \ @@ -4604,11 +4848,11 @@ namespace protobuf else goto handle_unusual; continue; - // bool is_open = 3; + // bool opened = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.is_open_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.opened_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else @@ -4640,11 +4884,11 @@ namespace protobuf #undef CHK_ } - uint8_t* MessageOfDoor::_InternalSerialize( + uint8_t* MessageOfHiddenGate::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream ) const { - // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfDoor) + // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfHiddenGate) uint32_t cached_has_bits = 0; (void)cached_has_bits; @@ -4662,11 +4906,11 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_y(), target); } - // bool is_open = 3; - if (this->_internal_is_open() != 0) + // bool opened = 3; + if (this->_internal_opened() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_is_open(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_opened(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -4675,13 +4919,13 @@ namespace protobuf _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream ); } - // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfDoor) + // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfHiddenGate) return target; } - size_t MessageOfDoor::ByteSizeLong() const + size_t MessageOfHiddenGate::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfDoor) + // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfHiddenGate) size_t total_size = 0; uint32_t cached_has_bits = 0; @@ -4700,8 +4944,8 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_y()); } - // bool is_open = 3; - if (this->_internal_is_open() != 0) + // bool opened = 3; + if (this->_internal_opened() != 0) { total_size += 1 + 1; } @@ -4709,19 +4953,19 @@ namespace protobuf return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfDoor::_class_data_ = { + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfHiddenGate::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - MessageOfDoor::MergeImpl}; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfDoor::GetClassData() const + MessageOfHiddenGate::MergeImpl}; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfHiddenGate::GetClassData() const { return &_class_data_; } - void MessageOfDoor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) + void MessageOfHiddenGate::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfDoor) + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfHiddenGate) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void)cached_has_bits; @@ -4734,39 +4978,39 @@ namespace protobuf { _this->_internal_set_y(from._internal_y()); } - if (from._internal_is_open() != 0) + if (from._internal_opened() != 0) { - _this->_internal_set_is_open(from._internal_is_open()); + _this->_internal_set_opened(from._internal_opened()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } - void MessageOfDoor::CopyFrom(const MessageOfDoor& from) + void MessageOfHiddenGate::CopyFrom(const MessageOfHiddenGate& from) { - // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfDoor) + // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfHiddenGate) if (&from == this) return; Clear(); MergeFrom(from); } - bool MessageOfDoor::IsInitialized() const + bool MessageOfHiddenGate::IsInitialized() const { return true; } - void MessageOfDoor::InternalSwap(MessageOfDoor* other) + void MessageOfHiddenGate::InternalSwap(MessageOfHiddenGate* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MessageOfDoor, _impl_.is_open_) + sizeof(MessageOfDoor::_impl_.is_open_) - PROTOBUF_FIELD_OFFSET(MessageOfDoor, _impl_.x_)>( + PROTOBUF_FIELD_OFFSET(MessageOfHiddenGate, _impl_.opened_) + sizeof(MessageOfHiddenGate::_impl_.opened_) - PROTOBUF_FIELD_OFFSET(MessageOfHiddenGate, _impl_.x_)>( reinterpret_cast(&_impl_.x_), reinterpret_cast(&other->_impl_.x_) ); } - ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfDoor::GetMetadata() const + ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfHiddenGate::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[8] @@ -4775,43 +5019,43 @@ namespace protobuf // =================================================================== - class MessageOfChest::_Internal + class MessageOfDoor::_Internal { public: }; - MessageOfChest::MessageOfChest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + MessageOfDoor::MessageOfDoor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfChest) + // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfDoor) } - MessageOfChest::MessageOfChest(const MessageOfChest& from) : + MessageOfDoor::MessageOfDoor(const MessageOfDoor& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - MessageOfChest* const _this = this; + MessageOfDoor* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.progress_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.is_open_){}, decltype(_impl_.number_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.progress_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.progress_)); - // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfChest) + ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.number_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.number_)); + // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfDoor) } - inline void MessageOfChest::SharedCtor( + inline void MessageOfDoor::SharedCtor( ::_pb::Arena* arena, bool is_message_owned ) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.progress_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.is_open_){false}, decltype(_impl_.number_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } - MessageOfChest::~MessageOfChest() + MessageOfDoor::~MessageOfDoor() { - // @@protoc_insertion_point(destructor:protobuf.MessageOfChest) + // @@protoc_insertion_point(destructor:protobuf.MessageOfDoor) if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; @@ -4820,28 +5064,28 @@ namespace protobuf SharedDtor(); } - inline void MessageOfChest::SharedDtor() + inline void MessageOfDoor::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } - void MessageOfChest::SetCachedSize(int size) const + void MessageOfDoor::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } - void MessageOfChest::Clear() + void MessageOfDoor::Clear() { - // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfChest) + // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfDoor) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.progress_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.progress_)); + ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.number_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.number_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - const char* MessageOfChest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) + const char* MessageOfDoor::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) \ if (PROTOBUF_PREDICT_FALSE(!(x))) \ @@ -4872,11 +5116,21 @@ namespace protobuf else goto handle_unusual; continue; - // int32 progress = 3; + // bool is_open = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.progress_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _impl_.is_open_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // int32 number = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) + { + _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else @@ -4908,11 +5162,11 @@ namespace protobuf #undef CHK_ } - uint8_t* MessageOfChest::_InternalSerialize( + uint8_t* MessageOfDoor::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream ) const { - // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfChest) + // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfDoor) uint32_t cached_has_bits = 0; (void)cached_has_bits; @@ -4930,11 +5184,18 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_y(), target); } - // int32 progress = 3; - if (this->_internal_progress() != 0) + // bool is_open = 3; + if (this->_internal_is_open() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_progress(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_is_open(), target); + } + + // int32 number = 4; + if (this->_internal_number() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_number(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -4943,13 +5204,13 @@ namespace protobuf _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream ); } - // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfChest) + // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfDoor) return target; } - size_t MessageOfChest::ByteSizeLong() const + size_t MessageOfDoor::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfChest) + // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfDoor) size_t total_size = 0; uint32_t cached_has_bits = 0; @@ -4968,28 +5229,34 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_y()); } - // int32 progress = 3; - if (this->_internal_progress() != 0) + // bool is_open = 3; + if (this->_internal_is_open() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_progress()); + total_size += 1 + 1; + } + + // int32 number = 4; + if (this->_internal_number() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_number()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfChest::_class_data_ = { + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfDoor::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - MessageOfChest::MergeImpl}; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfChest::GetClassData() const + MessageOfDoor::MergeImpl}; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfDoor::GetClassData() const { return &_class_data_; } - void MessageOfChest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) + void MessageOfDoor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfChest) + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfDoor) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void)cached_has_bits; @@ -5002,39 +5269,43 @@ namespace protobuf { _this->_internal_set_y(from._internal_y()); } - if (from._internal_progress() != 0) + if (from._internal_is_open() != 0) { - _this->_internal_set_progress(from._internal_progress()); + _this->_internal_set_is_open(from._internal_is_open()); + } + if (from._internal_number() != 0) + { + _this->_internal_set_number(from._internal_number()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } - void MessageOfChest::CopyFrom(const MessageOfChest& from) + void MessageOfDoor::CopyFrom(const MessageOfDoor& from) { - // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfChest) + // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfDoor) if (&from == this) return; Clear(); MergeFrom(from); } - bool MessageOfChest::IsInitialized() const + bool MessageOfDoor::IsInitialized() const { return true; } - void MessageOfChest::InternalSwap(MessageOfChest* other) + void MessageOfDoor::InternalSwap(MessageOfDoor* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MessageOfChest, _impl_.progress_) + sizeof(MessageOfChest::_impl_.progress_) - PROTOBUF_FIELD_OFFSET(MessageOfChest, _impl_.x_)>( + PROTOBUF_FIELD_OFFSET(MessageOfDoor, _impl_.number_) + sizeof(MessageOfDoor::_impl_.number_) - PROTOBUF_FIELD_OFFSET(MessageOfDoor, _impl_.x_)>( reinterpret_cast(&_impl_.x_), reinterpret_cast(&other->_impl_.x_) ); } - ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfChest::GetMetadata() const + ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfDoor::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[9] @@ -5043,42 +5314,43 @@ namespace protobuf // =================================================================== - class MessageOfMap_Row::_Internal + class MessageOfChest::_Internal { public: }; - MessageOfMap_Row::MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + MessageOfChest::MessageOfChest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfMap.Row) + // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfChest) } - MessageOfMap_Row::MessageOfMap_Row(const MessageOfMap_Row& from) : + MessageOfChest::MessageOfChest(const MessageOfChest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - MessageOfMap_Row* const _this = this; + MessageOfChest* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.col_){from._impl_.col_}, /*decltype(_impl_._col_cached_byte_size_)*/ {0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.progress_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfMap.Row) + ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.progress_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.progress_)); + // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfChest) } - inline void MessageOfMap_Row::SharedCtor( + inline void MessageOfChest::SharedCtor( ::_pb::Arena* arena, bool is_message_owned ) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.col_){arena}, /*decltype(_impl_._col_cached_byte_size_)*/ {0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.progress_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } - MessageOfMap_Row::~MessageOfMap_Row() + MessageOfChest::~MessageOfChest() { - // @@protoc_insertion_point(destructor:protobuf.MessageOfMap.Row) + // @@protoc_insertion_point(destructor:protobuf.MessageOfChest) if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; @@ -5087,29 +5359,28 @@ namespace protobuf SharedDtor(); } - inline void MessageOfMap_Row::SharedDtor() + inline void MessageOfChest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.col_.~RepeatedField(); } - void MessageOfMap_Row::SetCachedSize(int size) const + void MessageOfChest::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } - void MessageOfMap_Row::Clear() + void MessageOfChest::Clear() { - // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfMap.Row) + // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfChest) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - _impl_.col_.Clear(); + ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.progress_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.progress_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - const char* MessageOfMap_Row::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) + const char* MessageOfChest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) \ if (PROTOBUF_PREDICT_FALSE(!(x))) \ @@ -5120,18 +5391,32 @@ namespace protobuf ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // repeated .protobuf.PlaceType col = 1; + // int32 x = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_col(), ptr, ctx); + _impl_.x_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } - else if (static_cast(tag) == 8) + else + goto handle_unusual; + continue; + // int32 y = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.y_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // int32 progress = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) + { + _impl_.progress_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); - _internal_add_col(static_cast<::protobuf::PlaceType>(val)); } else goto handle_unusual; @@ -5162,23 +5447,277 @@ namespace protobuf #undef CHK_ } - uint8_t* MessageOfMap_Row::_InternalSerialize( + uint8_t* MessageOfChest::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream ) const { - // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfMap.Row) + // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfChest) uint32_t cached_has_bits = 0; (void)cached_has_bits; - // repeated .protobuf.PlaceType col = 1; + // int32 x = 1; + if (this->_internal_x() != 0) { - int byte_size = _impl_._col_cached_byte_size_.load(std::memory_order_relaxed); - if (byte_size > 0) - { - target = stream->WriteEnumPacked( - 1, _impl_.col_, byte_size, target - ); - } + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_x(), target); + } + + // int32 y = 2; + if (this->_internal_y() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_y(), target); + } + + // int32 progress = 3; + if (this->_internal_progress() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_progress(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) + { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream + ); + } + // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfChest) + return target; + } + + size_t MessageOfChest::ByteSizeLong() const + { + // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfChest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + // int32 x = 1; + if (this->_internal_x() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_x()); + } + + // int32 y = 2; + if (this->_internal_y() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_y()); + } + + // int32 progress = 3; + if (this->_internal_progress() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_progress()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); + } + + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfChest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + MessageOfChest::MergeImpl}; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfChest::GetClassData() const + { + return &_class_data_; + } + + void MessageOfChest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) + { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfChest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + if (from._internal_x() != 0) + { + _this->_internal_set_x(from._internal_x()); + } + if (from._internal_y() != 0) + { + _this->_internal_set_y(from._internal_y()); + } + if (from._internal_progress() != 0) + { + _this->_internal_set_progress(from._internal_progress()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + } + + void MessageOfChest::CopyFrom(const MessageOfChest& from) + { + // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfChest) + if (&from == this) + return; + Clear(); + MergeFrom(from); + } + + bool MessageOfChest::IsInitialized() const + { + return true; + } + + void MessageOfChest::InternalSwap(MessageOfChest* other) + { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(MessageOfChest, _impl_.progress_) + sizeof(MessageOfChest::_impl_.progress_) - PROTOBUF_FIELD_OFFSET(MessageOfChest, _impl_.x_)>( + reinterpret_cast(&_impl_.x_), + reinterpret_cast(&other->_impl_.x_) + ); + } + + ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfChest::GetMetadata() const + { + return ::_pbi::AssignDescriptors( + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[10] + ); + } + + // =================================================================== + + class MessageOfMap_Row::_Internal + { + public: + }; + + MessageOfMap_Row::MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) + { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfMap.Row) + } + MessageOfMap_Row::MessageOfMap_Row(const MessageOfMap_Row& from) : + ::PROTOBUF_NAMESPACE_ID::Message() + { + MessageOfMap_Row* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.col_){from._impl_.col_}, /*decltype(_impl_._col_cached_byte_size_)*/ {0}, /*decltype(_impl_._cached_size_)*/ {}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfMap.Row) + } + + inline void MessageOfMap_Row::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned + ) + { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.col_){arena}, /*decltype(_impl_._col_cached_byte_size_)*/ {0}, /*decltype(_impl_._cached_size_)*/ {}}; + } + + MessageOfMap_Row::~MessageOfMap_Row() + { + // @@protoc_insertion_point(destructor:protobuf.MessageOfMap.Row) + if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) + { + (void)arena; + return; + } + SharedDtor(); + } + + inline void MessageOfMap_Row::SharedDtor() + { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.col_.~RepeatedField(); + } + + void MessageOfMap_Row::SetCachedSize(int size) const + { + _impl_._cached_size_.Set(size); + } + + void MessageOfMap_Row::Clear() + { + // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfMap.Row) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + _impl_.col_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + const char* MessageOfMap_Row::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) + { +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) \ + goto failure + while (!ctx->Done(&ptr)) + { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) + { + // repeated .protobuf.PlaceType col = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) + { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_col(), ptr, ctx); + CHK_(ptr); + } + else if (static_cast(tag) == 8) + { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_add_col(static_cast<::protobuf::PlaceType>(val)); + } + else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) + { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, + ctx + ); + CHK_(ptr != nullptr); + } // while + message_done: + return ptr; + failure: + ptr = nullptr; + goto message_done; +#undef CHK_ + } + + uint8_t* MessageOfMap_Row::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream + ) const + { + // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfMap.Row) + uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .protobuf.PlaceType col = 1; + { + int byte_size = _impl_._col_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) + { + target = stream->WriteEnumPacked( + 1, _impl_.col_, byte_size, target + ); + } } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -5258,58 +5797,291 @@ namespace protobuf return true; } - void MessageOfMap_Row::InternalSwap(MessageOfMap_Row* other) + void MessageOfMap_Row::InternalSwap(MessageOfMap_Row* other) + { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.col_.InternalSwap(&other->_impl_.col_); + } + + ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfMap_Row::GetMetadata() const + { + return ::_pbi::AssignDescriptors( + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[11] + ); + } + + // =================================================================== + + class MessageOfMap::_Internal + { + public: + }; + + MessageOfMap::MessageOfMap(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) + { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfMap) + } + MessageOfMap::MessageOfMap(const MessageOfMap& from) : + ::PROTOBUF_NAMESPACE_ID::Message() + { + MessageOfMap* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.row_){from._impl_.row_}, /*decltype(_impl_._cached_size_)*/ {}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfMap) + } + + inline void MessageOfMap::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned + ) + { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.row_){arena}, /*decltype(_impl_._cached_size_)*/ {}}; + } + + MessageOfMap::~MessageOfMap() + { + // @@protoc_insertion_point(destructor:protobuf.MessageOfMap) + if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) + { + (void)arena; + return; + } + SharedDtor(); + } + + inline void MessageOfMap::SharedDtor() + { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.row_.~RepeatedPtrField(); + } + + void MessageOfMap::SetCachedSize(int size) const + { + _impl_._cached_size_.Set(size); + } + + void MessageOfMap::Clear() + { + // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfMap) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + _impl_.row_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + const char* MessageOfMap::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) + { +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) \ + goto failure + while (!ctx->Done(&ptr)) + { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) + { + // repeated .protobuf.MessageOfMap.Row row = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) + { + ptr -= 1; + do + { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_row(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) + break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } + else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) + { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, + ctx + ); + CHK_(ptr != nullptr); + } // while + message_done: + return ptr; + failure: + ptr = nullptr; + goto message_done; +#undef CHK_ + } + + uint8_t* MessageOfMap::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream + ) const + { + // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfMap) + uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .protobuf.MessageOfMap.Row row = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_row_size()); + i < n; + i++) + { + const auto& repfield = this->_internal_row(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) + { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream + ); + } + // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfMap) + return target; + } + + size_t MessageOfMap::ByteSizeLong() const + { + // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfMap) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + // repeated .protobuf.MessageOfMap.Row row = 2; + total_size += 1UL * this->_internal_row_size(); + for (const auto& msg : this->_impl_.row_) + { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); + } + + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfMap::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + MessageOfMap::MergeImpl}; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfMap::GetClassData() const + { + return &_class_data_; + } + + void MessageOfMap::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) + { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfMap) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + _this->_impl_.row_.MergeFrom(from._impl_.row_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + } + + void MessageOfMap::CopyFrom(const MessageOfMap& from) + { + // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfMap) + if (&from == this) + return; + Clear(); + MergeFrom(from); + } + + bool MessageOfMap::IsInitialized() const + { + return true; + } + + void MessageOfMap::InternalSwap(MessageOfMap* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.col_.InternalSwap(&other->_impl_.col_); + _impl_.row_.InternalSwap(&other->_impl_.row_); } - ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfMap_Row::GetMetadata() const + ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfMap::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[10] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[12] ); } // =================================================================== - class MessageOfMap::_Internal + class MessageOfNews::_Internal { public: }; - MessageOfMap::MessageOfMap(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + MessageOfNews::MessageOfNews(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfMap) + // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfNews) } - MessageOfMap::MessageOfMap(const MessageOfMap& from) : + MessageOfNews::MessageOfNews(const MessageOfNews& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - MessageOfMap* const _this = this; + MessageOfNews* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.row_){from._impl_.row_}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.news_){}, decltype(_impl_.from_id_){}, decltype(_impl_.to_id_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfMap) + _impl_.news_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.news_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_news().empty()) + { + _this->_impl_.news_.Set(from._internal_news(), _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.from_id_, &from._impl_.from_id_, static_cast(reinterpret_cast(&_impl_.to_id_) - reinterpret_cast(&_impl_.from_id_)) + sizeof(_impl_.to_id_)); + // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfNews) } - inline void MessageOfMap::SharedCtor( + inline void MessageOfNews::SharedCtor( ::_pb::Arena* arena, bool is_message_owned ) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.row_){arena}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.news_){}, decltype(_impl_.from_id_){int64_t{0}}, decltype(_impl_.to_id_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}}; + _impl_.news_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.news_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } - MessageOfMap::~MessageOfMap() + MessageOfNews::~MessageOfNews() { - // @@protoc_insertion_point(destructor:protobuf.MessageOfMap) + // @@protoc_insertion_point(destructor:protobuf.MessageOfNews) if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; @@ -5318,29 +6090,30 @@ namespace protobuf SharedDtor(); } - inline void MessageOfMap::SharedDtor() + inline void MessageOfNews::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.row_.~RepeatedPtrField(); + _impl_.news_.Destroy(); } - void MessageOfMap::SetCachedSize(int size) const + void MessageOfNews::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } - void MessageOfMap::Clear() + void MessageOfNews::Clear() { - // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfMap) + // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfNews) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - _impl_.row_.Clear(); + _impl_.news_.ClearToEmpty(); + ::memset(&_impl_.from_id_, 0, static_cast(reinterpret_cast(&_impl_.to_id_) - reinterpret_cast(&_impl_.from_id_)) + sizeof(_impl_.to_id_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - const char* MessageOfMap::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) + const char* MessageOfNews::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) \ if (PROTOBUF_PREDICT_FALSE(!(x))) \ @@ -5351,19 +6124,34 @@ namespace protobuf ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // repeated .protobuf.MessageOfMap.Row row = 2; + // string news = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) + { + auto str = _internal_mutable_news(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "protobuf.MessageOfNews.news")); + } + else + goto handle_unusual; + continue; + // int64 from_id = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - ptr -= 1; - do - { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_row(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) - break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + _impl_.from_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // int64 to_id = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) + { + _impl_.to_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); } else goto handle_unusual; @@ -5394,23 +6182,37 @@ namespace protobuf #undef CHK_ } - uint8_t* MessageOfMap::_InternalSerialize( + uint8_t* MessageOfNews::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream ) const { - // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfMap) + // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfNews) uint32_t cached_has_bits = 0; (void)cached_has_bits; - // repeated .protobuf.MessageOfMap.Row row = 2; - for (unsigned i = 0, - n = static_cast(this->_internal_row_size()); - i < n; - i++) + // string news = 1; + if (!this->_internal_news().empty()) { - const auto& repfield = this->_internal_row(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_news().data(), static_cast(this->_internal_news().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "protobuf.MessageOfNews.news" + ); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_news(), target + ); + } + + // int64 from_id = 2; + if (this->_internal_from_id() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_from_id(), target); + } + + // int64 to_id = 3; + if (this->_internal_to_id() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_to_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -5419,76 +6221,109 @@ namespace protobuf _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream ); } - // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfMap) + // @@protoc_insertion_point(serialize_to_array_end:protobuf.MessageOfNews) return target; } - size_t MessageOfMap::ByteSizeLong() const + size_t MessageOfNews::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfMap) + // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfNews) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - // repeated .protobuf.MessageOfMap.Row row = 2; - total_size += 1UL * this->_internal_row_size(); - for (const auto& msg : this->_impl_.row_) + // string news = 1; + if (!this->_internal_news().empty()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_news() + ); + } + + // int64 from_id = 2; + if (this->_internal_from_id() != 0) + { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_from_id()); + } + + // int64 to_id = 3; + if (this->_internal_to_id() != 0) + { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_to_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfMap::_class_data_ = { + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfNews::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - MessageOfMap::MergeImpl}; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfMap::GetClassData() const + MessageOfNews::MergeImpl}; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfNews::GetClassData() const { return &_class_data_; } - void MessageOfMap::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) + void MessageOfNews::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfMap) + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MessageOfNews) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void)cached_has_bits; - _this->_impl_.row_.MergeFrom(from._impl_.row_); + if (!from._internal_news().empty()) + { + _this->_internal_set_news(from._internal_news()); + } + if (from._internal_from_id() != 0) + { + _this->_internal_set_from_id(from._internal_from_id()); + } + if (from._internal_to_id() != 0) + { + _this->_internal_set_to_id(from._internal_to_id()); + } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } - void MessageOfMap::CopyFrom(const MessageOfMap& from) + void MessageOfNews::CopyFrom(const MessageOfNews& from) { - // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfMap) + // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfNews) if (&from == this) return; Clear(); MergeFrom(from); } - bool MessageOfMap::IsInitialized() const + bool MessageOfNews::IsInitialized() const { return true; } - void MessageOfMap::InternalSwap(MessageOfMap* other) + void MessageOfNews::InternalSwap(MessageOfNews* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.row_.InternalSwap(&other->_impl_.row_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.news_, lhs_arena, &other->_impl_.news_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(MessageOfNews, _impl_.to_id_) + sizeof(MessageOfNews::_impl_.to_id_) - PROTOBUF_FIELD_OFFSET(MessageOfNews, _impl_.from_id_)>( + reinterpret_cast(&_impl_.from_id_), + reinterpret_cast(&other->_impl_.from_id_) + ); } - ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfMap::GetMetadata() const + ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfNews::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[11] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[13] ); } @@ -5506,6 +6341,9 @@ namespace protobuf static const ::protobuf::MessageOfDoor& door_message(const MessageOfObj* msg); static const ::protobuf::MessageOfGate& gate_message(const MessageOfObj* msg); static const ::protobuf::MessageOfChest& chest_message(const MessageOfObj* msg); + static const ::protobuf::MessageOfHiddenGate& hidden_gate_message(const MessageOfObj* msg); + static const ::protobuf::MessageOfNews& news_message(const MessageOfObj* msg); + static const ::protobuf::MessageOfMap& map_message(const MessageOfObj* msg); }; const ::protobuf::MessageOfStudent& @@ -5553,6 +6391,21 @@ namespace protobuf { return *msg->_impl_.message_of_obj_.chest_message_; } + const ::protobuf::MessageOfHiddenGate& + MessageOfObj::_Internal::hidden_gate_message(const MessageOfObj* msg) + { + return *msg->_impl_.message_of_obj_.hidden_gate_message_; + } + const ::protobuf::MessageOfNews& + MessageOfObj::_Internal::news_message(const MessageOfObj* msg) + { + return *msg->_impl_.message_of_obj_.news_message_; + } + const ::protobuf::MessageOfMap& + MessageOfObj::_Internal::map_message(const MessageOfObj* msg) + { + return *msg->_impl_.message_of_obj_.map_message_; + } void MessageOfObj::set_allocated_student_message(::protobuf::MessageOfStudent* student_message) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); @@ -5724,6 +6577,63 @@ namespace protobuf } // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.chest_message) } + void MessageOfObj::set_allocated_hidden_gate_message(::protobuf::MessageOfHiddenGate* hidden_gate_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_message_of_obj(); + if (hidden_gate_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(hidden_gate_message); + if (message_arena != submessage_arena) + { + hidden_gate_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, hidden_gate_message, submessage_arena + ); + } + set_has_hidden_gate_message(); + _impl_.message_of_obj_.hidden_gate_message_ = hidden_gate_message; + } + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.hidden_gate_message) + } + void MessageOfObj::set_allocated_news_message(::protobuf::MessageOfNews* news_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_message_of_obj(); + if (news_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(news_message); + if (message_arena != submessage_arena) + { + news_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, news_message, submessage_arena + ); + } + set_has_news_message(); + _impl_.message_of_obj_.news_message_ = news_message; + } + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.news_message) + } + void MessageOfObj::set_allocated_map_message(::protobuf::MessageOfMap* map_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_message_of_obj(); + if (map_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(map_message); + if (message_arena != submessage_arena) + { + map_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, map_message, submessage_arena + ); + } + set_has_map_message(); + _impl_.message_of_obj_.map_message_ = map_message; + } + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.map_message) + } MessageOfObj::MessageOfObj(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -5805,6 +6715,27 @@ namespace protobuf ); break; } + case kHiddenGateMessage: + { + _this->_internal_mutable_hidden_gate_message()->::protobuf::MessageOfHiddenGate::MergeFrom( + from._internal_hidden_gate_message() + ); + break; + } + case kNewsMessage: + { + _this->_internal_mutable_news_message()->::protobuf::MessageOfNews::MergeFrom( + from._internal_news_message() + ); + break; + } + case kMapMessage: + { + _this->_internal_mutable_map_message()->::protobuf::MessageOfMap::MergeFrom( + from._internal_map_message() + ); + break; + } case MESSAGE_OF_OBJ_NOT_SET: { break; @@ -5926,6 +6857,30 @@ namespace protobuf } break; } + case kHiddenGateMessage: + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.hidden_gate_message_; + } + break; + } + case kNewsMessage: + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.news_message_; + } + break; + } + case kMapMessage: + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.map_message_; + } + break; + } case MESSAGE_OF_OBJ_NOT_SET: { break; @@ -6046,6 +7001,36 @@ namespace protobuf else goto handle_unusual; continue; + // .protobuf.MessageOfHiddenGate hidden_gate_message = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) + { + ptr = ctx->ParseMessage(_internal_mutable_hidden_gate_message(), ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // .protobuf.MessageOfNews news_message = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) + { + ptr = ctx->ParseMessage(_internal_mutable_news_message(), ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // .protobuf.MessageOfMap map_message = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 98)) + { + ptr = ctx->ParseMessage(_internal_mutable_map_message(), ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -6143,6 +7128,27 @@ namespace protobuf InternalWriteMessage(9, _Internal::chest_message(this), _Internal::chest_message(this).GetCachedSize(), target, stream); } + // .protobuf.MessageOfHiddenGate hidden_gate_message = 10; + if (_internal_has_hidden_gate_message()) + { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(10, _Internal::hidden_gate_message(this), _Internal::hidden_gate_message(this).GetCachedSize(), target, stream); + } + + // .protobuf.MessageOfNews news_message = 11; + if (_internal_has_news_message()) + { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(11, _Internal::news_message(this), _Internal::news_message(this).GetCachedSize(), target, stream); + } + + // .protobuf.MessageOfMap map_message = 12; + if (_internal_has_map_message()) + { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(12, _Internal::map_message(this), _Internal::map_message(this).GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -6223,25 +7229,52 @@ namespace protobuf { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.message_of_obj_.door_message_ + *_impl_.message_of_obj_.door_message_ + ); + break; + } + // .protobuf.MessageOfGate gate_message = 8; + case kGateMessage: + { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.message_of_obj_.gate_message_ + ); + break; + } + // .protobuf.MessageOfChest chest_message = 9; + case kChestMessage: + { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.message_of_obj_.chest_message_ + ); + break; + } + // .protobuf.MessageOfHiddenGate hidden_gate_message = 10; + case kHiddenGateMessage: + { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.message_of_obj_.hidden_gate_message_ ); break; } - // .protobuf.MessageOfGate gate_message = 8; - case kGateMessage: + // .protobuf.MessageOfNews news_message = 11; + case kNewsMessage: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.message_of_obj_.gate_message_ + *_impl_.message_of_obj_.news_message_ ); break; } - // .protobuf.MessageOfChest chest_message = 9; - case kChestMessage: + // .protobuf.MessageOfMap map_message = 12; + case kMapMessage: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.message_of_obj_.chest_message_ + *_impl_.message_of_obj_.map_message_ ); break; } @@ -6335,6 +7368,27 @@ namespace protobuf ); break; } + case kHiddenGateMessage: + { + _this->_internal_mutable_hidden_gate_message()->::protobuf::MessageOfHiddenGate::MergeFrom( + from._internal_hidden_gate_message() + ); + break; + } + case kNewsMessage: + { + _this->_internal_mutable_news_message()->::protobuf::MessageOfNews::MergeFrom( + from._internal_news_message() + ); + break; + } + case kMapMessage: + { + _this->_internal_mutable_map_message()->::protobuf::MessageOfMap::MergeFrom( + from._internal_map_message() + ); + break; + } case MESSAGE_OF_OBJ_NOT_SET: { break; @@ -6368,7 +7422,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfObj::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[12] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[14] ); } @@ -6798,7 +7852,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfAll::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[13] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[15] ); } @@ -7105,7 +8159,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata MessageToClient::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[14] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[16] ); } @@ -7385,7 +8439,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata MoveRes::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[15] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[17] ); } @@ -7595,303 +8649,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata BoolRes::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[16] - ); - } - - // =================================================================== - - class MsgRes::_Internal - { - public: - }; - - MsgRes::MsgRes(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : - ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) - { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:protobuf.MsgRes) - } - MsgRes::MsgRes(const MsgRes& from) : - ::PROTOBUF_NAMESPACE_ID::Message() - { - MsgRes* const _this = this; - (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.message_received_){}, decltype(_impl_.from_player_id_){}, decltype(_impl_.have_message_){}, /*decltype(_impl_._cached_size_)*/ {}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.message_received_.InitDefault(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.message_received_.Set("", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_message_received().empty()) - { - _this->_impl_.message_received_.Set(from._internal_message_received(), _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.from_player_id_, &from._impl_.from_player_id_, static_cast(reinterpret_cast(&_impl_.have_message_) - reinterpret_cast(&_impl_.from_player_id_)) + sizeof(_impl_.have_message_)); - // @@protoc_insertion_point(copy_constructor:protobuf.MsgRes) - } - - inline void MsgRes::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned - ) - { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.message_received_){}, decltype(_impl_.from_player_id_){int64_t{0}}, decltype(_impl_.have_message_){false}, /*decltype(_impl_._cached_size_)*/ {}}; - _impl_.message_received_.InitDefault(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.message_received_.Set("", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - } - - MsgRes::~MsgRes() - { - // @@protoc_insertion_point(destructor:protobuf.MsgRes) - if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) - { - (void)arena; - return; - } - SharedDtor(); - } - - inline void MsgRes::SharedDtor() - { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.message_received_.Destroy(); - } - - void MsgRes::SetCachedSize(int size) const - { - _impl_._cached_size_.Set(size); - } - - void MsgRes::Clear() - { - // @@protoc_insertion_point(message_clear_start:protobuf.MsgRes) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - _impl_.message_received_.ClearToEmpty(); - ::memset(&_impl_.from_player_id_, 0, static_cast(reinterpret_cast(&_impl_.have_message_) - reinterpret_cast(&_impl_.from_player_id_)) + sizeof(_impl_.have_message_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - const char* MsgRes::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) - { -#define CHK_(x) \ - if (PROTOBUF_PREDICT_FALSE(!(x))) \ - goto failure - while (!ctx->Done(&ptr)) - { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) - { - // bool have_message = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) - { - _impl_.have_message_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; - // int64 from_player_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) - { - _impl_.from_player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; - // string message_received = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) - { - auto str = _internal_mutable_message_received(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "protobuf.MsgRes.message_received")); - } - else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) - { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, - ctx - ); - CHK_(ptr != nullptr); - } // while - message_done: - return ptr; - failure: - ptr = nullptr; - goto message_done; -#undef CHK_ - } - - uint8_t* MsgRes::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream - ) const - { - // @@protoc_insertion_point(serialize_to_array_start:protobuf.MsgRes) - uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // bool have_message = 1; - if (this->_internal_have_message() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_have_message(), target); - } - - // int64 from_player_id = 2; - if (this->_internal_from_player_id() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_from_player_id(), target); - } - - // string message_received = 3; - if (!this->_internal_message_received().empty()) - { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_message_received().data(), static_cast(this->_internal_message_received().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "protobuf.MsgRes.message_received" - ); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_message_received(), target - ); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) - { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream - ); - } - // @@protoc_insertion_point(serialize_to_array_end:protobuf.MsgRes) - return target; - } - - size_t MsgRes::ByteSizeLong() const - { - // @@protoc_insertion_point(message_byte_size_start:protobuf.MsgRes) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - // string message_received = 3; - if (!this->_internal_message_received().empty()) - { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_message_received() - ); - } - - // int64 from_player_id = 2; - if (this->_internal_from_player_id() != 0) - { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_from_player_id()); - } - - // bool have_message = 1; - if (this->_internal_have_message() != 0) - { - total_size += 1 + 1; - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); - } - - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MsgRes::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - MsgRes::MergeImpl}; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MsgRes::GetClassData() const - { - return &_class_data_; - } - - void MsgRes::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) - { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MsgRes) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - if (!from._internal_message_received().empty()) - { - _this->_internal_set_message_received(from._internal_message_received()); - } - if (from._internal_from_player_id() != 0) - { - _this->_internal_set_from_player_id(from._internal_from_player_id()); - } - if (from._internal_have_message() != 0) - { - _this->_internal_set_have_message(from._internal_have_message()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - } - - void MsgRes::CopyFrom(const MsgRes& from) - { - // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MsgRes) - if (&from == this) - return; - Clear(); - MergeFrom(from); - } - - bool MsgRes::IsInitialized() const - { - return true; - } - - void MsgRes::InternalSwap(MsgRes* other) - { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.message_received_, lhs_arena, &other->_impl_.message_received_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MsgRes, _impl_.have_message_) + sizeof(MsgRes::_impl_.have_message_) - PROTOBUF_FIELD_OFFSET(MsgRes, _impl_.from_player_id_)>( - reinterpret_cast(&_impl_.from_player_id_), - reinterpret_cast(&other->_impl_.from_player_id_) - ); - } - - ::PROTOBUF_NAMESPACE_ID::Metadata MsgRes::GetMetadata() const - { - return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[17] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[18] ); } @@ -7947,6 +8705,12 @@ PROTOBUF_NOINLINE ::protobuf::MessageOfGate* return Arena::CreateMessageInternal<::protobuf::MessageOfGate>(arena); } template<> +PROTOBUF_NOINLINE ::protobuf::MessageOfHiddenGate* + Arena::CreateMaybeMessage<::protobuf::MessageOfHiddenGate>(Arena* arena) +{ + return Arena::CreateMessageInternal<::protobuf::MessageOfHiddenGate>(arena); +} +template<> PROTOBUF_NOINLINE ::protobuf::MessageOfDoor* Arena::CreateMaybeMessage<::protobuf::MessageOfDoor>(Arena* arena) { @@ -7971,6 +8735,12 @@ PROTOBUF_NOINLINE ::protobuf::MessageOfMap* return Arena::CreateMessageInternal<::protobuf::MessageOfMap>(arena); } template<> +PROTOBUF_NOINLINE ::protobuf::MessageOfNews* + Arena::CreateMaybeMessage<::protobuf::MessageOfNews>(Arena* arena) +{ + return Arena::CreateMessageInternal<::protobuf::MessageOfNews>(arena); +} +template<> PROTOBUF_NOINLINE ::protobuf::MessageOfObj* Arena::CreateMaybeMessage<::protobuf::MessageOfObj>(Arena* arena) { @@ -8000,12 +8770,6 @@ PROTOBUF_NOINLINE ::protobuf::BoolRes* { return Arena::CreateMessageInternal<::protobuf::BoolRes>(arena); } -template<> -PROTOBUF_NOINLINE ::protobuf::MsgRes* - Arena::CreateMaybeMessage<::protobuf::MsgRes>(Arena* arena) -{ - return Arena::CreateMessageInternal<::protobuf::MsgRes>(arena); -} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/CAPI/cpp/proto/Message2Clients.pb.h b/CAPI/cpp/proto/Message2Clients.pb.h index 8975459..e889130 100644 --- a/CAPI/cpp/proto/Message2Clients.pb.h +++ b/CAPI/cpp/proto/Message2Clients.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -73,12 +73,18 @@ namespace protobuf class MessageOfGate; struct MessageOfGateDefaultTypeInternal; extern MessageOfGateDefaultTypeInternal _MessageOfGate_default_instance_; + class MessageOfHiddenGate; + struct MessageOfHiddenGateDefaultTypeInternal; + extern MessageOfHiddenGateDefaultTypeInternal _MessageOfHiddenGate_default_instance_; class MessageOfMap; struct MessageOfMapDefaultTypeInternal; extern MessageOfMapDefaultTypeInternal _MessageOfMap_default_instance_; class MessageOfMap_Row; struct MessageOfMap_RowDefaultTypeInternal; extern MessageOfMap_RowDefaultTypeInternal _MessageOfMap_Row_default_instance_; + class MessageOfNews; + struct MessageOfNewsDefaultTypeInternal; + extern MessageOfNewsDefaultTypeInternal _MessageOfNews_default_instance_; class MessageOfObj; struct MessageOfObjDefaultTypeInternal; extern MessageOfObjDefaultTypeInternal _MessageOfObj_default_instance_; @@ -100,9 +106,6 @@ namespace protobuf class MoveRes; struct MoveResDefaultTypeInternal; extern MoveResDefaultTypeInternal _MoveRes_default_instance_; - class MsgRes; - struct MsgResDefaultTypeInternal; - extern MsgResDefaultTypeInternal _MsgRes_default_instance_; } // namespace protobuf PROTOBUF_NAMESPACE_OPEN template<> @@ -122,10 +125,14 @@ template<> template<> ::protobuf::MessageOfGate* Arena::CreateMaybeMessage<::protobuf::MessageOfGate>(Arena*); template<> +::protobuf::MessageOfHiddenGate* Arena::CreateMaybeMessage<::protobuf::MessageOfHiddenGate>(Arena*); +template<> ::protobuf::MessageOfMap* Arena::CreateMaybeMessage<::protobuf::MessageOfMap>(Arena*); template<> ::protobuf::MessageOfMap_Row* Arena::CreateMaybeMessage<::protobuf::MessageOfMap_Row>(Arena*); template<> +::protobuf::MessageOfNews* Arena::CreateMaybeMessage<::protobuf::MessageOfNews>(Arena*); +template<> ::protobuf::MessageOfObj* Arena::CreateMaybeMessage<::protobuf::MessageOfObj>(Arena*); template<> ::protobuf::MessageOfPickedProp* Arena::CreateMaybeMessage<::protobuf::MessageOfPickedProp>(Arena*); @@ -139,8 +146,6 @@ template<> ::protobuf::MessageToClient* Arena::CreateMaybeMessage<::protobuf::MessageToClient>(Arena*); template<> ::protobuf::MoveRes* Arena::CreateMaybeMessage<::protobuf::MoveRes>(Arena*); -template<> -::protobuf::MsgRes* Arena::CreateMaybeMessage<::protobuf::MsgRes>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace protobuf { @@ -307,7 +312,7 @@ namespace protobuf { kTimeUntilSkillAvailableFieldNumber = 6, kPropFieldNumber = 8, - kBuffFieldNumber = 24, + kBuffFieldNumber = 25, kXFieldNumber = 1, kYFieldNumber = 2, kSpeedFieldNumber = 3, @@ -317,14 +322,17 @@ namespace protobuf kGuidFieldNumber = 10, kPlayerStateFieldNumber = 9, kStateFieldNumber = 11, + kBulletTypeFieldNumber = 12, + kLearningSpeedFieldNumber = 13, kPlayerIdFieldNumber = 15, + kTreatSpeedFieldNumber = 14, kViewRangeFieldNumber = 16, kRadiusFieldNumber = 17, - kDangerAlertFieldNumber = 19, - kDamageFieldNumber = 18, kScoreFieldNumber = 20, + kDangerAlertFieldNumber = 19, kTreatProgressFieldNumber = 21, kRescueProgressFieldNumber = 22, + kFacingDirectionFieldNumber = 24, kStudentTypeFieldNumber = 23, }; // repeated double time_until_skill_available = 6; @@ -374,7 +382,7 @@ namespace protobuf const ::PROTOBUF_NAMESPACE_ID::RepeatedField& prop() const; ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_prop(); - // repeated .protobuf.StudentBuffType buff = 24; + // repeated .protobuf.StudentBuffType buff = 25; int buff_size() const; private: @@ -484,6 +492,26 @@ namespace protobuf ::protobuf::PlayerState _internal_state() const; void _internal_set_state(::protobuf::PlayerState value); + public: + // .protobuf.BulletType bullet_type = 12; + void clear_bullet_type(); + ::protobuf::BulletType bullet_type() const; + void set_bullet_type(::protobuf::BulletType value); + + private: + ::protobuf::BulletType _internal_bullet_type() const; + void _internal_set_bullet_type(::protobuf::BulletType value); + + public: + // int32 learning_speed = 13; + void clear_learning_speed(); + int32_t learning_speed() const; + void set_learning_speed(int32_t value); + + private: + int32_t _internal_learning_speed() const; + void _internal_set_learning_speed(int32_t value); + public: // int64 player_id = 15; void clear_player_id(); @@ -494,6 +522,16 @@ namespace protobuf int64_t _internal_player_id() const; void _internal_set_player_id(int64_t value); + public: + // int32 treat_speed = 14; + void clear_treat_speed(); + int32_t treat_speed() const; + void set_treat_speed(int32_t value); + + private: + int32_t _internal_treat_speed() const; + void _internal_set_treat_speed(int32_t value); + public: // int32 view_range = 16; void clear_view_range(); @@ -514,26 +552,6 @@ namespace protobuf int32_t _internal_radius() const; void _internal_set_radius(int32_t value); - public: - // double danger_alert = 19; - void clear_danger_alert(); - double danger_alert() const; - void set_danger_alert(double value); - - private: - double _internal_danger_alert() const; - void _internal_set_danger_alert(double value); - - public: - // int32 damage = 18; - void clear_damage(); - int32_t damage() const; - void set_damage(int32_t value); - - private: - int32_t _internal_damage() const; - void _internal_set_damage(int32_t value); - public: // int32 score = 20; void clear_score(); @@ -544,6 +562,16 @@ namespace protobuf int32_t _internal_score() const; void _internal_set_score(int32_t value); + public: + // double danger_alert = 19; + void clear_danger_alert(); + double danger_alert() const; + void set_danger_alert(double value); + + private: + double _internal_danger_alert() const; + void _internal_set_danger_alert(double value); + public: // int32 treat_progress = 21; void clear_treat_progress(); @@ -564,6 +592,16 @@ namespace protobuf int32_t _internal_rescue_progress() const; void _internal_set_rescue_progress(int32_t value); + public: + // double facing_direction = 24; + void clear_facing_direction(); + double facing_direction() const; + void set_facing_direction(double value); + + private: + double _internal_facing_direction() const; + void _internal_set_facing_direction(double value); + public: // .protobuf.StudentType student_type = 23; void clear_student_type(); @@ -600,14 +638,17 @@ namespace protobuf int64_t guid_; int player_state_; int state_; + int bullet_type_; + int32_t learning_speed_; int64_t player_id_; + int32_t treat_speed_; int32_t view_range_; int32_t radius_; - double danger_alert_; - int32_t damage_; int32_t score_; + double danger_alert_; int32_t treat_progress_; int32_t rescue_progress_; + double facing_direction_; int student_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; @@ -779,7 +820,7 @@ namespace protobuf { kTimeUntilSkillAvailableFieldNumber = 5, kPropFieldNumber = 7, - kBuffFieldNumber = 17, + kBuffFieldNumber = 19, kXFieldNumber = 1, kYFieldNumber = 2, kSpeedFieldNumber = 3, @@ -788,12 +829,14 @@ namespace protobuf kTrickerTypeFieldNumber = 8, kGuidFieldNumber = 9, kPlayerIdFieldNumber = 11, - kMovableFieldNumber = 10, + kScoreFieldNumber = 10, kViewRangeFieldNumber = 12, kRadiusFieldNumber = 13, kPlayerStateFieldNumber = 14, kTrickDesireFieldNumber = 15, kClassVolumeFieldNumber = 16, + kFacingDirectionFieldNumber = 17, + kBulletTypeFieldNumber = 18, }; // repeated double time_until_skill_available = 5; int time_until_skill_available_size() const; @@ -842,7 +885,7 @@ namespace protobuf const ::PROTOBUF_NAMESPACE_ID::RepeatedField& prop() const; ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_prop(); - // repeated .protobuf.TrickerBuffType buff = 17; + // repeated .protobuf.TrickerBuffType buff = 19; int buff_size() const; private: @@ -943,14 +986,14 @@ namespace protobuf void _internal_set_player_id(int64_t value); public: - // bool movable = 10; - void clear_movable(); - bool movable() const; - void set_movable(bool value); + // int32 score = 10; + void clear_score(); + int32_t score() const; + void set_score(int32_t value); private: - bool _internal_movable() const; - void _internal_set_movable(bool value); + int32_t _internal_score() const; + void _internal_set_score(int32_t value); public: // int32 view_range = 12; @@ -1002,6 +1045,26 @@ namespace protobuf double _internal_class_volume() const; void _internal_set_class_volume(double value); + public: + // double facing_direction = 17; + void clear_facing_direction(); + double facing_direction() const; + void set_facing_direction(double value); + + private: + double _internal_facing_direction() const; + void _internal_set_facing_direction(double value); + + public: + // .protobuf.BulletType bullet_type = 18; + void clear_bullet_type(); + ::protobuf::BulletType bullet_type() const; + void set_bullet_type(::protobuf::BulletType value); + + private: + ::protobuf::BulletType _internal_bullet_type() const; + void _internal_set_bullet_type(::protobuf::BulletType value); + public: // @@protoc_insertion_point(class_scope:protobuf.MessageOfTricker) @@ -1027,12 +1090,14 @@ namespace protobuf int tricker_type_; int64_t guid_; int64_t player_id_; - bool movable_; + int32_t score_; int32_t view_range_; int32_t radius_; int player_state_; double trick_desire_; double class_volume_; + double facing_direction_; + int bullet_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -1209,6 +1274,7 @@ namespace protobuf kGuidFieldNumber = 5, kBombRangeFieldNumber = 8, kPlaceFieldNumber = 7, + kSpeedFieldNumber = 9, }; // .protobuf.BulletType type = 1; void clear_type(); @@ -1289,6 +1355,16 @@ namespace protobuf ::protobuf::PlaceType _internal_place() const; void _internal_set_place(::protobuf::PlaceType value); + public: + // int32 speed = 9; + void clear_speed(); + int32_t speed() const; + void set_speed(int32_t value); + + private: + int32_t _internal_speed() const; + void _internal_set_speed(int32_t value); + public: // @@protoc_insertion_point(class_scope:protobuf.MessageOfBullet) @@ -1309,6 +1385,7 @@ namespace protobuf int64_t guid_; double bomb_range_; int place_; + int32_t speed_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -2519,31 +2596,31 @@ namespace protobuf }; // ------------------------------------------------------------------- - class MessageOfDoor final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfDoor) */ + class MessageOfHiddenGate final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfHiddenGate) */ { public: - inline MessageOfDoor() : - MessageOfDoor(nullptr) + inline MessageOfHiddenGate() : + MessageOfHiddenGate(nullptr) { } - ~MessageOfDoor() override; - explicit PROTOBUF_CONSTEXPR MessageOfDoor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + ~MessageOfHiddenGate() override; + explicit PROTOBUF_CONSTEXPR MessageOfHiddenGate(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - MessageOfDoor(const MessageOfDoor& from); - MessageOfDoor(MessageOfDoor&& from) noexcept + MessageOfHiddenGate(const MessageOfHiddenGate& from); + MessageOfHiddenGate(MessageOfHiddenGate&& from) noexcept : - MessageOfDoor() + MessageOfHiddenGate() { *this = ::std::move(from); } - inline MessageOfDoor& operator=(const MessageOfDoor& from) + inline MessageOfHiddenGate& operator=(const MessageOfHiddenGate& from) { CopyFrom(from); return *this; } - inline MessageOfDoor& operator=(MessageOfDoor&& from) noexcept + inline MessageOfHiddenGate& operator=(MessageOfHiddenGate&& from) noexcept { if (this == &from) return *this; @@ -2574,24 +2651,24 @@ namespace protobuf { return default_instance().GetMetadata().reflection; } - static const MessageOfDoor& default_instance() + static const MessageOfHiddenGate& default_instance() { return *internal_default_instance(); } - static inline const MessageOfDoor* internal_default_instance() + static inline const MessageOfHiddenGate* internal_default_instance() { - return reinterpret_cast( - &_MessageOfDoor_default_instance_ + return reinterpret_cast( + &_MessageOfHiddenGate_default_instance_ ); } static constexpr int kIndexInFileMessages = 8; - friend void swap(MessageOfDoor& a, MessageOfDoor& b) + friend void swap(MessageOfHiddenGate& a, MessageOfHiddenGate& b) { a.Swap(&b); } - inline void Swap(MessageOfDoor* other) + inline void Swap(MessageOfHiddenGate* other) { if (other == this) return; @@ -2610,7 +2687,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(MessageOfDoor* other) + void UnsafeArenaSwap(MessageOfHiddenGate* other) { if (other == this) return; @@ -2620,16 +2697,16 @@ namespace protobuf // implements Message ---------------------------------------------- - MessageOfDoor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + MessageOfHiddenGate* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MessageOfDoor& from); + void CopyFrom(const MessageOfHiddenGate& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const MessageOfDoor& from) + void MergeFrom(const MessageOfHiddenGate& from) { - MessageOfDoor::MergeImpl(*this, from); + MessageOfHiddenGate::MergeImpl(*this, from); } private: @@ -2653,17 +2730,17 @@ namespace protobuf void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(MessageOfDoor* other); + void InternalSwap(MessageOfHiddenGate* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protobuf.MessageOfDoor"; + return "protobuf.MessageOfHiddenGate"; } protected: - explicit MessageOfDoor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + explicit MessageOfHiddenGate(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: static const ClassData _class_data_; @@ -2679,7 +2756,7 @@ namespace protobuf { kXFieldNumber = 1, kYFieldNumber = 2, - kIsOpenFieldNumber = 3, + kOpenedFieldNumber = 3, }; // int32 x = 1; void clear_x(); @@ -2701,17 +2778,17 @@ namespace protobuf void _internal_set_y(int32_t value); public: - // bool is_open = 3; - void clear_is_open(); - bool is_open() const; - void set_is_open(bool value); + // bool opened = 3; + void clear_opened(); + bool opened() const; + void set_opened(bool value); private: - bool _internal_is_open() const; - void _internal_set_is_open(bool value); + bool _internal_opened() const; + void _internal_set_opened(bool value); public: - // @@protoc_insertion_point(class_scope:protobuf.MessageOfDoor) + // @@protoc_insertion_point(class_scope:protobuf.MessageOfHiddenGate) private: class _Internal; @@ -2724,7 +2801,7 @@ namespace protobuf { int32_t x_; int32_t y_; - bool is_open_; + bool opened_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -2735,31 +2812,31 @@ namespace protobuf }; // ------------------------------------------------------------------- - class MessageOfChest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfChest) */ + class MessageOfDoor final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfDoor) */ { public: - inline MessageOfChest() : - MessageOfChest(nullptr) + inline MessageOfDoor() : + MessageOfDoor(nullptr) { } - ~MessageOfChest() override; - explicit PROTOBUF_CONSTEXPR MessageOfChest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + ~MessageOfDoor() override; + explicit PROTOBUF_CONSTEXPR MessageOfDoor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - MessageOfChest(const MessageOfChest& from); - MessageOfChest(MessageOfChest&& from) noexcept + MessageOfDoor(const MessageOfDoor& from); + MessageOfDoor(MessageOfDoor&& from) noexcept : - MessageOfChest() + MessageOfDoor() { *this = ::std::move(from); } - inline MessageOfChest& operator=(const MessageOfChest& from) + inline MessageOfDoor& operator=(const MessageOfDoor& from) { CopyFrom(from); return *this; } - inline MessageOfChest& operator=(MessageOfChest&& from) noexcept + inline MessageOfDoor& operator=(MessageOfDoor&& from) noexcept { if (this == &from) return *this; @@ -2790,24 +2867,24 @@ namespace protobuf { return default_instance().GetMetadata().reflection; } - static const MessageOfChest& default_instance() + static const MessageOfDoor& default_instance() { return *internal_default_instance(); } - static inline const MessageOfChest* internal_default_instance() + static inline const MessageOfDoor* internal_default_instance() { - return reinterpret_cast( - &_MessageOfChest_default_instance_ + return reinterpret_cast( + &_MessageOfDoor_default_instance_ ); } static constexpr int kIndexInFileMessages = 9; - friend void swap(MessageOfChest& a, MessageOfChest& b) + friend void swap(MessageOfDoor& a, MessageOfDoor& b) { a.Swap(&b); } - inline void Swap(MessageOfChest* other) + inline void Swap(MessageOfDoor* other) { if (other == this) return; @@ -2826,7 +2903,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(MessageOfChest* other) + void UnsafeArenaSwap(MessageOfDoor* other) { if (other == this) return; @@ -2836,16 +2913,16 @@ namespace protobuf // implements Message ---------------------------------------------- - MessageOfChest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + MessageOfDoor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MessageOfChest& from); + void CopyFrom(const MessageOfDoor& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const MessageOfChest& from) + void MergeFrom(const MessageOfDoor& from) { - MessageOfChest::MergeImpl(*this, from); + MessageOfDoor::MergeImpl(*this, from); } private: @@ -2869,17 +2946,17 @@ namespace protobuf void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(MessageOfChest* other); + void InternalSwap(MessageOfDoor* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protobuf.MessageOfChest"; + return "protobuf.MessageOfDoor"; } protected: - explicit MessageOfChest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + explicit MessageOfDoor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: static const ClassData _class_data_; @@ -2895,7 +2972,8 @@ namespace protobuf { kXFieldNumber = 1, kYFieldNumber = 2, - kProgressFieldNumber = 3, + kIsOpenFieldNumber = 3, + kNumberFieldNumber = 4, }; // int32 x = 1; void clear_x(); @@ -2917,17 +2995,27 @@ namespace protobuf void _internal_set_y(int32_t value); public: - // int32 progress = 3; - void clear_progress(); - int32_t progress() const; - void set_progress(int32_t value); + // bool is_open = 3; + void clear_is_open(); + bool is_open() const; + void set_is_open(bool value); private: - int32_t _internal_progress() const; - void _internal_set_progress(int32_t value); + bool _internal_is_open() const; + void _internal_set_is_open(bool value); public: - // @@protoc_insertion_point(class_scope:protobuf.MessageOfChest) + // int32 number = 4; + void clear_number(); + int32_t number() const; + void set_number(int32_t value); + + private: + int32_t _internal_number() const; + void _internal_set_number(int32_t value); + + public: + // @@protoc_insertion_point(class_scope:protobuf.MessageOfDoor) private: class _Internal; @@ -2940,7 +3028,8 @@ namespace protobuf { int32_t x_; int32_t y_; - int32_t progress_; + bool is_open_; + int32_t number_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -2951,31 +3040,31 @@ namespace protobuf }; // ------------------------------------------------------------------- - class MessageOfMap_Row final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMap.Row) */ + class MessageOfChest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfChest) */ { public: - inline MessageOfMap_Row() : - MessageOfMap_Row(nullptr) + inline MessageOfChest() : + MessageOfChest(nullptr) { } - ~MessageOfMap_Row() override; - explicit PROTOBUF_CONSTEXPR MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + ~MessageOfChest() override; + explicit PROTOBUF_CONSTEXPR MessageOfChest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - MessageOfMap_Row(const MessageOfMap_Row& from); - MessageOfMap_Row(MessageOfMap_Row&& from) noexcept + MessageOfChest(const MessageOfChest& from); + MessageOfChest(MessageOfChest&& from) noexcept : - MessageOfMap_Row() + MessageOfChest() { *this = ::std::move(from); } - inline MessageOfMap_Row& operator=(const MessageOfMap_Row& from) + inline MessageOfChest& operator=(const MessageOfChest& from) { CopyFrom(from); return *this; } - inline MessageOfMap_Row& operator=(MessageOfMap_Row&& from) noexcept + inline MessageOfChest& operator=(MessageOfChest&& from) noexcept { if (this == &from) return *this; @@ -3006,24 +3095,24 @@ namespace protobuf { return default_instance().GetMetadata().reflection; } - static const MessageOfMap_Row& default_instance() + static const MessageOfChest& default_instance() { return *internal_default_instance(); } - static inline const MessageOfMap_Row* internal_default_instance() + static inline const MessageOfChest* internal_default_instance() { - return reinterpret_cast( - &_MessageOfMap_Row_default_instance_ + return reinterpret_cast( + &_MessageOfChest_default_instance_ ); } static constexpr int kIndexInFileMessages = 10; - friend void swap(MessageOfMap_Row& a, MessageOfMap_Row& b) + friend void swap(MessageOfChest& a, MessageOfChest& b) { a.Swap(&b); } - inline void Swap(MessageOfMap_Row* other) + inline void Swap(MessageOfChest* other) { if (other == this) return; @@ -3042,7 +3131,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(MessageOfMap_Row* other) + void UnsafeArenaSwap(MessageOfChest* other) { if (other == this) return; @@ -3052,16 +3141,16 @@ namespace protobuf // implements Message ---------------------------------------------- - MessageOfMap_Row* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + MessageOfChest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MessageOfMap_Row& from); + void CopyFrom(const MessageOfChest& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const MessageOfMap_Row& from) + void MergeFrom(const MessageOfChest& from) { - MessageOfMap_Row::MergeImpl(*this, from); + MessageOfChest::MergeImpl(*this, from); } private: @@ -3085,17 +3174,17 @@ namespace protobuf void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(MessageOfMap_Row* other); + void InternalSwap(MessageOfChest* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protobuf.MessageOfMap.Row"; + return "protobuf.MessageOfChest"; } protected: - explicit MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + explicit MessageOfChest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3109,10 +3198,226 @@ namespace protobuf enum : int { - kColFieldNumber = 1, + kXFieldNumber = 1, + kYFieldNumber = 2, + kProgressFieldNumber = 3, }; - // repeated .protobuf.PlaceType col = 1; - int col_size() const; + // int32 x = 1; + void clear_x(); + int32_t x() const; + void set_x(int32_t value); + + private: + int32_t _internal_x() const; + void _internal_set_x(int32_t value); + + public: + // int32 y = 2; + void clear_y(); + int32_t y() const; + void set_y(int32_t value); + + private: + int32_t _internal_y() const; + void _internal_set_y(int32_t value); + + public: + // int32 progress = 3; + void clear_progress(); + int32_t progress() const; + void set_progress(int32_t value); + + private: + int32_t _internal_progress() const; + void _internal_set_progress(int32_t value); + + public: + // @@protoc_insertion_point(class_scope:protobuf.MessageOfChest) + + private: + class _Internal; + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ + { + int32_t x_; + int32_t y_; + int32_t progress_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union + { + Impl_ _impl_; + }; + friend struct ::TableStruct_Message2Clients_2eproto; + }; + // ------------------------------------------------------------------- + + class MessageOfMap_Row final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMap.Row) */ + { + public: + inline MessageOfMap_Row() : + MessageOfMap_Row(nullptr) + { + } + ~MessageOfMap_Row() override; + explicit PROTOBUF_CONSTEXPR MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MessageOfMap_Row(const MessageOfMap_Row& from); + MessageOfMap_Row(MessageOfMap_Row&& from) noexcept + : + MessageOfMap_Row() + { + *this = ::std::move(from); + } + + inline MessageOfMap_Row& operator=(const MessageOfMap_Row& from) + { + CopyFrom(from); + return *this; + } + inline MessageOfMap_Row& operator=(MessageOfMap_Row&& from) noexcept + { + if (this == &from) + return *this; + if (GetOwningArena() == from.GetOwningArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) + { + InternalSwap(&from); + } + else + { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() + { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() + { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() + { + return default_instance().GetMetadata().reflection; + } + static const MessageOfMap_Row& default_instance() + { + return *internal_default_instance(); + } + static inline const MessageOfMap_Row* internal_default_instance() + { + return reinterpret_cast( + &_MessageOfMap_Row_default_instance_ + ); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(MessageOfMap_Row& a, MessageOfMap_Row& b) + { + a.Swap(&b); + } + inline void Swap(MessageOfMap_Row* other) + { + if (other == this) + return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) + { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) + { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } + else + { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MessageOfMap_Row* other) + { + if (other == this) + return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MessageOfMap_Row* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MessageOfMap_Row& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const MessageOfMap_Row& from) + { + MessageOfMap_Row::MergeImpl(*this, from); + } + + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream + ) const final; + int GetCachedSize() const final + { + return _impl_._cached_size_.Get(); + } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MessageOfMap_Row* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() + { + return "protobuf.MessageOfMap.Row"; + } + + protected: + explicit MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + + public: + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int + { + kColFieldNumber = 1, + }; + // repeated .protobuf.PlaceType col = 1; + int col_size() const; private: int _internal_col_size() const; @@ -3159,27 +3464,233 @@ namespace protobuf public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMap) */ { public: - inline MessageOfMap() : - MessageOfMap(nullptr) + inline MessageOfMap() : + MessageOfMap(nullptr) + { + } + ~MessageOfMap() override; + explicit PROTOBUF_CONSTEXPR MessageOfMap(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MessageOfMap(const MessageOfMap& from); + MessageOfMap(MessageOfMap&& from) noexcept + : + MessageOfMap() + { + *this = ::std::move(from); + } + + inline MessageOfMap& operator=(const MessageOfMap& from) + { + CopyFrom(from); + return *this; + } + inline MessageOfMap& operator=(MessageOfMap&& from) noexcept + { + if (this == &from) + return *this; + if (GetOwningArena() == from.GetOwningArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) + { + InternalSwap(&from); + } + else + { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() + { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() + { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() + { + return default_instance().GetMetadata().reflection; + } + static const MessageOfMap& default_instance() + { + return *internal_default_instance(); + } + static inline const MessageOfMap* internal_default_instance() + { + return reinterpret_cast( + &_MessageOfMap_default_instance_ + ); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(MessageOfMap& a, MessageOfMap& b) + { + a.Swap(&b); + } + inline void Swap(MessageOfMap* other) + { + if (other == this) + return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) + { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) + { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } + else + { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MessageOfMap* other) + { + if (other == this) + return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MessageOfMap* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MessageOfMap& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const MessageOfMap& from) + { + MessageOfMap::MergeImpl(*this, from); + } + + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream + ) const final; + int GetCachedSize() const final + { + return _impl_._cached_size_.Get(); + } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MessageOfMap* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() + { + return "protobuf.MessageOfMap"; + } + + protected: + explicit MessageOfMap(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + + public: + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef MessageOfMap_Row Row; + + // accessors ------------------------------------------------------- + + enum : int + { + kRowFieldNumber = 2, + }; + // repeated .protobuf.MessageOfMap.Row row = 2; + int row_size() const; + + private: + int _internal_row_size() const; + + public: + void clear_row(); + ::protobuf::MessageOfMap_Row* mutable_row(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>* + mutable_row(); + + private: + const ::protobuf::MessageOfMap_Row& _internal_row(int index) const; + ::protobuf::MessageOfMap_Row* _internal_add_row(); + + public: + const ::protobuf::MessageOfMap_Row& row(int index) const; + ::protobuf::MessageOfMap_Row* add_row(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>& + row() const; + + // @@protoc_insertion_point(class_scope:protobuf.MessageOfMap) + + private: + class _Internal; + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ + { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row> row_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union + { + Impl_ _impl_; + }; + friend struct ::TableStruct_Message2Clients_2eproto; + }; + // ------------------------------------------------------------------- + + class MessageOfNews final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfNews) */ + { + public: + inline MessageOfNews() : + MessageOfNews(nullptr) { } - ~MessageOfMap() override; - explicit PROTOBUF_CONSTEXPR MessageOfMap(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + ~MessageOfNews() override; + explicit PROTOBUF_CONSTEXPR MessageOfNews(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - MessageOfMap(const MessageOfMap& from); - MessageOfMap(MessageOfMap&& from) noexcept + MessageOfNews(const MessageOfNews& from); + MessageOfNews(MessageOfNews&& from) noexcept : - MessageOfMap() + MessageOfNews() { *this = ::std::move(from); } - inline MessageOfMap& operator=(const MessageOfMap& from) + inline MessageOfNews& operator=(const MessageOfNews& from) { CopyFrom(from); return *this; } - inline MessageOfMap& operator=(MessageOfMap&& from) noexcept + inline MessageOfNews& operator=(MessageOfNews&& from) noexcept { if (this == &from) return *this; @@ -3210,24 +3721,24 @@ namespace protobuf { return default_instance().GetMetadata().reflection; } - static const MessageOfMap& default_instance() + static const MessageOfNews& default_instance() { return *internal_default_instance(); } - static inline const MessageOfMap* internal_default_instance() + static inline const MessageOfNews* internal_default_instance() { - return reinterpret_cast( - &_MessageOfMap_default_instance_ + return reinterpret_cast( + &_MessageOfNews_default_instance_ ); } static constexpr int kIndexInFileMessages = - 11; + 13; - friend void swap(MessageOfMap& a, MessageOfMap& b) + friend void swap(MessageOfNews& a, MessageOfNews& b) { a.Swap(&b); } - inline void Swap(MessageOfMap* other) + inline void Swap(MessageOfNews* other) { if (other == this) return; @@ -3246,7 +3757,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(MessageOfMap* other) + void UnsafeArenaSwap(MessageOfNews* other) { if (other == this) return; @@ -3256,16 +3767,16 @@ namespace protobuf // implements Message ---------------------------------------------- - MessageOfMap* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + MessageOfNews* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MessageOfMap& from); + void CopyFrom(const MessageOfNews& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const MessageOfMap& from) + void MergeFrom(const MessageOfNews& from) { - MessageOfMap::MergeImpl(*this, from); + MessageOfNews::MergeImpl(*this, from); } private: @@ -3289,17 +3800,17 @@ namespace protobuf void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(MessageOfMap* other); + void InternalSwap(MessageOfNews* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protobuf.MessageOfMap"; + return "protobuf.MessageOfNews"; } protected: - explicit MessageOfMap(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + explicit MessageOfNews(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3309,37 +3820,50 @@ namespace protobuf // nested types ---------------------------------------------------- - typedef MessageOfMap_Row Row; - // accessors ------------------------------------------------------- enum : int { - kRowFieldNumber = 2, + kNewsFieldNumber = 1, + kFromIdFieldNumber = 2, + kToIdFieldNumber = 3, }; - // repeated .protobuf.MessageOfMap.Row row = 2; - int row_size() const; + // string news = 1; + void clear_news(); + const std::string& news() const; + template + void set_news(ArgT0&& arg0, ArgT... args); + std::string* mutable_news(); + PROTOBUF_NODISCARD std::string* release_news(); + void set_allocated_news(std::string* news); private: - int _internal_row_size() const; + const std::string& _internal_news() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_news(const std::string& value); + std::string* _internal_mutable_news(); public: - void clear_row(); - ::protobuf::MessageOfMap_Row* mutable_row(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>* - mutable_row(); + // int64 from_id = 2; + void clear_from_id(); + int64_t from_id() const; + void set_from_id(int64_t value); private: - const ::protobuf::MessageOfMap_Row& _internal_row(int index) const; - ::protobuf::MessageOfMap_Row* _internal_add_row(); + int64_t _internal_from_id() const; + void _internal_set_from_id(int64_t value); public: - const ::protobuf::MessageOfMap_Row& row(int index) const; - ::protobuf::MessageOfMap_Row* add_row(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>& - row() const; + // int64 to_id = 3; + void clear_to_id(); + int64_t to_id() const; + void set_to_id(int64_t value); - // @@protoc_insertion_point(class_scope:protobuf.MessageOfMap) + private: + int64_t _internal_to_id() const; + void _internal_set_to_id(int64_t value); + + public: + // @@protoc_insertion_point(class_scope:protobuf.MessageOfNews) private: class _Internal; @@ -3350,7 +3874,9 @@ namespace protobuf typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row> row_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr news_; + int64_t from_id_; + int64_t to_id_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -3431,6 +3957,9 @@ namespace protobuf kDoorMessage = 7, kGateMessage = 8, kChestMessage = 9, + kHiddenGateMessage = 10, + kNewsMessage = 11, + kMapMessage = 12, MESSAGE_OF_OBJ_NOT_SET = 0, }; @@ -3441,7 +3970,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 12; + 14; friend void swap(MessageOfObj& a, MessageOfObj& b) { @@ -3542,6 +4071,9 @@ namespace protobuf kDoorMessageFieldNumber = 7, kGateMessageFieldNumber = 8, kChestMessageFieldNumber = 9, + kHiddenGateMessageFieldNumber = 10, + kNewsMessageFieldNumber = 11, + kMapMessageFieldNumber = 12, }; // .protobuf.MessageOfStudent student_message = 1; bool has_student_message() const; @@ -3750,6 +4282,75 @@ namespace protobuf ); ::protobuf::MessageOfChest* unsafe_arena_release_chest_message(); + // .protobuf.MessageOfHiddenGate hidden_gate_message = 10; + bool has_hidden_gate_message() const; + + private: + bool _internal_has_hidden_gate_message() const; + + public: + void clear_hidden_gate_message(); + const ::protobuf::MessageOfHiddenGate& hidden_gate_message() const; + PROTOBUF_NODISCARD ::protobuf::MessageOfHiddenGate* release_hidden_gate_message(); + ::protobuf::MessageOfHiddenGate* mutable_hidden_gate_message(); + void set_allocated_hidden_gate_message(::protobuf::MessageOfHiddenGate* hidden_gate_message); + + private: + const ::protobuf::MessageOfHiddenGate& _internal_hidden_gate_message() const; + ::protobuf::MessageOfHiddenGate* _internal_mutable_hidden_gate_message(); + + public: + void unsafe_arena_set_allocated_hidden_gate_message( + ::protobuf::MessageOfHiddenGate* hidden_gate_message + ); + ::protobuf::MessageOfHiddenGate* unsafe_arena_release_hidden_gate_message(); + + // .protobuf.MessageOfNews news_message = 11; + bool has_news_message() const; + + private: + bool _internal_has_news_message() const; + + public: + void clear_news_message(); + const ::protobuf::MessageOfNews& news_message() const; + PROTOBUF_NODISCARD ::protobuf::MessageOfNews* release_news_message(); + ::protobuf::MessageOfNews* mutable_news_message(); + void set_allocated_news_message(::protobuf::MessageOfNews* news_message); + + private: + const ::protobuf::MessageOfNews& _internal_news_message() const; + ::protobuf::MessageOfNews* _internal_mutable_news_message(); + + public: + void unsafe_arena_set_allocated_news_message( + ::protobuf::MessageOfNews* news_message + ); + ::protobuf::MessageOfNews* unsafe_arena_release_news_message(); + + // .protobuf.MessageOfMap map_message = 12; + bool has_map_message() const; + + private: + bool _internal_has_map_message() const; + + public: + void clear_map_message(); + const ::protobuf::MessageOfMap& map_message() const; + PROTOBUF_NODISCARD ::protobuf::MessageOfMap* release_map_message(); + ::protobuf::MessageOfMap* mutable_map_message(); + void set_allocated_map_message(::protobuf::MessageOfMap* map_message); + + private: + const ::protobuf::MessageOfMap& _internal_map_message() const; + ::protobuf::MessageOfMap* _internal_mutable_map_message(); + + public: + void unsafe_arena_set_allocated_map_message( + ::protobuf::MessageOfMap* map_message + ); + ::protobuf::MessageOfMap* unsafe_arena_release_map_message(); + void clear_message_of_obj(); MessageOfObjCase message_of_obj_case() const; // @@protoc_insertion_point(class_scope:protobuf.MessageOfObj) @@ -3765,6 +4366,9 @@ namespace protobuf void set_has_door_message(); void set_has_gate_message(); void set_has_chest_message(); + void set_has_hidden_gate_message(); + void set_has_news_message(); + void set_has_map_message(); inline bool has_message_of_obj() const; inline void clear_has_message_of_obj(); @@ -3791,6 +4395,9 @@ namespace protobuf ::protobuf::MessageOfDoor* door_message_; ::protobuf::MessageOfGate* gate_message_; ::protobuf::MessageOfChest* chest_message_; + ::protobuf::MessageOfHiddenGate* hidden_gate_message_; + ::protobuf::MessageOfNews* news_message_; + ::protobuf::MessageOfMap* map_message_; } message_of_obj_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -3869,7 +4476,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 13; + 15; friend void swap(MessageOfAll& a, MessageOfAll& b) { @@ -4157,7 +4764,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 14; + 16; friend void swap(MessageToClient& a, MessageToClient& b) { @@ -4398,7 +5005,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 15; + 17; friend void swap(MoveRes& a, MoveRes& b) { @@ -4614,7 +5221,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 16; + 18; friend void swap(BoolRes& a, BoolRes& b) { @@ -4718,226 +5325,7 @@ namespace protobuf void _internal_set_act_success(bool value); public: - // @@protoc_insertion_point(class_scope:protobuf.BoolRes) - - private: - class _Internal; - - template - friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ - { - bool act_success_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union - { - Impl_ _impl_; - }; - friend struct ::TableStruct_Message2Clients_2eproto; - }; - // ------------------------------------------------------------------- - - class MsgRes final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MsgRes) */ - { - public: - inline MsgRes() : - MsgRes(nullptr) - { - } - ~MsgRes() override; - explicit PROTOBUF_CONSTEXPR MsgRes(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MsgRes(const MsgRes& from); - MsgRes(MsgRes&& from) noexcept - : - MsgRes() - { - *this = ::std::move(from); - } - - inline MsgRes& operator=(const MsgRes& from) - { - CopyFrom(from); - return *this; - } - inline MsgRes& operator=(MsgRes&& from) noexcept - { - if (this == &from) - return *this; - if (GetOwningArena() == from.GetOwningArena() -#ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr -#endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) - { - InternalSwap(&from); - } - else - { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() - { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() - { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() - { - return default_instance().GetMetadata().reflection; - } - static const MsgRes& default_instance() - { - return *internal_default_instance(); - } - static inline const MsgRes* internal_default_instance() - { - return reinterpret_cast( - &_MsgRes_default_instance_ - ); - } - static constexpr int kIndexInFileMessages = - 17; - - friend void swap(MsgRes& a, MsgRes& b) - { - a.Swap(&b); - } - inline void Swap(MsgRes* other) - { - if (other == this) - return; -#ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) - { -#else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) - { -#endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } - else - { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MsgRes* other) - { - if (other == this) - return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - MsgRes* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final - { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MsgRes& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const MsgRes& from) - { - MsgRes::MergeImpl(*this, from); - } - - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream - ) const final; - int GetCachedSize() const final - { - return _impl_._cached_size_.Get(); - } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MsgRes* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() - { - return "protobuf.MsgRes"; - } - - protected: - explicit MsgRes(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); - - public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int - { - kMessageReceivedFieldNumber = 3, - kFromPlayerIdFieldNumber = 2, - kHaveMessageFieldNumber = 1, - }; - // string message_received = 3; - void clear_message_received(); - const std::string& message_received() const; - template - void set_message_received(ArgT0&& arg0, ArgT... args); - std::string* mutable_message_received(); - PROTOBUF_NODISCARD std::string* release_message_received(); - void set_allocated_message_received(std::string* message_received); - - private: - const std::string& _internal_message_received() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_message_received(const std::string& value); - std::string* _internal_mutable_message_received(); - - public: - // int64 from_player_id = 2; - void clear_from_player_id(); - int64_t from_player_id() const; - void set_from_player_id(int64_t value); - - private: - int64_t _internal_from_player_id() const; - void _internal_set_from_player_id(int64_t value); - - public: - // bool have_message = 1; - void clear_have_message(); - bool have_message() const; - void set_have_message(bool value); - - private: - bool _internal_have_message() const; - void _internal_set_have_message(bool value); - - public: - // @@protoc_insertion_point(class_scope:protobuf.MsgRes) + // @@protoc_insertion_point(class_scope:protobuf.BoolRes) private: class _Internal; @@ -4948,9 +5336,7 @@ namespace protobuf typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_received_; - int64_t from_player_id_; - bool have_message_; + bool act_success_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -5298,6 +5684,78 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.state) } + // .protobuf.BulletType bullet_type = 12; + inline void MessageOfStudent::clear_bullet_type() + { + _impl_.bullet_type_ = 0; + } + inline ::protobuf::BulletType MessageOfStudent::_internal_bullet_type() const + { + return static_cast<::protobuf::BulletType>(_impl_.bullet_type_); + } + inline ::protobuf::BulletType MessageOfStudent::bullet_type() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.bullet_type) + return _internal_bullet_type(); + } + inline void MessageOfStudent::_internal_set_bullet_type(::protobuf::BulletType value) + { + _impl_.bullet_type_ = value; + } + inline void MessageOfStudent::set_bullet_type(::protobuf::BulletType value) + { + _internal_set_bullet_type(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.bullet_type) + } + + // int32 learning_speed = 13; + inline void MessageOfStudent::clear_learning_speed() + { + _impl_.learning_speed_ = 0; + } + inline int32_t MessageOfStudent::_internal_learning_speed() const + { + return _impl_.learning_speed_; + } + inline int32_t MessageOfStudent::learning_speed() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.learning_speed) + return _internal_learning_speed(); + } + inline void MessageOfStudent::_internal_set_learning_speed(int32_t value) + { + _impl_.learning_speed_ = value; + } + inline void MessageOfStudent::set_learning_speed(int32_t value) + { + _internal_set_learning_speed(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.learning_speed) + } + + // int32 treat_speed = 14; + inline void MessageOfStudent::clear_treat_speed() + { + _impl_.treat_speed_ = 0; + } + inline int32_t MessageOfStudent::_internal_treat_speed() const + { + return _impl_.treat_speed_; + } + inline int32_t MessageOfStudent::treat_speed() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.treat_speed) + return _internal_treat_speed(); + } + inline void MessageOfStudent::_internal_set_treat_speed(int32_t value) + { + _impl_.treat_speed_ = value; + } + inline void MessageOfStudent::set_treat_speed(int32_t value) + { + _internal_set_treat_speed(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.treat_speed) + } + // int64 player_id = 15; inline void MessageOfStudent::clear_player_id() { @@ -5370,30 +5828,6 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.radius) } - // int32 damage = 18; - inline void MessageOfStudent::clear_damage() - { - _impl_.damage_ = 0; - } - inline int32_t MessageOfStudent::_internal_damage() const - { - return _impl_.damage_; - } - inline int32_t MessageOfStudent::damage() const - { - // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.damage) - return _internal_damage(); - } - inline void MessageOfStudent::_internal_set_damage(int32_t value) - { - _impl_.damage_ = value; - } - inline void MessageOfStudent::set_damage(int32_t value) - { - _internal_set_damage(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.damage) - } - // double danger_alert = 19; inline void MessageOfStudent::clear_danger_alert() { @@ -5514,7 +5948,31 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.student_type) } - // repeated .protobuf.StudentBuffType buff = 24; + // double facing_direction = 24; + inline void MessageOfStudent::clear_facing_direction() + { + _impl_.facing_direction_ = 0; + } + inline double MessageOfStudent::_internal_facing_direction() const + { + return _impl_.facing_direction_; + } + inline double MessageOfStudent::facing_direction() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.facing_direction) + return _internal_facing_direction(); + } + inline void MessageOfStudent::_internal_set_facing_direction(double value) + { + _impl_.facing_direction_ = value; + } + inline void MessageOfStudent::set_facing_direction(double value) + { + _internal_set_facing_direction(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.facing_direction) + } + + // repeated .protobuf.StudentBuffType buff = 25; inline int MessageOfStudent::_internal_buff_size() const { return _impl_.buff_.size(); @@ -5853,28 +6311,28 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.guid) } - // bool movable = 10; - inline void MessageOfTricker::clear_movable() + // int32 score = 10; + inline void MessageOfTricker::clear_score() { - _impl_.movable_ = false; + _impl_.score_ = 0; } - inline bool MessageOfTricker::_internal_movable() const + inline int32_t MessageOfTricker::_internal_score() const { - return _impl_.movable_; + return _impl_.score_; } - inline bool MessageOfTricker::movable() const + inline int32_t MessageOfTricker::score() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfTricker.movable) - return _internal_movable(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfTricker.score) + return _internal_score(); } - inline void MessageOfTricker::_internal_set_movable(bool value) + inline void MessageOfTricker::_internal_set_score(int32_t value) { - _impl_.movable_ = value; + _impl_.score_ = value; } - inline void MessageOfTricker::set_movable(bool value) + inline void MessageOfTricker::set_score(int32_t value) { - _internal_set_movable(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.movable) + _internal_set_score(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.score) } // int64 player_id = 11; @@ -6021,7 +6479,55 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.class_volume) } - // repeated .protobuf.TrickerBuffType buff = 17; + // double facing_direction = 17; + inline void MessageOfTricker::clear_facing_direction() + { + _impl_.facing_direction_ = 0; + } + inline double MessageOfTricker::_internal_facing_direction() const + { + return _impl_.facing_direction_; + } + inline double MessageOfTricker::facing_direction() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfTricker.facing_direction) + return _internal_facing_direction(); + } + inline void MessageOfTricker::_internal_set_facing_direction(double value) + { + _impl_.facing_direction_ = value; + } + inline void MessageOfTricker::set_facing_direction(double value) + { + _internal_set_facing_direction(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.facing_direction) + } + + // .protobuf.BulletType bullet_type = 18; + inline void MessageOfTricker::clear_bullet_type() + { + _impl_.bullet_type_ = 0; + } + inline ::protobuf::BulletType MessageOfTricker::_internal_bullet_type() const + { + return static_cast<::protobuf::BulletType>(_impl_.bullet_type_); + } + inline ::protobuf::BulletType MessageOfTricker::bullet_type() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfTricker.bullet_type) + return _internal_bullet_type(); + } + inline void MessageOfTricker::_internal_set_bullet_type(::protobuf::BulletType value) + { + _impl_.bullet_type_ = value; + } + inline void MessageOfTricker::set_bullet_type(::protobuf::BulletType value) + { + _internal_set_bullet_type(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.bullet_type) + } + + // repeated .protobuf.TrickerBuffType buff = 19; inline int MessageOfTricker::_internal_buff_size() const { return _impl_.buff_.size(); @@ -6271,6 +6777,30 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfBullet.bomb_range) } + // int32 speed = 9; + inline void MessageOfBullet::clear_speed() + { + _impl_.speed_ = 0; + } + inline int32_t MessageOfBullet::_internal_speed() const + { + return _impl_.speed_; + } + inline int32_t MessageOfBullet::speed() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfBullet.speed) + return _internal_speed(); + } + inline void MessageOfBullet::_internal_set_speed(int32_t value) + { + _impl_.speed_ = value; + } + inline void MessageOfBullet::set_speed(int32_t value) + { + _internal_set_speed(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfBullet.speed) + } + // ------------------------------------------------------------------- // MessageOfBombedBullet @@ -6893,6 +7423,82 @@ namespace protobuf // ------------------------------------------------------------------- + // MessageOfHiddenGate + + // int32 x = 1; + inline void MessageOfHiddenGate::clear_x() + { + _impl_.x_ = 0; + } + inline int32_t MessageOfHiddenGate::_internal_x() const + { + return _impl_.x_; + } + inline int32_t MessageOfHiddenGate::x() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfHiddenGate.x) + return _internal_x(); + } + inline void MessageOfHiddenGate::_internal_set_x(int32_t value) + { + _impl_.x_ = value; + } + inline void MessageOfHiddenGate::set_x(int32_t value) + { + _internal_set_x(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfHiddenGate.x) + } + + // int32 y = 2; + inline void MessageOfHiddenGate::clear_y() + { + _impl_.y_ = 0; + } + inline int32_t MessageOfHiddenGate::_internal_y() const + { + return _impl_.y_; + } + inline int32_t MessageOfHiddenGate::y() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfHiddenGate.y) + return _internal_y(); + } + inline void MessageOfHiddenGate::_internal_set_y(int32_t value) + { + _impl_.y_ = value; + } + inline void MessageOfHiddenGate::set_y(int32_t value) + { + _internal_set_y(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfHiddenGate.y) + } + + // bool opened = 3; + inline void MessageOfHiddenGate::clear_opened() + { + _impl_.opened_ = false; + } + inline bool MessageOfHiddenGate::_internal_opened() const + { + return _impl_.opened_; + } + inline bool MessageOfHiddenGate::opened() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfHiddenGate.opened) + return _internal_opened(); + } + inline void MessageOfHiddenGate::_internal_set_opened(bool value) + { + _impl_.opened_ = value; + } + inline void MessageOfHiddenGate::set_opened(bool value) + { + _internal_set_opened(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfHiddenGate.opened) + } + + // ------------------------------------------------------------------- + // MessageOfDoor // int32 x = 1; @@ -6967,6 +7573,30 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfDoor.is_open) } + // int32 number = 4; + inline void MessageOfDoor::clear_number() + { + _impl_.number_ = 0; + } + inline int32_t MessageOfDoor::_internal_number() const + { + return _impl_.number_; + } + inline int32_t MessageOfDoor::number() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfDoor.number) + return _internal_number(); + } + inline void MessageOfDoor::_internal_set_number(int32_t value) + { + _impl_.number_ = value; + } + inline void MessageOfDoor::set_number(int32_t value) + { + _internal_set_number(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfDoor.number) + } + // ------------------------------------------------------------------- // MessageOfChest @@ -7105,54 +7735,163 @@ namespace protobuf // MessageOfMap - // repeated .protobuf.MessageOfMap.Row row = 2; - inline int MessageOfMap::_internal_row_size() const + // repeated .protobuf.MessageOfMap.Row row = 2; + inline int MessageOfMap::_internal_row_size() const + { + return _impl_.row_.size(); + } + inline int MessageOfMap::row_size() const + { + return _internal_row_size(); + } + inline void MessageOfMap::clear_row() + { + _impl_.row_.Clear(); + } + inline ::protobuf::MessageOfMap_Row* MessageOfMap::mutable_row(int index) + { + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfMap.row) + return _impl_.row_.Mutable(index); + } + inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>* + MessageOfMap::mutable_row() + { + // @@protoc_insertion_point(field_mutable_list:protobuf.MessageOfMap.row) + return &_impl_.row_; + } + inline const ::protobuf::MessageOfMap_Row& MessageOfMap::_internal_row(int index) const + { + return _impl_.row_.Get(index); + } + inline const ::protobuf::MessageOfMap_Row& MessageOfMap::row(int index) const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfMap.row) + return _internal_row(index); + } + inline ::protobuf::MessageOfMap_Row* MessageOfMap::_internal_add_row() + { + return _impl_.row_.Add(); + } + inline ::protobuf::MessageOfMap_Row* MessageOfMap::add_row() + { + ::protobuf::MessageOfMap_Row* _add = _internal_add_row(); + // @@protoc_insertion_point(field_add:protobuf.MessageOfMap.row) + return _add; + } + inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>& + MessageOfMap::row() const + { + // @@protoc_insertion_point(field_list:protobuf.MessageOfMap.row) + return _impl_.row_; + } + + // ------------------------------------------------------------------- + + // MessageOfNews + + // string news = 1; + inline void MessageOfNews::clear_news() + { + _impl_.news_.ClearToEmpty(); + } + inline const std::string& MessageOfNews::news() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfNews.news) + return _internal_news(); + } + template + inline PROTOBUF_ALWAYS_INLINE void MessageOfNews::set_news(ArgT0&& arg0, ArgT... args) + { + _impl_.news_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:protobuf.MessageOfNews.news) + } + inline std::string* MessageOfNews::mutable_news() + { + std::string* _s = _internal_mutable_news(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfNews.news) + return _s; + } + inline const std::string& MessageOfNews::_internal_news() const + { + return _impl_.news_.Get(); + } + inline void MessageOfNews::_internal_set_news(const std::string& value) + { + _impl_.news_.Set(value, GetArenaForAllocation()); + } + inline std::string* MessageOfNews::_internal_mutable_news() + { + return _impl_.news_.Mutable(GetArenaForAllocation()); + } + inline std::string* MessageOfNews::release_news() + { + // @@protoc_insertion_point(field_release:protobuf.MessageOfNews.news) + return _impl_.news_.Release(); + } + inline void MessageOfNews::set_allocated_news(std::string* news) + { + if (news != nullptr) + { + } + else + { + } + _impl_.news_.SetAllocated(news, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.news_.IsDefault()) + { + _impl_.news_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfNews.news) + } + + // int64 from_id = 2; + inline void MessageOfNews::clear_from_id() { - return _impl_.row_.size(); + _impl_.from_id_ = int64_t{0}; } - inline int MessageOfMap::row_size() const + inline int64_t MessageOfNews::_internal_from_id() const { - return _internal_row_size(); + return _impl_.from_id_; } - inline void MessageOfMap::clear_row() + inline int64_t MessageOfNews::from_id() const { - _impl_.row_.Clear(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfNews.from_id) + return _internal_from_id(); } - inline ::protobuf::MessageOfMap_Row* MessageOfMap::mutable_row(int index) + inline void MessageOfNews::_internal_set_from_id(int64_t value) { - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfMap.row) - return _impl_.row_.Mutable(index); + _impl_.from_id_ = value; } - inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>* - MessageOfMap::mutable_row() + inline void MessageOfNews::set_from_id(int64_t value) { - // @@protoc_insertion_point(field_mutable_list:protobuf.MessageOfMap.row) - return &_impl_.row_; + _internal_set_from_id(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfNews.from_id) } - inline const ::protobuf::MessageOfMap_Row& MessageOfMap::_internal_row(int index) const + + // int64 to_id = 3; + inline void MessageOfNews::clear_to_id() { - return _impl_.row_.Get(index); + _impl_.to_id_ = int64_t{0}; } - inline const ::protobuf::MessageOfMap_Row& MessageOfMap::row(int index) const + inline int64_t MessageOfNews::_internal_to_id() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfMap.row) - return _internal_row(index); + return _impl_.to_id_; } - inline ::protobuf::MessageOfMap_Row* MessageOfMap::_internal_add_row() + inline int64_t MessageOfNews::to_id() const { - return _impl_.row_.Add(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfNews.to_id) + return _internal_to_id(); } - inline ::protobuf::MessageOfMap_Row* MessageOfMap::add_row() + inline void MessageOfNews::_internal_set_to_id(int64_t value) { - ::protobuf::MessageOfMap_Row* _add = _internal_add_row(); - // @@protoc_insertion_point(field_add:protobuf.MessageOfMap.row) - return _add; + _impl_.to_id_ = value; } - inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>& - MessageOfMap::row() const + inline void MessageOfNews::set_to_id(int64_t value) { - // @@protoc_insertion_point(field_list:protobuf.MessageOfMap.row) - return _impl_.row_; + _internal_set_to_id(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfNews.to_id) } // ------------------------------------------------------------------- @@ -8005,6 +8744,288 @@ namespace protobuf return _msg; } + // .protobuf.MessageOfHiddenGate hidden_gate_message = 10; + inline bool MessageOfObj::_internal_has_hidden_gate_message() const + { + return message_of_obj_case() == kHiddenGateMessage; + } + inline bool MessageOfObj::has_hidden_gate_message() const + { + return _internal_has_hidden_gate_message(); + } + inline void MessageOfObj::set_has_hidden_gate_message() + { + _impl_._oneof_case_[0] = kHiddenGateMessage; + } + inline void MessageOfObj::clear_hidden_gate_message() + { + if (_internal_has_hidden_gate_message()) + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.hidden_gate_message_; + } + clear_has_message_of_obj(); + } + } + inline ::protobuf::MessageOfHiddenGate* MessageOfObj::release_hidden_gate_message() + { + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.hidden_gate_message) + if (_internal_has_hidden_gate_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfHiddenGate* temp = _impl_.message_of_obj_.hidden_gate_message_; + if (GetArenaForAllocation() != nullptr) + { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.message_of_obj_.hidden_gate_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } + } + inline const ::protobuf::MessageOfHiddenGate& MessageOfObj::_internal_hidden_gate_message() const + { + return _internal_has_hidden_gate_message() ? *_impl_.message_of_obj_.hidden_gate_message_ : reinterpret_cast<::protobuf::MessageOfHiddenGate&>(::protobuf::_MessageOfHiddenGate_default_instance_); + } + inline const ::protobuf::MessageOfHiddenGate& MessageOfObj::hidden_gate_message() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.hidden_gate_message) + return _internal_hidden_gate_message(); + } + inline ::protobuf::MessageOfHiddenGate* MessageOfObj::unsafe_arena_release_hidden_gate_message() + { + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.hidden_gate_message) + if (_internal_has_hidden_gate_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfHiddenGate* temp = _impl_.message_of_obj_.hidden_gate_message_; + _impl_.message_of_obj_.hidden_gate_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } + } + inline void MessageOfObj::unsafe_arena_set_allocated_hidden_gate_message(::protobuf::MessageOfHiddenGate* hidden_gate_message) + { + clear_message_of_obj(); + if (hidden_gate_message) + { + set_has_hidden_gate_message(); + _impl_.message_of_obj_.hidden_gate_message_ = hidden_gate_message; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.hidden_gate_message) + } + inline ::protobuf::MessageOfHiddenGate* MessageOfObj::_internal_mutable_hidden_gate_message() + { + if (!_internal_has_hidden_gate_message()) + { + clear_message_of_obj(); + set_has_hidden_gate_message(); + _impl_.message_of_obj_.hidden_gate_message_ = CreateMaybeMessage<::protobuf::MessageOfHiddenGate>(GetArenaForAllocation()); + } + return _impl_.message_of_obj_.hidden_gate_message_; + } + inline ::protobuf::MessageOfHiddenGate* MessageOfObj::mutable_hidden_gate_message() + { + ::protobuf::MessageOfHiddenGate* _msg = _internal_mutable_hidden_gate_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.hidden_gate_message) + return _msg; + } + + // .protobuf.MessageOfNews news_message = 11; + inline bool MessageOfObj::_internal_has_news_message() const + { + return message_of_obj_case() == kNewsMessage; + } + inline bool MessageOfObj::has_news_message() const + { + return _internal_has_news_message(); + } + inline void MessageOfObj::set_has_news_message() + { + _impl_._oneof_case_[0] = kNewsMessage; + } + inline void MessageOfObj::clear_news_message() + { + if (_internal_has_news_message()) + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.news_message_; + } + clear_has_message_of_obj(); + } + } + inline ::protobuf::MessageOfNews* MessageOfObj::release_news_message() + { + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.news_message) + if (_internal_has_news_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfNews* temp = _impl_.message_of_obj_.news_message_; + if (GetArenaForAllocation() != nullptr) + { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.message_of_obj_.news_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } + } + inline const ::protobuf::MessageOfNews& MessageOfObj::_internal_news_message() const + { + return _internal_has_news_message() ? *_impl_.message_of_obj_.news_message_ : reinterpret_cast<::protobuf::MessageOfNews&>(::protobuf::_MessageOfNews_default_instance_); + } + inline const ::protobuf::MessageOfNews& MessageOfObj::news_message() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.news_message) + return _internal_news_message(); + } + inline ::protobuf::MessageOfNews* MessageOfObj::unsafe_arena_release_news_message() + { + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.news_message) + if (_internal_has_news_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfNews* temp = _impl_.message_of_obj_.news_message_; + _impl_.message_of_obj_.news_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } + } + inline void MessageOfObj::unsafe_arena_set_allocated_news_message(::protobuf::MessageOfNews* news_message) + { + clear_message_of_obj(); + if (news_message) + { + set_has_news_message(); + _impl_.message_of_obj_.news_message_ = news_message; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.news_message) + } + inline ::protobuf::MessageOfNews* MessageOfObj::_internal_mutable_news_message() + { + if (!_internal_has_news_message()) + { + clear_message_of_obj(); + set_has_news_message(); + _impl_.message_of_obj_.news_message_ = CreateMaybeMessage<::protobuf::MessageOfNews>(GetArenaForAllocation()); + } + return _impl_.message_of_obj_.news_message_; + } + inline ::protobuf::MessageOfNews* MessageOfObj::mutable_news_message() + { + ::protobuf::MessageOfNews* _msg = _internal_mutable_news_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.news_message) + return _msg; + } + + // .protobuf.MessageOfMap map_message = 12; + inline bool MessageOfObj::_internal_has_map_message() const + { + return message_of_obj_case() == kMapMessage; + } + inline bool MessageOfObj::has_map_message() const + { + return _internal_has_map_message(); + } + inline void MessageOfObj::set_has_map_message() + { + _impl_._oneof_case_[0] = kMapMessage; + } + inline void MessageOfObj::clear_map_message() + { + if (_internal_has_map_message()) + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.map_message_; + } + clear_has_message_of_obj(); + } + } + inline ::protobuf::MessageOfMap* MessageOfObj::release_map_message() + { + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.map_message) + if (_internal_has_map_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfMap* temp = _impl_.message_of_obj_.map_message_; + if (GetArenaForAllocation() != nullptr) + { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.message_of_obj_.map_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } + } + inline const ::protobuf::MessageOfMap& MessageOfObj::_internal_map_message() const + { + return _internal_has_map_message() ? *_impl_.message_of_obj_.map_message_ : reinterpret_cast<::protobuf::MessageOfMap&>(::protobuf::_MessageOfMap_default_instance_); + } + inline const ::protobuf::MessageOfMap& MessageOfObj::map_message() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.map_message) + return _internal_map_message(); + } + inline ::protobuf::MessageOfMap* MessageOfObj::unsafe_arena_release_map_message() + { + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.map_message) + if (_internal_has_map_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfMap* temp = _impl_.message_of_obj_.map_message_; + _impl_.message_of_obj_.map_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } + } + inline void MessageOfObj::unsafe_arena_set_allocated_map_message(::protobuf::MessageOfMap* map_message) + { + clear_message_of_obj(); + if (map_message) + { + set_has_map_message(); + _impl_.message_of_obj_.map_message_ = map_message; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.map_message) + } + inline ::protobuf::MessageOfMap* MessageOfObj::_internal_mutable_map_message() + { + if (!_internal_has_map_message()) + { + clear_message_of_obj(); + set_has_map_message(); + _impl_.message_of_obj_.map_message_ = CreateMaybeMessage<::protobuf::MessageOfMap>(GetArenaForAllocation()); + } + return _impl_.message_of_obj_.map_message_; + } + inline ::protobuf::MessageOfMap* MessageOfObj::mutable_map_message() + { + ::protobuf::MessageOfMap* _msg = _internal_mutable_map_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.map_message) + return _msg; + } + inline bool MessageOfObj::has_message_of_obj() const { return message_of_obj_case() != MESSAGE_OF_OBJ_NOT_SET; @@ -8530,115 +9551,6 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.BoolRes.act_success) } - // ------------------------------------------------------------------- - - // MsgRes - - // bool have_message = 1; - inline void MsgRes::clear_have_message() - { - _impl_.have_message_ = false; - } - inline bool MsgRes::_internal_have_message() const - { - return _impl_.have_message_; - } - inline bool MsgRes::have_message() const - { - // @@protoc_insertion_point(field_get:protobuf.MsgRes.have_message) - return _internal_have_message(); - } - inline void MsgRes::_internal_set_have_message(bool value) - { - _impl_.have_message_ = value; - } - inline void MsgRes::set_have_message(bool value) - { - _internal_set_have_message(value); - // @@protoc_insertion_point(field_set:protobuf.MsgRes.have_message) - } - - // int64 from_player_id = 2; - inline void MsgRes::clear_from_player_id() - { - _impl_.from_player_id_ = int64_t{0}; - } - inline int64_t MsgRes::_internal_from_player_id() const - { - return _impl_.from_player_id_; - } - inline int64_t MsgRes::from_player_id() const - { - // @@protoc_insertion_point(field_get:protobuf.MsgRes.from_player_id) - return _internal_from_player_id(); - } - inline void MsgRes::_internal_set_from_player_id(int64_t value) - { - _impl_.from_player_id_ = value; - } - inline void MsgRes::set_from_player_id(int64_t value) - { - _internal_set_from_player_id(value); - // @@protoc_insertion_point(field_set:protobuf.MsgRes.from_player_id) - } - - // string message_received = 3; - inline void MsgRes::clear_message_received() - { - _impl_.message_received_.ClearToEmpty(); - } - inline const std::string& MsgRes::message_received() const - { - // @@protoc_insertion_point(field_get:protobuf.MsgRes.message_received) - return _internal_message_received(); - } - template - inline PROTOBUF_ALWAYS_INLINE void MsgRes::set_message_received(ArgT0&& arg0, ArgT... args) - { - _impl_.message_received_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protobuf.MsgRes.message_received) - } - inline std::string* MsgRes::mutable_message_received() - { - std::string* _s = _internal_mutable_message_received(); - // @@protoc_insertion_point(field_mutable:protobuf.MsgRes.message_received) - return _s; - } - inline const std::string& MsgRes::_internal_message_received() const - { - return _impl_.message_received_.Get(); - } - inline void MsgRes::_internal_set_message_received(const std::string& value) - { - _impl_.message_received_.Set(value, GetArenaForAllocation()); - } - inline std::string* MsgRes::_internal_mutable_message_received() - { - return _impl_.message_received_.Mutable(GetArenaForAllocation()); - } - inline std::string* MsgRes::release_message_received() - { - // @@protoc_insertion_point(field_release:protobuf.MsgRes.message_received) - return _impl_.message_received_.Release(); - } - inline void MsgRes::set_allocated_message_received(std::string* message_received) - { - if (message_received != nullptr) - { - } - else - { - } - _impl_.message_received_.SetAllocated(message_received, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.message_received_.IsDefault()) - { - _impl_.message_received_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protobuf.MsgRes.message_received) - } - #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -8676,6 +9588,8 @@ namespace protobuf // ------------------------------------------------------------------- + // ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) } // namespace protobuf diff --git a/CAPI/cpp/proto/Message2Server.pb.h b/CAPI/cpp/proto/Message2Server.pb.h index 3a8896f..408408f 100644 --- a/CAPI/cpp/proto/Message2Server.pb.h +++ b/CAPI/cpp/proto/Message2Server.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff --git a/CAPI/cpp/proto/MessageType.pb.h b/CAPI/cpp/proto/MessageType.pb.h index d85d123..7a10f95 100644 --- a/CAPI/cpp/proto/MessageType.pb.h +++ b/CAPI/cpp/proto/MessageType.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff --git a/CAPI/cpp/proto/Services.grpc.pb.cc b/CAPI/cpp/proto/Services.grpc.pb.cc index 7d1e51b..83f5f97 100644 --- a/CAPI/cpp/proto/Services.grpc.pb.cc +++ b/CAPI/cpp/proto/Services.grpc.pb.cc @@ -28,9 +28,9 @@ namespace protobuf "/protobuf.AvailableService/Move", "/protobuf.AvailableService/PickProp", "/protobuf.AvailableService/UseProp", + "/protobuf.AvailableService/ThrowProp", "/protobuf.AvailableService/UseSkill", "/protobuf.AvailableService/SendMessage", - "/protobuf.AvailableService/GetMessage", "/protobuf.AvailableService/StartLearning", "/protobuf.AvailableService/StartRescueMate", "/protobuf.AvailableService/StartTreatMate", @@ -42,7 +42,6 @@ namespace protobuf "/protobuf.AvailableService/StartOpenGate", "/protobuf.AvailableService/StartOpenChest", "/protobuf.AvailableService/EndAllAction", - "/protobuf.AvailableService/GetMap", }; std::unique_ptr AvailableService::NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) @@ -59,9 +58,9 @@ namespace protobuf rpcmethod_Move_(AvailableService_method_names[2], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_PickProp_(AvailableService_method_names[3], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_UseProp_(AvailableService_method_names[4], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_UseSkill_(AvailableService_method_names[5], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_SendMessage_(AvailableService_method_names[6], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_GetMessage_(AvailableService_method_names[7], options.suffix_for_stats(), ::grpc::internal::RpcMethod::SERVER_STREAMING, channel), + rpcmethod_ThrowProp_(AvailableService_method_names[5], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_UseSkill_(AvailableService_method_names[6], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_SendMessage_(AvailableService_method_names[7], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_StartLearning_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_StartRescueMate_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_StartTreatMate_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), @@ -72,8 +71,7 @@ namespace protobuf rpcmethod_SkipWindow_(AvailableService_method_names[15], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_StartOpenGate_(AvailableService_method_names[16], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_StartOpenChest_(AvailableService_method_names[17], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_EndAllAction_(AvailableService_method_names[18], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_GetMap_(AvailableService_method_names[19], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + rpcmethod_EndAllAction_(AvailableService_method_names[18], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel) { } @@ -209,6 +207,34 @@ namespace protobuf return result; } + ::grpc::Status AvailableService::Stub::ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::protobuf::BoolRes* response) + { + return ::grpc::internal::BlockingUnaryCall<::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ThrowProp_, context, request, response); + } + + void AvailableService::Stub::async::ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, std::function f) + { + ::grpc::internal::CallbackUnaryCall<::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ThrowProp_, context, request, response, std::move(f)); + } + + void AvailableService::Stub::async::ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) + { + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ThrowProp_, context, request, response, reactor); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncThrowPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) + { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::PropMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ThrowProp_, context, request); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncThrowPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) + { + auto* result = + this->PrepareAsyncThrowPropRaw(context, request, cq); + result->StartCall(); + return result; + } + ::grpc::Status AvailableService::Stub::UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::protobuf::BoolRes* response) { return ::grpc::internal::BlockingUnaryCall<::protobuf::SkillMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseSkill_, context, request, response); @@ -265,26 +291,6 @@ namespace protobuf return result; } - ::grpc::ClientReader<::protobuf::MsgRes>* AvailableService::Stub::GetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request) - { - return ::grpc::internal::ClientReaderFactory<::protobuf::MsgRes>::Create(channel_.get(), rpcmethod_GetMessage_, context, request); - } - - void AvailableService::Stub::async::GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::grpc::ClientReadReactor<::protobuf::MsgRes>* reactor) - { - ::grpc::internal::ClientCallbackReaderFactory<::protobuf::MsgRes>::Create(stub_->channel_.get(), stub_->rpcmethod_GetMessage_, context, request, reactor); - } - - ::grpc::ClientAsyncReader<::protobuf::MsgRes>* AvailableService::Stub::AsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq, void* tag) - { - return ::grpc::internal::ClientAsyncReaderFactory<::protobuf::MsgRes>::Create(channel_.get(), cq, rpcmethod_GetMessage_, context, request, true, tag); - } - - ::grpc::ClientAsyncReader<::protobuf::MsgRes>* AvailableService::Stub::PrepareAsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return ::grpc::internal::ClientAsyncReaderFactory<::protobuf::MsgRes>::Create(channel_.get(), cq, rpcmethod_GetMessage_, context, request, false, nullptr); - } - ::grpc::Status AvailableService::Stub::StartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) { return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartLearning_, context, request, response); @@ -593,34 +599,6 @@ namespace protobuf return result; } - ::grpc::Status AvailableService::Stub::GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::MessageOfMap* response) - { - return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::MessageOfMap, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetMap_, context, request, response); - } - - void AvailableService::Stub::async::GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response, std::function f) - { - ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::MessageOfMap, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetMap_, context, request, response, std::move(f)); - } - - void AvailableService::Stub::async::GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response, ::grpc::ClientUnaryReactor* reactor) - { - ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetMap_, context, request, response, reactor); - } - - ::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>* AvailableService::Stub::PrepareAsyncGetMapRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::MessageOfMap, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetMap_, context, request); - } - - ::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>* AvailableService::Stub::AsyncGetMapRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - auto* result = - this->PrepareAsyncGetMapRaw(context, request, cq); - result->StartCall(); - return result; - } - AvailableService::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( @@ -696,13 +674,13 @@ namespace protobuf AddMethod(new ::grpc::internal::RpcServiceMethod( AvailableService_method_names[5], ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler( + new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, ::grpc::ServerContext* ctx, - const ::protobuf::SkillMsg* req, + const ::protobuf::PropMsg* req, ::protobuf::BoolRes* resp) { - return service->UseSkill(ctx, req, resp); + return service->ThrowProp(ctx, req, resp); }, this ) @@ -710,27 +688,27 @@ namespace protobuf AddMethod(new ::grpc::internal::RpcServiceMethod( AvailableService_method_names[6], ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler( + new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, ::grpc::ServerContext* ctx, - const ::protobuf::SendMsg* req, + const ::protobuf::SkillMsg* req, ::protobuf::BoolRes* resp) { - return service->SendMessage(ctx, req, resp); + return service->UseSkill(ctx, req, resp); }, this ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( AvailableService_method_names[7], - ::grpc::internal::RpcMethod::SERVER_STREAMING, - new ::grpc::internal::ServerStreamingHandler( + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, ::grpc::ServerContext* ctx, - const ::protobuf::IDMsg* req, - ::grpc::ServerWriter<::protobuf::MsgRes>* writer) + const ::protobuf::SendMsg* req, + ::protobuf::BoolRes* resp) { - return service->GetMessage(ctx, req, writer); + return service->SendMessage(ctx, req, resp); }, this ) @@ -889,20 +867,6 @@ namespace protobuf this ) )); - AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[19], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler( - [](AvailableService::Service* service, - ::grpc::ServerContext* ctx, - const ::protobuf::IDMsg* req, - ::protobuf::MessageOfMap* resp) - { - return service->GetMap(ctx, req, resp); - }, - this - ) - )); } AvailableService::Service::~Service() @@ -949,7 +913,7 @@ namespace protobuf return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - ::grpc::Status AvailableService::Service::UseSkill(::grpc::ServerContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response) + ::grpc::Status AvailableService::Service::ThrowProp(::grpc::ServerContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response) { (void)context; (void)request; @@ -957,7 +921,7 @@ namespace protobuf return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - ::grpc::Status AvailableService::Service::SendMessage(::grpc::ServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response) + ::grpc::Status AvailableService::Service::UseSkill(::grpc::ServerContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response) { (void)context; (void)request; @@ -965,11 +929,11 @@ namespace protobuf return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - ::grpc::Status AvailableService::Service::GetMessage(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::grpc::ServerWriter<::protobuf::MsgRes>* writer) + ::grpc::Status AvailableService::Service::SendMessage(::grpc::ServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response) { (void)context; (void)request; - (void)writer; + (void)response; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1061,12 +1025,4 @@ namespace protobuf return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - ::grpc::Status AvailableService::Service::GetMap(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response) - { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - } // namespace protobuf diff --git a/CAPI/cpp/proto/Services.grpc.pb.h b/CAPI/cpp/proto/Services.grpc.pb.h index 9299202..965f79e 100644 --- a/CAPI/cpp/proto/Services.grpc.pb.h +++ b/CAPI/cpp/proto/Services.grpc.pb.h @@ -92,6 +92,15 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncUsePropRaw(context, request, cq)); } + virtual ::grpc::Status ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::protobuf::BoolRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncThrowPropRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncThrowPropRaw(context, request, cq)); + } virtual ::grpc::Status UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::protobuf::BoolRes* response) = 0; std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncUseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq) { @@ -110,18 +119,7 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncSendMessageRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientReaderInterface<::protobuf::MsgRes>> GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request) - { - return std::unique_ptr<::grpc::ClientReaderInterface<::protobuf::MsgRes>>(GetMessageRaw(context, request)); - } - std::unique_ptr<::grpc::ClientAsyncReaderInterface<::protobuf::MsgRes>> AsyncGetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq, void* tag) - { - return std::unique_ptr<::grpc::ClientAsyncReaderInterface<::protobuf::MsgRes>>(AsyncGetMessageRaw(context, request, cq, tag)); - } - std::unique_ptr<::grpc::ClientAsyncReaderInterface<::protobuf::MsgRes>> PrepareAsyncGetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return std::unique_ptr<::grpc::ClientAsyncReaderInterface<::protobuf::MsgRes>>(PrepareAsyncGetMessageRaw(context, request, cq)); - } + // rpc GetMessage (IDMsg) returns (stream MsgRes); virtual ::grpc::Status StartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncStartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { @@ -230,16 +228,6 @@ namespace protobuf return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncEndAllActionRaw(context, request, cq)); } // 结束所有动作 - virtual ::grpc::Status GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::MessageOfMap* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::MessageOfMap>> AsyncGetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::MessageOfMap>>(AsyncGetMapRaw(context, request, cq)); - } - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::MessageOfMap>> PrepareAsyncGetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::MessageOfMap>>(PrepareAsyncGetMapRaw(context, request, cq)); - } - // 游戏开始时候获取地图 class async_interface { public: @@ -258,11 +246,13 @@ namespace protobuf virtual void PickProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void UseProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void UseProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, std::function) = 0; + virtual void ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void SendMessage(::grpc::ClientContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void SendMessage(::grpc::ClientContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::grpc::ClientReadReactor<::protobuf::MsgRes>* reactor) = 0; + // rpc GetMessage (IDMsg) returns (stream MsgRes); virtual void StartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void StartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; // 开始修理机器 @@ -294,9 +284,6 @@ namespace protobuf virtual void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; // 结束所有动作 - virtual void GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response, std::function) = 0; - virtual void GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response, ::grpc::ClientUnaryReactor* reactor) = 0; - // 游戏开始时候获取地图 }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() @@ -320,13 +307,12 @@ namespace protobuf virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncThrowPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncThrowPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncSendMessageRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncSendMessageRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientReaderInterface<::protobuf::MsgRes>* GetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request) = 0; - virtual ::grpc::ClientAsyncReaderInterface<::protobuf::MsgRes>* AsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderInterface<::protobuf::MsgRes>* PrepareAsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncStartLearningRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncStartLearningRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncStartRescueMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; @@ -349,8 +335,6 @@ namespace protobuf virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncStartOpenChestRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::MessageOfMap>* AsyncGetMapRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::MessageOfMap>* PrepareAsyncGetMapRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { @@ -404,6 +388,15 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncUsePropRaw(context, request, cq)); } + ::grpc::Status ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::protobuf::BoolRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncThrowPropRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncThrowPropRaw(context, request, cq)); + } ::grpc::Status UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::protobuf::BoolRes* response) override; std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncUseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq) { @@ -422,18 +415,6 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncSendMessageRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientReader<::protobuf::MsgRes>> GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request) - { - return std::unique_ptr<::grpc::ClientReader<::protobuf::MsgRes>>(GetMessageRaw(context, request)); - } - std::unique_ptr<::grpc::ClientAsyncReader<::protobuf::MsgRes>> AsyncGetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq, void* tag) - { - return std::unique_ptr<::grpc::ClientAsyncReader<::protobuf::MsgRes>>(AsyncGetMessageRaw(context, request, cq, tag)); - } - std::unique_ptr<::grpc::ClientAsyncReader<::protobuf::MsgRes>> PrepareAsyncGetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return std::unique_ptr<::grpc::ClientAsyncReader<::protobuf::MsgRes>>(PrepareAsyncGetMessageRaw(context, request, cq)); - } ::grpc::Status StartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncStartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { @@ -533,15 +514,6 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncEndAllActionRaw(context, request, cq)); } - ::grpc::Status GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::MessageOfMap* response) override; - std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>> AsyncGetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>>(AsyncGetMapRaw(context, request, cq)); - } - std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>> PrepareAsyncGetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) - { - return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>>(PrepareAsyncGetMapRaw(context, request, cq)); - } class async final : public StubInterface::async_interface { @@ -555,11 +527,12 @@ namespace protobuf void PickProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void UseProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, std::function) override; void UseProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; + void ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, std::function) override; + void ThrowProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response, std::function) override; void UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void SendMessage(::grpc::ClientContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response, std::function) override; void SendMessage(::grpc::ClientContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; - void GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::grpc::ClientReadReactor<::protobuf::MsgRes>* reactor) override; void StartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; void StartLearning(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void StartRescueMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; @@ -582,8 +555,6 @@ namespace protobuf void StartOpenChest(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; - void GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response, std::function) override; - void GetMap(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response, ::grpc::ClientUnaryReactor* reactor) override; private: friend class Stub; @@ -619,13 +590,12 @@ namespace protobuf ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncThrowPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncThrowPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncSendMessageRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncSendMessageRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientReader<::protobuf::MsgRes>* GetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request) override; - ::grpc::ClientAsyncReader<::protobuf::MsgRes>* AsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReader<::protobuf::MsgRes>* PrepareAsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncStartLearningRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncStartLearningRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncStartRescueMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; @@ -648,16 +618,14 @@ namespace protobuf ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncStartOpenChestRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>* AsyncGetMapRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader<::protobuf::MessageOfMap>* PrepareAsyncGetMapRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_TryConnection_; const ::grpc::internal::RpcMethod rpcmethod_AddPlayer_; const ::grpc::internal::RpcMethod rpcmethod_Move_; const ::grpc::internal::RpcMethod rpcmethod_PickProp_; const ::grpc::internal::RpcMethod rpcmethod_UseProp_; + const ::grpc::internal::RpcMethod rpcmethod_ThrowProp_; const ::grpc::internal::RpcMethod rpcmethod_UseSkill_; const ::grpc::internal::RpcMethod rpcmethod_SendMessage_; - const ::grpc::internal::RpcMethod rpcmethod_GetMessage_; const ::grpc::internal::RpcMethod rpcmethod_StartLearning_; const ::grpc::internal::RpcMethod rpcmethod_StartRescueMate_; const ::grpc::internal::RpcMethod rpcmethod_StartTreatMate_; @@ -669,7 +637,6 @@ namespace protobuf const ::grpc::internal::RpcMethod rpcmethod_StartOpenGate_; const ::grpc::internal::RpcMethod rpcmethod_StartOpenChest_; const ::grpc::internal::RpcMethod rpcmethod_EndAllAction_; - const ::grpc::internal::RpcMethod rpcmethod_GetMap_; }; static std::unique_ptr NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -686,9 +653,10 @@ namespace protobuf virtual ::grpc::Status Move(::grpc::ServerContext* context, const ::protobuf::MoveMsg* request, ::protobuf::MoveRes* response); virtual ::grpc::Status PickProp(::grpc::ServerContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status UseProp(::grpc::ServerContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response); + virtual ::grpc::Status ThrowProp(::grpc::ServerContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status UseSkill(::grpc::ServerContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status SendMessage(::grpc::ServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response); - virtual ::grpc::Status GetMessage(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::grpc::ServerWriter<::protobuf::MsgRes>* writer); + // rpc GetMessage (IDMsg) returns (stream MsgRes); virtual ::grpc::Status StartLearning(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); // 开始修理机器 virtual ::grpc::Status StartRescueMate(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); @@ -709,8 +677,6 @@ namespace protobuf virtual ::grpc::Status StartOpenChest(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status EndAllAction(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); // 结束所有动作 - virtual ::grpc::Status GetMap(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response); - // 游戏开始时候获取地图 }; template class WithAsyncMethod_TryConnection : public BaseClass @@ -853,7 +819,7 @@ namespace protobuf } }; template - class WithAsyncMethod_UseSkill : public BaseClass + class WithAsyncMethod_ThrowProp : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -861,27 +827,27 @@ namespace protobuf } public: - WithAsyncMethod_UseSkill() + WithAsyncMethod_ThrowProp() { ::grpc::Service::MarkMethodAsync(5); } - ~WithAsyncMethod_UseSkill() override + ~WithAsyncMethod_ThrowProp() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status ThrowProp(::grpc::ServerContext* /*context*/, const ::protobuf::PropMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestUseSkill(::grpc::ServerContext* context, ::protobuf::SkillMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestThrowProp(::grpc::ServerContext* context, ::protobuf::PropMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); } }; template - class WithAsyncMethod_SendMessage : public BaseClass + class WithAsyncMethod_UseSkill : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -889,27 +855,27 @@ namespace protobuf } public: - WithAsyncMethod_SendMessage() + WithAsyncMethod_UseSkill() { ::grpc::Service::MarkMethodAsync(6); } - ~WithAsyncMethod_SendMessage() override + ~WithAsyncMethod_UseSkill() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestSendMessage(::grpc::ServerContext* context, ::protobuf::SendMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestUseSkill(::grpc::ServerContext* context, ::protobuf::SkillMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); } }; template - class WithAsyncMethod_GetMessage : public BaseClass + class WithAsyncMethod_SendMessage : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -917,23 +883,23 @@ namespace protobuf } public: - WithAsyncMethod_GetMessage() + WithAsyncMethod_SendMessage() { ::grpc::Service::MarkMethodAsync(7); } - ~WithAsyncMethod_GetMessage() override + ~WithAsyncMethod_SendMessage() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetMessage(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::grpc::ServerWriter<::protobuf::MsgRes>* /*writer*/) override + ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestGetMessage(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncWriter<::protobuf::MsgRes>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestSendMessage(::grpc::ServerContext* context, ::protobuf::SendMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncServerStreaming(7, context, request, writer, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1244,35 +1210,7 @@ namespace protobuf ::grpc::Service::RequestAsyncUnary(18, context, request, response, new_call_cq, notification_cq, tag); } }; - template - class WithAsyncMethod_GetMap : public BaseClass - { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) - { - } - - public: - WithAsyncMethod_GetMap() - { - ::grpc::Service::MarkMethodAsync(19); - } - ~WithAsyncMethod_GetMap() override - { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetMap(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::MessageOfMap* /*response*/) override - { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetMap(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::MessageOfMap>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) - { - ::grpc::Service::RequestAsyncUnary(19, context, request, response, new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_TryConnection>>>>>>>>>>>>>>>>>>> AsyncService; + typedef WithAsyncMethod_TryConnection>>>>>>>>>>>>>>>>>> AsyncService; template class WithCallbackMethod_TryConnection : public BaseClass { @@ -1461,7 +1399,7 @@ namespace protobuf } }; template - class WithCallbackMethod_UseSkill : public BaseClass + class WithCallbackMethod_ThrowProp : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1469,38 +1407,38 @@ namespace protobuf } public: - WithCallbackMethod_UseSkill() + WithCallbackMethod_ThrowProp() { - ::grpc::Service::MarkMethodCallback(5, new ::grpc::internal::CallbackUnaryHandler<::protobuf::SkillMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response) - { return this->UseSkill(context, request, response); })); + ::grpc::Service::MarkMethodCallback(5, new ::grpc::internal::CallbackUnaryHandler<::protobuf::PropMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response) + { return this->ThrowProp(context, request, response); })); } - void SetMessageAllocatorFor_UseSkill( - ::grpc::MessageAllocator<::protobuf::SkillMsg, ::protobuf::BoolRes>* allocator + void SetMessageAllocatorFor_ThrowProp( + ::grpc::MessageAllocator<::protobuf::PropMsg, ::protobuf::BoolRes>* allocator ) { ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); - static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::SkillMsg, ::protobuf::BoolRes>*>(handler) + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::PropMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } - ~WithCallbackMethod_UseSkill() override + ~WithCallbackMethod_ThrowProp() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status ThrowProp(::grpc::ServerContext* /*context*/, const ::protobuf::PropMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerUnaryReactor* UseSkill( - ::grpc::CallbackServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/ + virtual ::grpc::ServerUnaryReactor* ThrowProp( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::PropMsg* /*request*/, ::protobuf::BoolRes* /*response*/ ) { return nullptr; } }; template - class WithCallbackMethod_SendMessage : public BaseClass + class WithCallbackMethod_UseSkill : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1508,38 +1446,38 @@ namespace protobuf } public: - WithCallbackMethod_SendMessage() + WithCallbackMethod_UseSkill() { - ::grpc::Service::MarkMethodCallback(6, new ::grpc::internal::CallbackUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response) - { return this->SendMessage(context, request, response); })); + ::grpc::Service::MarkMethodCallback(6, new ::grpc::internal::CallbackUnaryHandler<::protobuf::SkillMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response) + { return this->UseSkill(context, request, response); })); } - void SetMessageAllocatorFor_SendMessage( - ::grpc::MessageAllocator<::protobuf::SendMsg, ::protobuf::BoolRes>* allocator + void SetMessageAllocatorFor_UseSkill( + ::grpc::MessageAllocator<::protobuf::SkillMsg, ::protobuf::BoolRes>* allocator ) { ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(6); - static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>*>(handler) + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::SkillMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } - ~WithCallbackMethod_SendMessage() override + ~WithCallbackMethod_UseSkill() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerUnaryReactor* SendMessage( - ::grpc::CallbackServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/ + virtual ::grpc::ServerUnaryReactor* UseSkill( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/ ) { return nullptr; } }; template - class WithCallbackMethod_GetMessage : public BaseClass + class WithCallbackMethod_SendMessage : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1547,23 +1485,31 @@ namespace protobuf } public: - WithCallbackMethod_GetMessage() + WithCallbackMethod_SendMessage() { - ::grpc::Service::MarkMethodCallback(7, new ::grpc::internal::CallbackServerStreamingHandler<::protobuf::IDMsg, ::protobuf::MsgRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request) - { return this->GetMessage(context, request); })); + ::grpc::Service::MarkMethodCallback(7, new ::grpc::internal::CallbackUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response) + { return this->SendMessage(context, request, response); })); + } + void SetMessageAllocatorFor_SendMessage( + ::grpc::MessageAllocator<::protobuf::SendMsg, ::protobuf::BoolRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(7); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>*>(handler) + ->SetMessageAllocator(allocator); } - ~WithCallbackMethod_GetMessage() override + ~WithCallbackMethod_SendMessage() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetMessage(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::grpc::ServerWriter<::protobuf::MsgRes>* /*writer*/) override + ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerWriteReactor<::protobuf::MsgRes>* GetMessage( - ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/ + virtual ::grpc::ServerUnaryReactor* SendMessage( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/ ) { return nullptr; @@ -1998,46 +1944,7 @@ namespace protobuf return nullptr; } }; - template - class WithCallbackMethod_GetMap : public BaseClass - { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) - { - } - - public: - WithCallbackMethod_GetMap() - { - ::grpc::Service::MarkMethodCallback(19, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::MessageOfMap>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::MessageOfMap* response) - { return this->GetMap(context, request, response); })); - } - void SetMessageAllocatorFor_GetMap( - ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::MessageOfMap>* allocator - ) - { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(19); - static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::MessageOfMap>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_GetMap() override - { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetMap(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::MessageOfMap* /*response*/) override - { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* GetMap( - ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::MessageOfMap* /*response*/ - ) - { - return nullptr; - } - }; - typedef WithCallbackMethod_TryConnection>>>>>>>>>>>>>>>>>>> CallbackService; + typedef WithCallbackMethod_TryConnection>>>>>>>>>>>>>>>>>> CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_TryConnection : public BaseClass @@ -2160,7 +2067,7 @@ namespace protobuf } }; template - class WithGenericMethod_UseSkill : public BaseClass + class WithGenericMethod_ThrowProp : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2168,23 +2075,23 @@ namespace protobuf } public: - WithGenericMethod_UseSkill() + WithGenericMethod_ThrowProp() { ::grpc::Service::MarkMethodGeneric(5); } - ~WithGenericMethod_UseSkill() override + ~WithGenericMethod_ThrowProp() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status ThrowProp(::grpc::ServerContext* /*context*/, const ::protobuf::PropMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_SendMessage : public BaseClass + class WithGenericMethod_UseSkill : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2192,23 +2099,23 @@ namespace protobuf } public: - WithGenericMethod_SendMessage() + WithGenericMethod_UseSkill() { ::grpc::Service::MarkMethodGeneric(6); } - ~WithGenericMethod_SendMessage() override + ~WithGenericMethod_UseSkill() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_GetMessage : public BaseClass + class WithGenericMethod_SendMessage : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2216,16 +2123,16 @@ namespace protobuf } public: - WithGenericMethod_GetMessage() + WithGenericMethod_SendMessage() { ::grpc::Service::MarkMethodGeneric(7); } - ~WithGenericMethod_GetMessage() override + ~WithGenericMethod_SendMessage() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetMessage(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::grpc::ServerWriter<::protobuf::MsgRes>* /*writer*/) override + ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); @@ -2496,30 +2403,6 @@ namespace protobuf } }; template - class WithGenericMethod_GetMap : public BaseClass - { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) - { - } - - public: - WithGenericMethod_GetMap() - { - ::grpc::Service::MarkMethodGeneric(19); - } - ~WithGenericMethod_GetMap() override - { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetMap(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::MessageOfMap* /*response*/) override - { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template class WithRawMethod_TryConnection : public BaseClass { private: @@ -2660,7 +2543,7 @@ namespace protobuf } }; template - class WithRawMethod_UseSkill : public BaseClass + class WithRawMethod_ThrowProp : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2668,27 +2551,27 @@ namespace protobuf } public: - WithRawMethod_UseSkill() + WithRawMethod_ThrowProp() { ::grpc::Service::MarkMethodRaw(5); } - ~WithRawMethod_UseSkill() override + ~WithRawMethod_ThrowProp() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status ThrowProp(::grpc::ServerContext* /*context*/, const ::protobuf::PropMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestUseSkill(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestThrowProp(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); } }; template - class WithRawMethod_SendMessage : public BaseClass + class WithRawMethod_UseSkill : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2696,27 +2579,27 @@ namespace protobuf } public: - WithRawMethod_SendMessage() + WithRawMethod_UseSkill() { ::grpc::Service::MarkMethodRaw(6); } - ~WithRawMethod_SendMessage() override + ~WithRawMethod_UseSkill() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestSendMessage(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestUseSkill(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); } }; template - class WithRawMethod_GetMessage : public BaseClass + class WithRawMethod_SendMessage : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2724,23 +2607,23 @@ namespace protobuf } public: - WithRawMethod_GetMessage() + WithRawMethod_SendMessage() { ::grpc::Service::MarkMethodRaw(7); } - ~WithRawMethod_GetMessage() override + ~WithRawMethod_SendMessage() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetMessage(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::grpc::ServerWriter<::protobuf::MsgRes>* /*writer*/) override + ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestGetMessage(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter<::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestSendMessage(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncServerStreaming(7, context, request, writer, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -3052,34 +2935,6 @@ namespace protobuf } }; template - class WithRawMethod_GetMap : public BaseClass - { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) - { - } - - public: - WithRawMethod_GetMap() - { - ::grpc::Service::MarkMethodRaw(19); - } - ~WithRawMethod_GetMap() override - { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetMap(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::MessageOfMap* /*response*/) override - { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetMap(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) - { - ::grpc::Service::RequestAsyncUnary(19, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template class WithRawCallbackMethod_TryConnection : public BaseClass { private: @@ -3235,7 +3090,7 @@ namespace protobuf } }; template - class WithRawCallbackMethod_UseSkill : public BaseClass + class WithRawCallbackMethod_ThrowProp : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -3243,22 +3098,22 @@ namespace protobuf } public: - WithRawCallbackMethod_UseSkill() + WithRawCallbackMethod_ThrowProp() { ::grpc::Service::MarkMethodRawCallback(5, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) - { return this->UseSkill(context, request, response); })); + { return this->ThrowProp(context, request, response); })); } - ~WithRawCallbackMethod_UseSkill() override + ~WithRawCallbackMethod_ThrowProp() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status ThrowProp(::grpc::ServerContext* /*context*/, const ::protobuf::PropMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerUnaryReactor* UseSkill( + virtual ::grpc::ServerUnaryReactor* ThrowProp( ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ ) { @@ -3266,7 +3121,7 @@ namespace protobuf } }; template - class WithRawCallbackMethod_SendMessage : public BaseClass + class WithRawCallbackMethod_UseSkill : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -3274,22 +3129,22 @@ namespace protobuf } public: - WithRawCallbackMethod_SendMessage() + WithRawCallbackMethod_UseSkill() { ::grpc::Service::MarkMethodRawCallback(6, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) - { return this->SendMessage(context, request, response); })); + { return this->UseSkill(context, request, response); })); } - ~WithRawCallbackMethod_SendMessage() override + ~WithRawCallbackMethod_UseSkill() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status UseSkill(::grpc::ServerContext* /*context*/, const ::protobuf::SkillMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerUnaryReactor* SendMessage( + virtual ::grpc::ServerUnaryReactor* UseSkill( ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ ) { @@ -3297,7 +3152,7 @@ namespace protobuf } }; template - class WithRawCallbackMethod_GetMessage : public BaseClass + class WithRawCallbackMethod_SendMessage : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -3305,23 +3160,23 @@ namespace protobuf } public: - WithRawCallbackMethod_GetMessage() + WithRawCallbackMethod_SendMessage() { - ::grpc::Service::MarkMethodRawCallback(7, new ::grpc::internal::CallbackServerStreamingHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request) - { return this->GetMessage(context, request); })); + ::grpc::Service::MarkMethodRawCallback(7, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->SendMessage(context, request, response); })); } - ~WithRawCallbackMethod_GetMessage() override + ~WithRawCallbackMethod_SendMessage() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetMessage(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::grpc::ServerWriter<::protobuf::MsgRes>* /*writer*/) override + ::grpc::Status SendMessage(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerWriteReactor<::grpc::ByteBuffer>* GetMessage( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/ + virtual ::grpc::ServerUnaryReactor* SendMessage( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ ) { return nullptr; @@ -3669,37 +3524,6 @@ namespace protobuf } }; template - class WithRawCallbackMethod_GetMap : public BaseClass - { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) - { - } - - public: - WithRawCallbackMethod_GetMap() - { - ::grpc::Service::MarkMethodRawCallback(19, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) - { return this->GetMap(context, request, response); })); - } - ~WithRawCallbackMethod_GetMap() override - { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetMap(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::MessageOfMap* /*response*/) override - { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* GetMap( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ - ) - { - return nullptr; - } - }; - template class WithStreamedUnaryMethod_TryConnection : public BaseClass { private: @@ -3808,6 +3632,33 @@ namespace protobuf virtual ::grpc::Status StreamedUseProp(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::PropMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_ThrowProp : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_ThrowProp() + { + ::grpc::Service::MarkMethodStreamed(5, new ::grpc::internal::StreamedUnaryHandler<::protobuf::PropMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::PropMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedThrowProp(context, streamer); })); + } + ~WithStreamedUnaryMethod_ThrowProp() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ThrowProp(::grpc::ServerContext* /*context*/, const ::protobuf::PropMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedThrowProp(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::PropMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_UseSkill : public BaseClass { private: @@ -3818,7 +3669,7 @@ namespace protobuf public: WithStreamedUnaryMethod_UseSkill() { - ::grpc::Service::MarkMethodStreamed(5, new ::grpc::internal::StreamedUnaryHandler<::protobuf::SkillMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::SkillMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(6, new ::grpc::internal::StreamedUnaryHandler<::protobuf::SkillMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::SkillMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedUseSkill(context, streamer); })); } ~WithStreamedUnaryMethod_UseSkill() override @@ -3845,7 +3696,7 @@ namespace protobuf public: WithStreamedUnaryMethod_SendMessage() { - ::grpc::Service::MarkMethodStreamed(6, new ::grpc::internal::StreamedUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::SendMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(7, new ::grpc::internal::StreamedUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::SendMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedSendMessage(context, streamer); })); } ~WithStreamedUnaryMethod_SendMessage() override @@ -4158,34 +4009,7 @@ namespace protobuf // replace default version of method with streamed unary virtual ::grpc::Status StreamedEndAllAction(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; }; - template - class WithStreamedUnaryMethod_GetMap : public BaseClass - { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) - { - } - - public: - WithStreamedUnaryMethod_GetMap() - { - ::grpc::Service::MarkMethodStreamed(19, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::MessageOfMap>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::MessageOfMap>* streamer) - { return this->StreamedGetMap(context, streamer); })); - } - ~WithStreamedUnaryMethod_GetMap() override - { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status GetMap(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::MessageOfMap* /*response*/) override - { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedGetMap(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::MessageOfMap>* server_unary_streamer) = 0; - }; - typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>>> StreamedUnaryService; + typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>>> StreamedUnaryService; template class WithSplitStreamingMethod_AddPlayer : public BaseClass { @@ -4213,35 +4037,8 @@ namespace protobuf // replace default version of method with split streamed virtual ::grpc::Status StreamedAddPlayer(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer<::protobuf::PlayerMsg, ::protobuf::MessageToClient>* server_split_streamer) = 0; }; - template - class WithSplitStreamingMethod_GetMessage : public BaseClass - { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) - { - } - - public: - WithSplitStreamingMethod_GetMessage() - { - ::grpc::Service::MarkMethodStreamed(7, new ::grpc::internal::SplitServerStreamingHandler<::protobuf::IDMsg, ::protobuf::MsgRes>([this](::grpc::ServerContext* context, ::grpc::ServerSplitStreamer<::protobuf::IDMsg, ::protobuf::MsgRes>* streamer) - { return this->StreamedGetMessage(context, streamer); })); - } - ~WithSplitStreamingMethod_GetMessage() override - { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status GetMessage(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::grpc::ServerWriter<::protobuf::MsgRes>* /*writer*/) override - { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with split streamed - virtual ::grpc::Status StreamedGetMessage(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer<::protobuf::IDMsg, ::protobuf::MsgRes>* server_split_streamer) = 0; - }; - typedef WithSplitStreamingMethod_AddPlayer> SplitStreamedService; - typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>>>>> StreamedService; + typedef WithSplitStreamingMethod_AddPlayer SplitStreamedService; + typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>>>> StreamedService; }; } // namespace protobuf diff --git a/CAPI/cpp/proto/Services.pb.cc b/CAPI/cpp/proto/Services.pb.cc index c63c71f..172104a 100644 --- a/CAPI/cpp/proto/Services.pb.cc +++ b/CAPI/cpp/proto/Services.pb.cc @@ -31,18 +31,18 @@ static constexpr ::_pb::Message* const* file_default_instances = nullptr; const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\016Services.proto\022\010protobuf\032\025Message2Clie" - "nts.proto\032\024Message2Server.proto2\233\010\n\020Avai" + "nts.proto\032\024Message2Server.proto2\350\007\n\020Avai" "lableService\0223\n\rTryConnection\022\017.protobuf" ".IDMsg\032\021.protobuf.BoolRes\022=\n\tAddPlayer\022\023" ".protobuf.PlayerMsg\032\031.protobuf.MessageTo" "Client0\001\022,\n\004Move\022\021.protobuf.MoveMsg\032\021.pr" "otobuf.MoveRes\0220\n\010PickProp\022\021.protobuf.Pr" "opMsg\032\021.protobuf.BoolRes\022/\n\007UseProp\022\021.pr" - "otobuf.PropMsg\032\021.protobuf.BoolRes\0221\n\010Use" - "Skill\022\022.protobuf.SkillMsg\032\021.protobuf.Boo" - "lRes\0223\n\013SendMessage\022\021.protobuf.SendMsg\032\021" - ".protobuf.BoolRes\0221\n\nGetMessage\022\017.protob" - "uf.IDMsg\032\020.protobuf.MsgRes0\001\0223\n\rStartLea" + "otobuf.PropMsg\032\021.protobuf.BoolRes\0221\n\tThr" + "owProp\022\021.protobuf.PropMsg\032\021.protobuf.Boo" + "lRes\0221\n\010UseSkill\022\022.protobuf.SkillMsg\032\021.p" + "rotobuf.BoolRes\0223\n\013SendMessage\022\021.protobu" + "f.SendMsg\032\021.protobuf.BoolRes\0223\n\rStartLea" "rning\022\017.protobuf.IDMsg\032\021.protobuf.BoolRe" "s\0225\n\017StartRescueMate\022\017.protobuf.IDMsg\032\021." "protobuf.BoolRes\0224\n\016StartTreatMate\022\017.pro" @@ -56,9 +56,8 @@ const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABL "tartOpenGate\022\017.protobuf.IDMsg\032\021.protobuf" ".BoolRes\0224\n\016StartOpenChest\022\017.protobuf.ID" "Msg\032\021.protobuf.BoolRes\0222\n\014EndAllAction\022\017" - ".protobuf.IDMsg\032\021.protobuf.BoolRes\0221\n\006Ge" - "tMap\022\017.protobuf.IDMsg\032\026.protobuf.Message" - "OfMapb\006proto3"; + ".protobuf.IDMsg\032\021.protobuf.BoolResb\006prot" + "o3"; static const ::_pbi::DescriptorTable* const descriptor_table_Services_2eproto_deps[2] = { &::descriptor_table_Message2Clients_2eproto, &::descriptor_table_Message2Server_2eproto, @@ -67,7 +66,7 @@ static ::_pbi::once_flag descriptor_table_Services_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Services_2eproto = { false, false, - 1133, + 1082, descriptor_table_protodef_Services_2eproto, "Services.proto", &descriptor_table_Services_2eproto_once, diff --git a/CAPI/cpp/proto/Services.pb.h b/CAPI/cpp/proto/Services.pb.h index da6d296..10d177e 100644 --- a/CAPI/cpp/proto/Services.pb.h +++ b/CAPI/cpp/proto/Services.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. From 45e0a6cf20fd7022ead22d01fc1bce9c5f9cef3c Mon Sep 17 00:00:00 2001 From: Shawqeem <1004837646@qq.com> Date: Sun, 19 Mar 2023 01:25:57 +0800 Subject: [PATCH 3/5] feat: :sparkles: Add Playback Mode Add playback mode --- dependency/proto/Proto.csproj | 35 ---- logic/Client/Client.csproj | 4 +- logic/Client/Client.sln | 16 +- logic/Client/MainWindow.xaml.cs | 89 +++++---- logic/Client/PlaybackClient.cs | 254 +++++++++++++++++++++++++ logic/Client/StatusBarOfHunter.xaml.cs | 2 +- 6 files changed, 323 insertions(+), 77 deletions(-) delete mode 100644 dependency/proto/Proto.csproj create mode 100644 logic/Client/PlaybackClient.cs diff --git a/dependency/proto/Proto.csproj b/dependency/proto/Proto.csproj deleted file mode 100644 index c4ac32c..0000000 --- a/dependency/proto/Proto.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - net6.0 - enable - enable - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - diff --git a/logic/Client/Client.csproj b/logic/Client/Client.csproj index 68247f3..d284dda 100644 --- a/logic/Client/Client.csproj +++ b/logic/Client/Client.csproj @@ -12,13 +12,15 @@ + - + + diff --git a/logic/Client/Client.sln b/logic/Client/Client.sln index 626d667..aedf36b 100644 --- a/logic/Client/Client.sln +++ b/logic/Client/Client.sln @@ -5,7 +5,9 @@ VisualStudioVersion = 17.1.32328.378 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client.csproj", "{5AD8481D-90EF-410C-BD48-355DB97EEAB3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proto", "..\..\dependency\proto\Proto.csproj", "{E445B0DD-D0DF-4413-AE47-1748392843F7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playback", "..\..\playback\Playback\Playback.csproj", "{662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Protos", "..\..\dependency\proto\Protos.csproj", "{A0F72D3B-9A82-48EB-90AF-B3770151AD83}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,10 +19,14 @@ Global {5AD8481D-90EF-410C-BD48-355DB97EEAB3}.Debug|Any CPU.Build.0 = Debug|Any CPU {5AD8481D-90EF-410C-BD48-355DB97EEAB3}.Release|Any CPU.ActiveCfg = Release|Any CPU {5AD8481D-90EF-410C-BD48-355DB97EEAB3}.Release|Any CPU.Build.0 = Release|Any CPU - {E445B0DD-D0DF-4413-AE47-1748392843F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E445B0DD-D0DF-4413-AE47-1748392843F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E445B0DD-D0DF-4413-AE47-1748392843F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E445B0DD-D0DF-4413-AE47-1748392843F7}.Release|Any CPU.Build.0 = Release|Any CPU + {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Debug|Any CPU.Build.0 = Debug|Any CPU + {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Release|Any CPU.ActiveCfg = Release|Any CPU + {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Release|Any CPU.Build.0 = Release|Any CPU + {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/logic/Client/MainWindow.xaml.cs b/logic/Client/MainWindow.xaml.cs index 9fa1dd7..a9691d7 100644 --- a/logic/Client/MainWindow.xaml.cs +++ b/logic/Client/MainWindow.xaml.cs @@ -16,14 +16,13 @@ using System.Diagnostics; using System.Windows.Threading; using Grpc.Core; using Protobuf; +using Playback; // 目前MainWindow还未复现的功能: // 部分errordisplayer // private void ReactToCommandline(), // private void Playback(string fileName, double pbSpeed = 2.0) - // 交互:private void ClickToSetMode(object sender, RoutedEventArgs e) - // private void Bonus() namespace Client @@ -59,11 +58,11 @@ namespace Client listOfDoor = new List(); listOfGate = new List(); WindowStartupLocation = WindowStartupLocation.CenterScreen; - comInfo[0] = "127.0.0.1"; + comInfo[0] = "183.172.213.88"; comInfo[1] = "8888"; - comInfo[2] = "0"; - comInfo[3] = "1"; - + comInfo[2] = "4"; + comInfo[3] = "2"; + comInfo[4] = "1"; ConnectToServer(comInfo); OnReceive(); //DrawMap(); @@ -91,7 +90,50 @@ namespace Client } } - // 连接Server,comInfo[]的格式:0-ip 1- port 2-playerID 3-human/TrickerType + // 获得地图信息,未更新数值 + private void GetMap(MessageOfMap obj) + { + int[,] map = new int[50, 50]; + try + { + for (int i = 0; i < 50; i++) + { + for (int j = 0; j < 50; j++) + { + map[i, j] = Convert.ToInt32(obj.Row[i].Col[j]) + 4;//与proto一致 + } + } + } + catch + { + mapFlag = false; + } + finally + { + defaultMap = map; + mapFlag = true; + } + } + + //private void Playback(string fileName, double pbSpeed = 2.0) + //{ + // var pbClient = new PlaybackClient(fileName, pbSpeed); + // int[,]? map; + // if ((map = pbClient.ReadDataFromFile(dataDict, drawPicLock)) != null) + // { + // isClientStocked = false; + // isPlaybackMode = true; + // defaultMap = map; + // mapFlag = true; + // } + // else + // { + // MessageBox.Show("Failed to read the playback file!"); + // isClientStocked = true; + // } + //} + + // 连接Server,comInfo[]的格式:0-ip 1- port 2-playerID 3-human/TrickerType 4-occupation private void ConnectToServer(string[] comInfo) { if (!isPlaybackMode) @@ -115,6 +157,7 @@ namespace Client 1 => PlayerType.StudentPlayer, 2 => PlayerType.TrickerPlayer, }; + playerMsg.PlayerType=playerType; if (Convert.ToInt64(comInfo[3]) == 1) { humanOrButcher = true; @@ -196,30 +239,6 @@ namespace Client UpperLayerOfMap.Children.Add(icon); } - // 获得地图信息,未更新数值 - private void GetMap(MessageOfMap obj) - { - int[,] map = new int[50, 50]; - try - { - for (int i = 0; i < 50; i++) - { - for (int j = 0; j < 50; j++) - { - map[i, j] = Convert.ToInt32(obj.Row[i].Col[j])+4;//与proto一致 - } - } - } - catch - { - mapFlag = false; - } - finally - { - defaultMap = map; - mapFlag = true; - } - } private void ZoomMap() { for (int i = 0; i < 50; i++) @@ -381,11 +400,11 @@ namespace Client case MessageOfObj.MessageOfObjOneofCase.GateMessage: listOfGate.Add(obj.GateMessage); break; + case MessageOfObj.MessageOfObjOneofCase.MapMessage: + GetMap(obj.MapMessage); + break; } } - IDMsg idMsg = new IDMsg(); - idMsg.PlayerId = playerID; - GetMap(client.GetMap(idMsg)); listOfAll.Add(content.AllMessage); break; case GameState.GameRunning: @@ -660,7 +679,7 @@ namespace Client HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0), - Fill = Brushes.Black, + Fill = Brushes.Chocolate, }; UpperLayerOfMap.Children.Add(icon); } diff --git a/logic/Client/PlaybackClient.cs b/logic/Client/PlaybackClient.cs new file mode 100644 index 0000000..8dbf1f4 --- /dev/null +++ b/logic/Client/PlaybackClient.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Protobuf; +using Playback; +using System.Threading; +using Timothy.FrameRateTask; + +namespace Client +{ + public class PlaybackClient + { + private readonly string fileName; + private readonly double playbackSpeed; + private readonly int frameTimeInMilliseconds; + public MessageReader? Reader; + public PlaybackClient(string fileName, double playbackSpeed = 1.0, int frameTimeInMilliseconds = 50) + { + this.fileName = fileName; + this.playbackSpeed = playbackSpeed; + this.frameTimeInMilliseconds = frameTimeInMilliseconds; + //this.sema = new SemaphoreSlim(1, 1); + try + { + Reader = new MessageReader(this.fileName); + } + catch (Exception ex) + { + Reader = null; + Console.WriteLine(ex.Message); + return; + } + } + + public int[,]? ReadDataFromFile(List listOfProp,List listOfHuman,List listOfButcher,List listOfBullet, + List listOfBombedBullet,List listOfAll,List listOfChest,List listOfClassroom, + List listOfDoor, List listOfGate, object dataLock) + { + if (Reader == null) + return null; + //Sema.Wait(); + bool endFile = false; + bool mapFlag = false; // 是否获取了地图 + int[,] map = new int[50, 50]; + long frame = (long)(this.frameTimeInMilliseconds / this.playbackSpeed); + var mapCollecter = new MessageReader(this.fileName); + while (!mapFlag) + { + var msg = mapCollecter.ReadOne(); + if (msg == null) + throw new Exception("Map messgae is not in the playback file!"); + foreach (var obj in msg.ObjMessage) + { + if (obj.MessageOfObjCase == MessageOfObj.MessageOfObjOneofCase.MapMessage) + { + try + { + for (int i = 0; i < 50; i++) + { + for (int j = 0; j < 50; j++) + { + map[i, j] = Convert.ToInt32(obj.MapMessage.Row[i].Col[j]) + 4; + } + } + } + catch + { + mapFlag = false; + } + finally + { + mapFlag = true; + } + break; + } + } + + }; + + new Thread(() => + { + new FrameRateTaskExecutor + ( + () => !endFile, + () => + { + var content = Reader.ReadOne(); + if (content == null) + endFile = true; + else + { + lock (dataLock) + { + listOfHuman.Clear(); + listOfButcher.Clear(); + listOfProp.Clear(); + listOfBombedBullet.Clear(); + listOfBullet.Clear(); + listOfAll.Clear(); + listOfChest.Clear(); + listOfClassroom.Clear(); + listOfDoor.Clear(); + listOfGate.Clear(); + switch (content.GameState) + { + case GameState.GameStart: + foreach (var obj in content.ObjMessage) + { + switch (obj.MessageOfObjCase) + { + case MessageOfObj.MessageOfObjOneofCase.StudentMessage: + //if (humanOrButcher && obj.StudentMessage.PlayerId == playerID) + //{ + // human = obj.StudentMessage; + //} + listOfHuman.Add(obj.StudentMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.TrickerMessage: + //if (!humanOrButcher && obj.TrickerMessage.PlayerId == playerID) + //{ + // butcher = obj.TrickerMessage; + //} + listOfButcher.Add(obj.TrickerMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.PropMessage: + listOfProp.Add(obj.PropMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.BombedBulletMessage: + listOfBombedBullet.Add(obj.BombedBulletMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.BulletMessage: + listOfBullet.Add(obj.BulletMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.ChestMessage: + listOfChest.Add(obj.ChestMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.ClassroomMessage: + listOfClassroom.Add(obj.ClassroomMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.DoorMessage: + listOfDoor.Add(obj.DoorMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.GateMessage: + listOfGate.Add(obj.GateMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.MapMessage: + break; + } + } + listOfAll.Add(content.AllMessage); + break; + case GameState.GameRunning: + foreach (var obj in content.ObjMessage) + { + switch (obj.MessageOfObjCase) + { + case MessageOfObj.MessageOfObjOneofCase.StudentMessage: + //if (humanOrButcher && obj.StudentMessage.PlayerId == playerID) + //{ + // human = obj.StudentMessage; + //} + listOfHuman.Add(obj.StudentMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.TrickerMessage: + //if (!humanOrButcher && obj.TrickerMessage.PlayerId == playerID) + //{ + // butcher = obj.TrickerMessage; + //} + listOfButcher.Add(obj.TrickerMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.PropMessage: + listOfProp.Add(obj.PropMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.BombedBulletMessage: + listOfBombedBullet.Add(obj.BombedBulletMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.BulletMessage: + listOfBullet.Add(obj.BulletMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.ChestMessage: + listOfChest.Add(obj.ChestMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.ClassroomMessage: + listOfClassroom.Add(obj.ClassroomMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.DoorMessage: + listOfDoor.Add(obj.DoorMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.GateMessage: + listOfGate.Add(obj.GateMessage); + break; + } + } + listOfAll.Add(content.AllMessage); + break; + + case GameState.GameEnd: + foreach (var obj in content.ObjMessage) + { + switch (obj.MessageOfObjCase) + { + case MessageOfObj.MessageOfObjOneofCase.StudentMessage: + listOfHuman.Add(obj.StudentMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.TrickerMessage: + listOfButcher.Add(obj.TrickerMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.PropMessage: + listOfProp.Add(obj.PropMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.BombedBulletMessage: + listOfBombedBullet.Add(obj.BombedBulletMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.BulletMessage: + listOfBullet.Add(obj.BulletMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.ChestMessage: + listOfChest.Add(obj.ChestMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.ClassroomMessage: + listOfClassroom.Add(obj.ClassroomMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.DoorMessage: + listOfDoor.Add(obj.DoorMessage); + break; + case MessageOfObj.MessageOfObjOneofCase.GateMessage: + listOfGate.Add(obj.GateMessage); + break; + } + } + listOfAll.Add(content.AllMessage); + break; + } + } + } + }, + frame, + () => + { + //Sema.Release(); + //MessageBox.Show("Game Over!"); + return 1; + } + ) + { AllowTimeExceed = true }.Start(); + }) + { IsBackground = true }.Start(); + return map; + + } + } +} diff --git a/logic/Client/StatusBarOfHunter.xaml.cs b/logic/Client/StatusBarOfHunter.xaml.cs index d163926..e421b54 100644 --- a/logic/Client/StatusBarOfHunter.xaml.cs +++ b/logic/Client/StatusBarOfHunter.xaml.cs @@ -68,7 +68,7 @@ namespace Client } private void SetDynamicValue(MessageOfTricker obj) { - if (!obj.Movable) // 认为movable为真时可动 + if (obj.PlayerState==PlayerState.Stunned) { skillprogress.Value = 0; skillprogress.Background = Brushes.Gray; From face17fe1d10a5fde628e77f36c3ff229c5e83a8 Mon Sep 17 00:00:00 2001 From: gsy1519 <614054460@qq.com> Date: Sun, 19 Mar 2023 01:34:14 +0800 Subject: [PATCH 4/5] fix: :bug: fix problems of AddPlayer --- logic.thuaipb | 0 logic/ClientTest/Program.cs | 23 ++-- logic/Server/CopyInfo.cs | 20 ++-- logic/Server/GameServer.cs | 110 +++++++++++++------- logic/Server/Properties/launchSettings.json | 4 +- 5 files changed, 103 insertions(+), 54 deletions(-) create mode 100644 logic.thuaipb diff --git a/logic.thuaipb b/logic.thuaipb new file mode 100644 index 0000000..e69de29 diff --git a/logic/ClientTest/Program.cs b/logic/ClientTest/Program.cs index 33cb939..043a456 100644 --- a/logic/ClientTest/Program.cs +++ b/logic/ClientTest/Program.cs @@ -12,29 +12,40 @@ namespace ClientTest var client = new AvailableService.AvailableServiceClient(channel); PlayerMsg playerInfo = new(); playerInfo.PlayerId = 0; - playerInfo.StudentType = StudentType.NullStudentType; + playerInfo.PlayerType = PlayerType.StudentPlayer; + playerInfo.StudentType = StudentType._1; var call = client.AddPlayer(playerInfo); MoveMsg moveMsg = new(); moveMsg.PlayerId = 0; moveMsg.TimeInMilliseconds = 100; moveMsg.Angle = 0; + int tot = 0; + /*while (await call.ResponseStream.MoveNext()) + { + var currentGameInfo = call.ResponseStream.Current; + if (currentGameInfo.GameState == GameState.GameStart) break; + }*/ while (true) { - Console.ReadLine(); - client.Move(moveMsg); + Thread.Sleep(50); + MoveRes boolRes = client.Move(moveMsg); + if (boolRes.ActSuccess == false) break; + tot++; + if (tot % 10 == 0) moveMsg.Angle += 1; + Console.WriteLine("Move!"); } - while (await call.ResponseStream.MoveNext()) + /*while (await call.ResponseStream.MoveNext()) { - Console.WriteLine("hi"); + //Console.WriteLine("hi"); var currentGameInfo = call.ResponseStream.Current; for (int i = 0; i < currentGameInfo.ObjMessage.Count; i++) { if (currentGameInfo.ObjMessage[i].MessageOfObjCase == MessageOfObj.MessageOfObjOneofCase.StudentMessage) Console.WriteLine($"Human is at ({currentGameInfo.ObjMessage[i].StudentMessage.X}, {currentGameInfo.ObjMessage[i].StudentMessage.Y})"); } - } + }*/ } } diff --git a/logic/Server/CopyInfo.cs b/logic/Server/CopyInfo.cs index 05e8521..edeb13d 100644 --- a/logic/Server/CopyInfo.cs +++ b/logic/Server/CopyInfo.cs @@ -27,7 +27,12 @@ namespace Server return PickedProp((PickedProp)gameObj); else return null; //先写着防报错 } - + public static MessageOfObj? Auto(MessageOfNews news) + { + MessageOfObj objMsg = new(); + objMsg.NewsMessage = news; + return objMsg; + } private static MessageOfObj? Student(Character player) { MessageOfObj msg = new MessageOfObj(); @@ -47,7 +52,6 @@ namespace Server msg.StudentMessage.PlayerId = 0; msg.StudentMessage.ViewRange = 0; msg.StudentMessage.Radius = 0; - msg.StudentMessage.Damage = 0; msg.StudentMessage.DangerAlert = 0; msg.StudentMessage.Score = 0; msg.StudentMessage.TreatProgress = 0; @@ -83,12 +87,12 @@ namespace Server msg.StudentMessage.Prop.Add(PropType.NullPropType); else { - switch (player.PropInventory.GetPropType()) + /*switch (player.PropInventory.GetPropType()) { case Preparation.Utility.PropType.Gem: msg.StudentMessage.Prop.Add(PropType.NullPropType); break; - /*case Preparation.Utility.PropType.addLIFE: + case Preparation.Utility.PropType.addLIFE: msg.StudentMessage.MessageOfHuman.Prop = Communication.Proto.PropType.AddLife; break; case Preparation.Utility.PropType.addSpeed: @@ -102,8 +106,8 @@ namespace Server break; default: msg.StudentMessage.Prop = PropType.NullPropType; - break;*/ - } + break; + }*/ } return msg; @@ -112,6 +116,7 @@ namespace Server private static MessageOfObj? Tricker(Character player) { MessageOfObj msg = new MessageOfObj(); + msg.TrickerMessage = new(); if (!player.IsGhost()) return null; msg.TrickerMessage = new(); @@ -120,12 +125,11 @@ namespace Server msg.TrickerMessage.Speed = player.MoveSpeed; msg.TrickerMessage.Damage = 0; foreach (var keyValue in player.TimeUntilActiveSkillAvailable) - msg.StudentMessage.TimeUntilSkillAvailable.Add(keyValue.Value); + msg.TrickerMessage.TimeUntilSkillAvailable.Add(keyValue.Value); //msg.TrickerMessage.Place = 0; 下面写了 //msg.TrickerMessage.Prop = PropType.NullPropType; // 下面写 msg.TrickerMessage.TrickerType = TrickerType.NullTrickerType; // 下面写 msg.TrickerMessage.Guid = 0; - msg.TrickerMessage.Movable = false; msg.TrickerMessage.PlayerId = 0; msg.TrickerMessage.ViewRange = 0; msg.TrickerMessage.Radius = 0; diff --git a/logic/Server/GameServer.cs b/logic/Server/GameServer.cs index 5fe5bdc..bfdf687 100644 --- a/logic/Server/GameServer.cs +++ b/logic/Server/GameServer.cs @@ -20,11 +20,11 @@ namespace Server protected readonly ArgumentOptions options; private HttpSender? httpSender; private object gameLock = new(); - private object[] teamCommunicationLock; private const int playerNum = 1; // 注意修改 private MessageToClient currentGameInfo = new(); - private MessageOfMap currentMapMsg = new(); - private Queue[] teamCommunicatonMsg; + private MessageOfObj currentMapMsg = new(); + private object newsLock = new(); + private List currentNews = new(); private SemaphoreSlim endGameSem = new(0); protected readonly Game game; private uint spectatorMinPlayerID = 2022; @@ -33,7 +33,6 @@ namespace Server protected long[] communicationToGameID; // 通信用的ID映射到游戏内的ID,通信中0-3为Student,4为Tricker private readonly object messageToAllClientsLock = new(); public static readonly long SendMessageToClientIntervalInMilliseconds = 50; - private readonly Semaphore endGameInfoSema = new(0, 1); private MessageWriter? mwr = null; public void StartGame() @@ -117,7 +116,7 @@ namespace Server if (options.ResultFileName != DefaultArgumentOptions.FileName) SaveGameResult(options.ResultFileName + ".json"); //SendGameResult(); - endGameInfoSema.Release(); + this.endGameSem.Release(); } public void ReportGame(GameState gameState, bool requiredGaming = true) @@ -126,16 +125,40 @@ namespace Server currentGameInfo = new(); lock (messageToAllClientsLock) { - //currentGameInfo.MapMessage = (Message(game.GameMap)); switch (gameState) { case GameState.GameRunning: - case GameState.GameStart: case GameState.GameEnd: foreach (GameObj gameObj in gameObjList) { currentGameInfo.ObjMessage.Add(CopyInfo.Auto(gameObj)); } + lock (newsLock) + { + foreach (var news in currentNews) + { + currentGameInfo.ObjMessage.Add(CopyInfo.Auto(news)); + } + currentNews.Clear(); + } + currentGameInfo.GameState = gameState; + currentGameInfo.AllMessage = new(); // 还没写 + mwr?.WriteOne(currentGameInfo); + break; + case GameState.GameStart: + currentGameInfo.ObjMessage.Add(currentMapMsg); + foreach (GameObj gameObj in gameObjList) + { + currentGameInfo.ObjMessage.Add(CopyInfo.Auto(gameObj)); + } + lock (newsLock) + { + foreach (var news in currentNews) + { + currentGameInfo.ObjMessage.Add(CopyInfo.Auto(news)); + } + currentNews.Clear(); + } currentGameInfo.GameState = gameState; currentGameInfo.AllMessage = new(); // 还没写 mwr?.WriteOne(currentGameInfo); @@ -168,7 +191,7 @@ namespace Server } private uint GetBirthPointIdx(long playerID) // 获取出生点位置 { - return (uint)(playerID + 1); // ID从0-4,出生点从1-5 + return (uint)playerID + 1; // ID从0-4,出生点从1-5 } private bool ValidPlayerID(long playerID) { @@ -193,15 +216,16 @@ namespace Server default: return Protobuf.PlaceType.NullPlaceType; } } - private MessageOfMap MapMsg(uint[,] map) + private MessageOfObj MapMsg(uint[,] map) { - MessageOfMap msgOfMap = new MessageOfMap(); + MessageOfObj msgOfMap = new(); + msgOfMap.MapMessage = new(); for (int i = 0; i < GameData.rows; i++) { - msgOfMap.Row.Add(new MessageOfMap.Types.Row()); + msgOfMap.MapMessage.Row.Add(new MessageOfMap.Types.Row()); for (int j = 0; j < GameData.cols; j++) { - msgOfMap.Row[i].Col.Add(IntToPlaceType(map[i, j])); + msgOfMap.MapMessage.Row[i].Col.Add(IntToPlaceType(map[i, j])); } } return msgOfMap; @@ -226,6 +250,7 @@ namespace Server protected readonly object addPlayerLock = new(); public override async Task AddPlayer(PlayerMsg request, IServerStreamWriter responseStream, ServerCallContext context) { + Console.WriteLine($"AddPlayer: {request.PlayerId}"); if (request.PlayerId >= spectatorMinPlayerID) { @@ -246,7 +271,25 @@ namespace Server if (communicationToGameID[request.PlayerId] != GameObj.invalidID) //是否已经添加了该玩家 return; - Preparation.Utility.CharacterType characterType = Preparation.Utility.CharacterType.Athlete; // 待修改 + Preparation.Utility.CharacterType characterType = Preparation.Utility.CharacterType.Null; // 待修改 + if (request.PlayerType == PlayerType.StudentPlayer) + { + switch (request.StudentType) + { + default: + characterType = Preparation.Utility.CharacterType.Athlete; + break; + } + } + else if (request.PlayerType == PlayerType.TrickerPlayer) + { + switch (request.TrickerType) + { + default: + characterType = Preparation.Utility.CharacterType.Assassin; + break; + } + } lock (addPlayerLock) { @@ -295,18 +338,20 @@ namespace Server Console.WriteLine($"Move ID: {request.PlayerId}, TimeInMilliseconds: {request.TimeInMilliseconds}"); #endif var gameID = communicationToGameID[request.PlayerId]; - game.MovePlayer(gameID, (int)request.TimeInMilliseconds, request.Angle); - // 之后game.MovePlayer可能改为bool类型 MoveRes moveRes = new(); + game.MovePlayer(gameID, (int)request.TimeInMilliseconds, request.Angle); + // 之后game.MovePlayer可能改为bool类 moveRes.ActSuccess = true; + if (!game.GameMap.Timer.IsGaming) moveRes.ActSuccess = false; return Task.FromResult(moveRes); } public override Task PickProp(PropMsg request, ServerCallContext context) { BoolRes boolRes = new(); + var gameID = communicationToGameID[request.PlayerId]; if (request.PropType == Protobuf.PropType.NullPropType) - boolRes.ActSuccess = game.PickProp(request.PlayerId, Preparation.Utility.PropType.Null); + boolRes.ActSuccess = game.PickProp(gameID, Preparation.Utility.PropType.Null); // 待修改 return Task.FromResult(boolRes); } @@ -320,8 +365,6 @@ namespace Server boolRes.ActSuccess = false; return Task.FromResult(boolRes); } - MsgRes msg = new(); - msg.HaveMessage = false; if (request.Message.Length > 256) { #if DEBUG @@ -332,30 +375,22 @@ namespace Server } else { - msg.HaveMessage = true; - msg.FromPlayerId = request.PlayerId; - msg.MessageReceived = request.Message; + MessageOfNews news = new(); + news.News = request.Message; + news.FromId = request.PlayerId; + news.ToId = request.ToPlayerId; + lock (newsLock) + { + currentNews.Add(news); + } #if DEBUG - Console.WriteLine(msg); + Console.WriteLine(news.News); #endif - teamCommunicatonMsg[request.ToPlayerId].Enqueue(msg); + //teamCommunicatonMsg[request.ToPlayerId].Enqueue(msg); } boolRes.ActSuccess = true; return Task.FromResult(boolRes); } - - public override Task GetMessage(IDMsg request, IServerStreamWriter responseStream, ServerCallContext context) - { - if (!game.GameMap.Timer.IsGaming) return Task.CompletedTask; - lock (teamCommunicationLock[request.PlayerId]) - { - while (teamCommunicatonMsg[request.PlayerId].Count > 0) - { - responseStream.WriteAsync(teamCommunicatonMsg[request.PlayerId].Dequeue()); - } - } - return Task.CompletedTask; - } public override Task UseProp(PropMsg request, ServerCallContext context) { return base.UseProp(request, context); @@ -436,9 +471,8 @@ namespace Server } finally { this.game = new Game(map, options.TeamCount); } } + currentMapMsg = MapMsg(game.GameMap.ProtoGameMap); communicationToGameID = new long[options.PlayerCountPerTeam + 1]; - teamCommunicatonMsg = new Queue[options.PlayerCountPerTeam + 1]; - teamCommunicationLock = new object[options.PlayerCountPerTeam + 1]; //创建server时先设定待加入人物都是invalid for (int i = 0; i < communicationToGameID.GetLength(0); i++) { diff --git a/logic/Server/Properties/launchSettings.json b/logic/Server/Properties/launchSettings.json index 62a6702..e92f6c7 100644 --- a/logic/Server/Properties/launchSettings.json +++ b/logic/Server/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Server": { "commandName": "Project", - "commandLineArgs": "-p 8888" + "commandLineArgs": "-p 8888\r\n-f playback\r\n-g 600\r\n-b true\r\n-c 4\r\n-t 2" } } -} +} \ No newline at end of file From 58ddf48513050567e7d80eb55ebddbcb0c3c17fb Mon Sep 17 00:00:00 2001 From: gsy1519 <614054460@qq.com> Date: Sun, 19 Mar 2023 01:38:59 +0800 Subject: [PATCH 5/5] fix: --- logic/Server/GameServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logic/Server/GameServer.cs b/logic/Server/GameServer.cs index bfdf687..2106336 100644 --- a/logic/Server/GameServer.cs +++ b/logic/Server/GameServer.cs @@ -250,7 +250,7 @@ namespace Server protected readonly object addPlayerLock = new(); public override async Task AddPlayer(PlayerMsg request, IServerStreamWriter responseStream, ServerCallContext context) { - + Console.WriteLine($"AddPlayer: {request.PlayerId}"); if (request.PlayerId >= spectatorMinPlayerID) {