diff --git a/CAPI/cpp/API/include/API.h b/CAPI/cpp/API/include/API.h index 88c15d0..3c1d85c 100644 --- a/CAPI/cpp/API/include/API.h +++ b/CAPI/cpp/API/include/API.h @@ -32,14 +32,21 @@ class ILogic public: // 获取服务器发来的消息 - virtual std::vector> GetTrickers() const = 0; - virtual std::vector> GetStudents() const = 0; - virtual std::vector> GetProps() const = 0; - virtual std::shared_ptr StudentGetSelfInfo() const = 0; - virtual std::shared_ptr TrickerGetSelfInfo() const = 0; + [[nodiscard]] virtual std::vector> GetTrickers() const = 0; + [[nodiscard]] virtual std::vector> GetStudents() const = 0; + [[nodiscard]] virtual std::vector> GetProps() const = 0; + [[nodiscard]] virtual std::shared_ptr StudentGetSelfInfo() const = 0; + [[nodiscard]] virtual std::shared_ptr TrickerGetSelfInfo() const = 0; + + [[nodiscard]] virtual std::vector> GetFullMap() const = 0; + [[nodiscard]] virtual THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const = 0; + + [[nodiscard]] virtual int32_t GetClassroomProgress(int32_t cellX, int32_t cellY) const = 0; + [[nodiscard]] virtual int32_t GetChestProgress(int32_t cellX, int32_t cellY) const = 0; + [[nodiscard]] virtual int32_t GetGateProgress(int32_t cellX, int32_t cellY) const = 0; + [[nodiscard]] virtual bool IsDoorOpen(int32_t cellX, int32_t cellY) const = 0; - virtual std::vector> GetFullMap() const = 0; - virtual THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const = 0; + [[nodiscard]] virtual std::shared_ptr GetGameInfo() const = 0; // 供IAPI使用的操作相关的部分 virtual bool Move(int64_t time, double angle) = 0; @@ -71,7 +78,7 @@ public: // ITrickerAPI使用的部分 virtual bool Attack(double angle) = 0; - virtual const std::vector GetPlayerGUIDs() const = 0; + virtual std::vector GetPlayerGUIDs() const = 0; }; class IAPI @@ -117,10 +124,17 @@ public: // 获取地图信息,视野外的地图统一为Land [[nodiscard]] virtual std::vector> GetFullMap() const = 0; - [[nodiscard]] virtual THUAI6::PlaceType GetPlaceType(int32_t CellX, int32_t CellY) const = 0; + [[nodiscard]] virtual THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const = 0; + + [[nodiscard]] virtual bool IsDoorOpen(int32_t cellX, int32_t cellY) const = 0; + [[nodiscard]] virtual int32_t GetChestProgress(int32_t cellX, int32_t cellY) const = 0; + [[nodiscard]] virtual int32_t GetGateProgress(int32_t cellX, int32_t cellY) const = 0; + [[nodiscard]] virtual int32_t GetClassroomProgress(int32_t cellX, int32_t cellY) const = 0; + + [[nodiscard]] virtual std::shared_ptr GetGameInfo() const = 0; // 获取所有玩家的GUID - [[nodiscard]] virtual const std::vector GetPlayerGUIDs() const = 0; + [[nodiscard]] virtual std::vector GetPlayerGUIDs() const = 0; // 获取游戏目前所进行的帧数 [[nodiscard]] virtual int GetFrameCount() const = 0; @@ -225,9 +239,16 @@ public: [[nodiscard]] std::vector> GetProps() const override; [[nodiscard]] std::vector> GetFullMap() const override; - [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t CellX, int32_t CellY) const override; + [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const override; - [[nodiscard]] const std::vector GetPlayerGUIDs() const override; + [[nodiscard]] bool IsDoorOpen(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetChestProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetGateProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetClassroomProgress(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] std::shared_ptr GetGameInfo() const override; + + [[nodiscard]] std::vector GetPlayerGUIDs() const override; std::future StartLearning() override; std::future StartTreatMate() override; @@ -298,9 +319,16 @@ public: [[nodiscard]] std::vector> GetProps() const override; [[nodiscard]] std::vector> GetFullMap() const override; - [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t CellX, int32_t CellY) const override; + [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] bool IsDoorOpen(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetChestProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetGateProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetClassroomProgress(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] std::shared_ptr GetGameInfo() const override; - [[nodiscard]] const std::vector GetPlayerGUIDs() const override; + [[nodiscard]] std::vector GetPlayerGUIDs() const override; std::future Attack(double angleInRadian) override; [[nodiscard]] std::shared_ptr GetSelfInfo() const override; @@ -363,9 +391,16 @@ public: [[nodiscard]] std::vector> GetProps() const override; [[nodiscard]] std::vector> GetFullMap() const override; - [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t CellX, int32_t CellY) const override; + [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const override; - [[nodiscard]] const std::vector GetPlayerGUIDs() const override; + [[nodiscard]] bool IsDoorOpen(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetChestProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetGateProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetClassroomProgress(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] std::shared_ptr GetGameInfo() const override; + + [[nodiscard]] std::vector GetPlayerGUIDs() const override; std::future StartLearning() override; std::future StartTreatMate() override; @@ -423,9 +458,16 @@ public: [[nodiscard]] std::vector> GetProps() const override; [[nodiscard]] std::vector> GetFullMap() const override; - [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t CellX, int32_t CellY) const override; + [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] bool IsDoorOpen(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetChestProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetGateProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetClassroomProgress(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] std::shared_ptr GetGameInfo() const override; - [[nodiscard]] const std::vector GetPlayerGUIDs() const override; + [[nodiscard]] std::vector GetPlayerGUIDs() const override; std::future Attack(double angleInRadian) override; [[nodiscard]] std::shared_ptr GetSelfInfo() const override; diff --git a/CAPI/cpp/API/include/Communication.h b/CAPI/cpp/API/include/Communication.h index ef69a4d..70a15ac 100644 --- a/CAPI/cpp/API/include/Communication.h +++ b/CAPI/cpp/API/include/Communication.h @@ -50,11 +50,12 @@ 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; - THUAI6::PlayerType playerType; bool haveNewMessage = false; protobuf::MessageToClient message2Client; ConcurrentQueue> messageQueue; diff --git a/CAPI/cpp/API/include/logic.h b/CAPI/cpp/API/include/logic.h index c4c21b9..047724a 100644 --- a/CAPI/cpp/API/include/logic.h +++ b/CAPI/cpp/API/include/logic.h @@ -90,14 +90,21 @@ private: // 提供给API使用的函数 - std::vector> GetTrickers() const override; - std::vector> GetStudents() const override; - std::vector> GetProps() const override; - std::shared_ptr StudentGetSelfInfo() const override; - std::shared_ptr TrickerGetSelfInfo() const override; + [[nodiscard]] std::vector> GetTrickers() const override; + [[nodiscard]] std::vector> GetStudents() const override; + [[nodiscard]] std::vector> GetProps() const override; + [[nodiscard]] std::shared_ptr StudentGetSelfInfo() const override; + [[nodiscard]] std::shared_ptr TrickerGetSelfInfo() const override; - std::vector> GetFullMap() const override; - THUAI6::PlaceType GetPlaceType(int32_t CellX, int32_t CellY) const override; + [[nodiscard]] std::vector> GetFullMap() const override; + [[nodiscard]] THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] bool IsDoorOpen(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetClassroomProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetChestProgress(int32_t cellX, int32_t cellY) const override; + [[nodiscard]] int32_t GetGateProgress(int32_t cellX, int32_t cellY) const override; + + [[nodiscard]] std::shared_ptr GetGameInfo() const override; // 供IAPI使用的操作相关的部分 bool Move(int64_t time, double angle) override; @@ -129,7 +136,7 @@ private: int GetCounter() const override; - const std::vector GetPlayerGUIDs() const override; + std::vector GetPlayerGUIDs() const override; bool TryConnection(); diff --git a/CAPI/cpp/API/include/state.h b/CAPI/cpp/API/include/state.h index d8e7863..1440a2d 100644 --- a/CAPI/cpp/API/include/state.h +++ b/CAPI/cpp/API/include/state.h @@ -25,7 +25,9 @@ struct State std::vector> bombedBullets; - std::shared_ptr gameMap; + std::vector> gameMap; + + std::shared_ptr mapInfo; std::shared_ptr gameInfo; diff --git a/CAPI/cpp/API/include/structures.h b/CAPI/cpp/API/include/structures.h index 2736138..ae81ccd 100644 --- a/CAPI/cpp/API/include/structures.h +++ b/CAPI/cpp/API/include/structures.h @@ -138,15 +138,10 @@ namespace THUAI6 PropMessage = 3, BulletMessage = 4, BombedBulletMessage = 5, - }; - - enum class MessageOfMapObj : unsigned char - { - NullMessageOfMapObj = 0, - ClassroomMessage = 1, - DoorMessage = 2, - GateMessage = 3, - ChestMessage = 4, + ClassroomMessage = 6, + DoorMessage = 7, + GateMessage = 8, + ChestMessage = 9, }; // 玩家类 @@ -160,8 +155,8 @@ namespace THUAI6 int64_t guid; // 全局唯一ID int16_t radius; // 圆形物体的半径或正方形物体的内切圆半径 - int32_t damage; // 攻击伤害 - double timeUntilSkillAvailable; // 技能冷却时间 + int32_t damage; // 攻击伤害 + std::vector timeUntilSkillAvailable; // 技能冷却时间 PlayerType playerType; // 玩家类型 std::vector props; @@ -174,9 +169,7 @@ namespace THUAI6 { StudentType studentType; int32_t determination; // 剩余毅力(本次Emo之前还能承受的伤害) - int32_t failNum; // 挂科数量 - double failTime; // 挂科时间 - double emoTime; // EMO时间 + int32_t addiction; std::vector buff; // buff }; @@ -223,7 +216,6 @@ namespace THUAI6 struct GameMap { - std::vector> gameMap; std::map, int32_t> classRoomState; std::map, int32_t> gateState; @@ -316,14 +308,11 @@ namespace THUAI6 {MessageOfObj::PropMessage, "PropMessage"}, {MessageOfObj::BulletMessage, "BulletMessage"}, {MessageOfObj::BombedBulletMessage, "BombedBulletMessage"}, - }; - - inline std::map messageOfMapObjDict{ - {MessageOfMapObj::NullMessageOfMapObj, "NullMessageOfMapObj"}, - {MessageOfMapObj::ClassroomMessage, "ClassroomMessage"}, - {MessageOfMapObj::DoorMessage, "DoorMessage"}, - {MessageOfMapObj::GateMessage, "GateMessage"}, - {MessageOfMapObj::ChestMessage, "ChestMessage"}, + {MessageOfObj::NullMessageOfObj, "NullMessageOfObj"}, + {MessageOfObj::ClassroomMessage, "ClassroomMessage"}, + {MessageOfObj::DoorMessage, "DoorMessage"}, + {MessageOfObj::GateMessage, "GateMessage"}, + {MessageOfObj::ChestMessage, "ChestMessage"}, }; } // namespace THUAI6 diff --git a/CAPI/cpp/API/include/utils.hpp b/CAPI/cpp/API/include/utils.hpp index 4dbaf9c..5ffdf42 100644 --- a/CAPI/cpp/API/include/utils.hpp +++ b/CAPI/cpp/API/include/utils.hpp @@ -71,6 +71,7 @@ namespace Proto2THUAI6 {protobuf::PlaceType::HIDDEN_GATE, THUAI6::PlaceType::HiddenGate}, {protobuf::PlaceType::WINDOW, THUAI6::PlaceType::Window}, {protobuf::PlaceType::DOOR, THUAI6::PlaceType::Door}, + {protobuf::PlaceType::CHEST, THUAI6::PlaceType::Chest}, }; inline std::map shapeTypeDict{ @@ -156,19 +157,16 @@ namespace Proto2THUAI6 }; inline std::map messageOfObjDict{ - {protobuf::MessageOfObj::kStudentMessage, THUAI6::MessageOfObj::StudentMessage}, - {protobuf::MessageOfObj::kTrickerMessage, THUAI6::MessageOfObj::TrickerMessage}, - {protobuf::MessageOfObj::kPropMessage, THUAI6::MessageOfObj::PropMessage}, - {protobuf::MessageOfObj::kBulletMessage, THUAI6::MessageOfObj::BulletMessage}, - {protobuf::MessageOfObj::kBombedBulletMessage, THUAI6::MessageOfObj::BombedBulletMessage}, - {protobuf::MessageOfObj::MESSAGE_OF_OBJ_NOT_SET, THUAI6::MessageOfObj::NullMessageOfObj}, - }; - - inline std::map messageOfMapObjDict{ - {protobuf::MessageOfMapObj::MessageOfMapObjCase::kClassroomMessage, THUAI6::MessageOfMapObj::ClassroomMessage}, - {protobuf::MessageOfMapObj::MessageOfMapObjCase::kDoorMessage, THUAI6::MessageOfMapObj::DoorMessage}, - {protobuf::MessageOfMapObj::MessageOfMapObjCase::kGateMessage, THUAI6::MessageOfMapObj::GateMessage}, - {protobuf::MessageOfMapObj::MessageOfMapObjCase::kChestMessage, THUAI6::MessageOfMapObj::ChestMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kStudentMessage, THUAI6::MessageOfObj::StudentMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kTrickerMessage, THUAI6::MessageOfObj::TrickerMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kPropMessage, THUAI6::MessageOfObj::PropMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kBulletMessage, THUAI6::MessageOfObj::BulletMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kBombedBulletMessage, THUAI6::MessageOfObj::BombedBulletMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kClassroomMessage, THUAI6::MessageOfObj::ClassroomMessage}, + {protobuf::MessageOfObj::MessageOfObjCase::kDoorMessage, THUAI6::MessageOfObj::DoorMessage}, + {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}, }; @@ -180,13 +178,12 @@ namespace Proto2THUAI6 tricker->y = trickerMsg.y(); tricker->speed = trickerMsg.speed(); tricker->damage = trickerMsg.damage(); - tricker->timeUntilSkillAvailable = trickerMsg.time_until_skill_available(); + for (int i = 0; i < trickerMsg.time_until_skill_available().size(); i++) + tricker->timeUntilSkillAvailable.push_back(trickerMsg.time_until_skill_available(i)); tricker->place = placeTypeDict[trickerMsg.place()]; tricker->playerState = playerStateDict[trickerMsg.player_state()]; for (int i = 0; i < trickerMsg.prop().size(); i++) - { tricker->props.push_back(propTypeDict[trickerMsg.prop(i)]); - } tricker->trickerType = trickerTypeDict[trickerMsg.tricker_type()]; tricker->guid = trickerMsg.guid(); tricker->playerID = trickerMsg.player_id(); @@ -194,9 +191,7 @@ namespace Proto2THUAI6 tricker->radius = trickerMsg.radius(); tricker->buff.clear(); for (int i = 0; i < trickerMsg.buff().size(); i++) - { tricker->buff.push_back(trickerBuffTypeDict[trickerMsg.buff(i)]); - } return tricker; } @@ -210,25 +205,20 @@ namespace Proto2THUAI6 student->playerID = studentMsg.player_id(); student->guid = studentMsg.guid(); student->radius = studentMsg.radius(); - student->timeUntilSkillAvailable = studentMsg.time_until_skill_available(); + 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)]); - } student->place = placeTypeDict[studentMsg.place()]; student->playerState = playerStateDict[studentMsg.state()]; student->determination = studentMsg.determination(); - student->failNum = studentMsg.fail_num(); - student->failTime = studentMsg.fail_time(); - student->emoTime = studentMsg.emo_time(); + student->addiction = studentMsg.addiction(); student->studentType = studentTypeDict[studentMsg.student_type()]; student->buff.clear(); for (int i = 0; i < studentMsg.buff_size(); i++) - { student->buff.push_back(studentBuffTypeDict[studentMsg.buff(i)]); - } return student; } @@ -246,36 +236,6 @@ namespace Proto2THUAI6 return prop; } - inline std::shared_ptr Protobuf2THUAI6Map(const protobuf::MessageOfMap& mapMsg) - { - auto map = std::make_shared(); - for (int i = 0; i < mapMsg.row_size(); i++) - { - std::vector row; - for (int j = 0; j < mapMsg.row(i).col_size(); j++) - { - row.push_back(placeTypeDict[mapMsg.row(i).col(j)]); - } - map->gameMap.push_back(row); - } - for (const auto& item : mapMsg.map_obj_message()) - switch (messageOfMapObjDict[item.message_of_map_obj_case()]) - { - case THUAI6::MessageOfMapObj::ClassroomMessage: - map->classRoomState.emplace(std::make_pair(item.classroom_message().x(), item.classroom_message().y()), item.classroom_message().progress()); - break; - case THUAI6::MessageOfMapObj::DoorMessage: - map->doorState.emplace(std::make_pair(item.door_message().x(), item.door_message().y()), item.door_message().is_open()); - break; - case THUAI6::MessageOfMapObj::GateMessage: - map->gateState.emplace(std::make_pair(item.gate_message().x(), item.gate_message().y()), item.gate_message().progress()); - break; - default: - break; - } - return map; - } - inline std::shared_ptr Protobuf2THUAI6GameInfo(const protobuf::MessageOfAll& allMsg) { auto gameInfo = std::make_shared(); @@ -403,59 +363,52 @@ namespace THUAI62Proto return playerMsg; } - inline protobuf::IDMsg THUAI62ProtobufID(int playerID, THUAI6::PlayerType playerType) + inline protobuf::IDMsg THUAI62ProtobufID(int playerID) { protobuf::IDMsg idMsg; idMsg.set_player_id(playerID); - idMsg.set_player_type(playerTypeDict[playerType]); return idMsg; } - inline protobuf::MoveMsg THUAI62ProtobufMove(int64_t time, double angle, int64_t id, THUAI6::PlayerType playerType) + inline protobuf::MoveMsg THUAI62ProtobufMove(int64_t time, double angle, int64_t id) { protobuf::MoveMsg moveMsg; moveMsg.set_time_in_milliseconds(time); moveMsg.set_angle(angle); moveMsg.set_player_id(id); - moveMsg.set_player_type(playerTypeDict[playerType]); return moveMsg; } - inline protobuf::PropMsg THUAI62ProtobufProp(THUAI6::PropType prop, int64_t id, THUAI6::PlayerType playerType) + inline protobuf::PropMsg THUAI62ProtobufProp(THUAI6::PropType prop, int64_t id) { protobuf::PropMsg pickMsg; pickMsg.set_prop_type(propTypeDict[prop]); pickMsg.set_player_id(id); - pickMsg.set_player_type(playerTypeDict[playerType]); return pickMsg; } - inline protobuf::SendMsg THUAI62ProtobufSend(std::string msg, int64_t toID, int64_t id, THUAI6::PlayerType playerType, THUAI6::PlayerType toType) + inline protobuf::SendMsg THUAI62ProtobufSend(std::string msg, int64_t toID, int64_t id) { protobuf::SendMsg sendMsg; sendMsg.set_message(msg); sendMsg.set_to_player_id(toID); sendMsg.set_player_id(id); - sendMsg.set_player_type(playerTypeDict[playerType]); - sendMsg.set_to_player_type(playerTypeDict[toType]); return sendMsg; } - inline protobuf::AttackMsg THUAI62ProtobufAttack(double angle, int64_t id, THUAI6::PlayerType playerType) + inline protobuf::AttackMsg THUAI62ProtobufAttack(double angle, int64_t id) { protobuf::AttackMsg attackMsg; attackMsg.set_angle(angle); attackMsg.set_player_id(id); - attackMsg.set_player_type(playerTypeDict[playerType]); return attackMsg; } - inline protobuf::SkillMsg THUAI62ProtobufSkill(int32_t skillID, int64_t id, THUAI6::PlayerType playerType) + inline protobuf::SkillMsg THUAI62ProtobufSkill(int32_t skillID, int64_t id) { protobuf::SkillMsg skillMsg; skillMsg.set_skill_id(skillID); skillMsg.set_player_id(id); - skillMsg.set_player_type(playerTypeDict[playerType]); return skillMsg; } } // namespace THUAI62Proto diff --git a/CAPI/cpp/API/src/API.cpp b/CAPI/cpp/API/src/API.cpp index 2afe849..a68705f 100644 --- a/CAPI/cpp/API/src/API.cpp +++ b/CAPI/cpp/API/src/API.cpp @@ -279,12 +279,62 @@ std::vector> TrickerAPI::GetFullMap() const return logic.GetFullMap(); } -const std::vector StudentAPI::GetPlayerGUIDs() const +bool StudentAPI::IsDoorOpen(int32_t cellX, int32_t cellY) const +{ + return logic.IsDoorOpen(cellX, cellY); +} + +bool TrickerAPI::IsDoorOpen(int32_t cellX, int32_t cellY) const +{ + return logic.IsDoorOpen(cellX, cellY); +} + +int32_t StudentAPI::GetClassroomProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetClassroomProgress(cellX, cellY); +} + +int32_t TrickerAPI::GetClassroomProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetClassroomProgress(cellX, cellY); +} + +int32_t StudentAPI::GetChestProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetChestProgress(cellX, cellY); +} + +int32_t TrickerAPI::GetChestProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetChestProgress(cellX, cellY); +} + +int32_t StudentAPI::GetGateProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetGateProgress(cellX, cellY); +} + +int32_t TrickerAPI::GetGateProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetGateProgress(cellX, cellY); +} + +std::shared_ptr StudentAPI::GetGameInfo() const +{ + return logic.GetGameInfo(); +} + +std::shared_ptr TrickerAPI::GetGameInfo() const +{ + return logic.GetGameInfo(); +} + +std::vector StudentAPI::GetPlayerGUIDs() const { return logic.GetPlayerGUIDs(); } -const std::vector TrickerAPI::GetPlayerGUIDs() const +std::vector TrickerAPI::GetPlayerGUIDs() const { return logic.GetPlayerGUIDs(); } diff --git a/CAPI/cpp/API/src/Communication.cpp b/CAPI/cpp/API/src/Communication.cpp index c6e40cf..4f9ef99 100644 --- a/CAPI/cpp/API/src/Communication.cpp +++ b/CAPI/cpp/API/src/Communication.cpp @@ -18,7 +18,7 @@ bool Communication::Move(int64_t time, double angle, int64_t playerID) { protobuf::MoveRes moveResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufMove(time, angle, playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufMove(time, angle, playerID); std::cout << "Move request sent" << std::endl; auto status = THUAI6Stub->Move(&context, request, &moveResult); if (status.ok()) @@ -31,7 +31,7 @@ bool Communication::PickProp(THUAI6::PropType prop, int64_t playerID) { protobuf::BoolRes pickPropResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufProp(prop, playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufProp(prop, playerID); auto status = THUAI6Stub->PickProp(&context, request, &pickPropResult); if (status.ok()) return pickPropResult.act_success(); @@ -43,7 +43,7 @@ bool Communication::UseProp(THUAI6::PropType prop, int64_t playerID) { protobuf::BoolRes usePropResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufProp(prop, playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufProp(prop, playerID); auto status = THUAI6Stub->UseProp(&context, request, &usePropResult); if (status.ok()) return usePropResult.act_success(); @@ -55,7 +55,7 @@ bool Communication::UseSkill(int32_t skillID, int64_t playerID) { protobuf::BoolRes useSkillResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufSkill(skillID, playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufSkill(skillID, playerID); auto status = THUAI6Stub->UseSkill(&context, request, &useSkillResult); if (status.ok()) return useSkillResult.act_success(); @@ -67,7 +67,7 @@ bool Communication::SendMessage(int64_t toID, std::string message, int64_t playe { protobuf::BoolRes sendMessageResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufSend(message, toID, playerID, playerType, playerType); + auto request = THUAI62Proto::THUAI62ProtobufSend(message, toID, playerID); auto status = THUAI6Stub->SendMessage(&context, request, &sendMessageResult); if (status.ok()) return sendMessageResult.act_success(); @@ -79,7 +79,7 @@ bool Communication::OpenDoor(int64_t playerID) { protobuf::BoolRes openDoorResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->OpenDoor(&context, request, &openDoorResult); if (status.ok()) return openDoorResult.act_success(); @@ -91,7 +91,7 @@ bool Communication::CloseDoor(int64_t playerID) { protobuf::BoolRes closeDoorResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->CloseDoor(&context, request, &closeDoorResult); if (status.ok()) return closeDoorResult.act_success(); @@ -103,7 +103,7 @@ bool Communication::SkipWindow(int64_t playerID) { protobuf::BoolRes skipWindowResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->SkipWindow(&context, request, &skipWindowResult); if (status.ok()) return skipWindowResult.act_success(); @@ -115,7 +115,7 @@ bool Communication::StartOpenGate(int64_t playerID) { protobuf::BoolRes startOpenGateResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->StartOpenGate(&context, request, &startOpenGateResult); if (status.ok()) return startOpenGateResult.act_success(); @@ -127,7 +127,7 @@ bool Communication::StartOpenChest(int64_t playerID) { protobuf::BoolRes startOpenChestResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->StartOpenChest(&context, request, &startOpenChestResult); if (status.ok()) return startOpenChestResult.act_success(); @@ -139,7 +139,7 @@ bool Communication::EndAllAction(int64_t playerID) { protobuf::BoolRes endAllActionResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->EndAllAction(&context, request, &endAllActionResult); if (status.ok()) return endAllActionResult.act_success(); @@ -151,7 +151,7 @@ bool Communication::Graduate(int64_t playerID) { protobuf::BoolRes graduateResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->Graduate(&context, request, &graduateResult); if (status.ok()) return graduateResult.act_success(); @@ -163,7 +163,7 @@ bool Communication::StartLearning(int64_t playerID) { protobuf::BoolRes startLearningResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->StartLearning(&context, request, &startLearningResult); if (status.ok()) return startLearningResult.act_success(); @@ -175,7 +175,7 @@ bool Communication::StartRescueMate(int64_t playerID) { protobuf::BoolRes saveStudentResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->StartRescueMate(&context, request, &saveStudentResult); if (status.ok()) return saveStudentResult.act_success(); @@ -187,7 +187,7 @@ bool Communication::StartTreatMate(int64_t playerID) { protobuf::BoolRes healStudentResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->StartTreatMate(&context, request, &healStudentResult); if (status.ok()) return healStudentResult.act_success(); @@ -199,7 +199,7 @@ bool Communication::Attack(double angle, int64_t playerID) { protobuf::BoolRes attackResult; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufAttack(angle, playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufAttack(angle, playerID); auto status = THUAI6Stub->Attack(&context, request, &attackResult); if (status.ok()) return attackResult.act_success(); @@ -211,7 +211,7 @@ bool Communication::TryConnection(int64_t playerID) { protobuf::BoolRes reply; ClientContext context; - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); auto status = THUAI6Stub->TryConnection(&context, request, &reply); if (status.ok()) { @@ -245,7 +245,7 @@ void Communication::ReadMessage(int64_t playerID) { auto tRead = [=]() { - auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType); + auto request = THUAI62Proto::THUAI62ProtobufID(playerID); ClientContext context; protobuf::MsgRes messageReceived; auto reader = THUAI6Stub->GetMessage(&context, request); @@ -257,12 +257,11 @@ void Communication::ReadMessage(int64_t playerID) std::thread(tRead).detach(); } -void Communication::AddPlayer(int64_t playerID, THUAI6::PlayerType playerType_, THUAI6::StudentType studentType, THUAI6::TrickerType trickerType) +void Communication::AddPlayer(int64_t playerID, THUAI6::PlayerType playerType, THUAI6::StudentType studentType, THUAI6::TrickerType trickerType) { - playerType = playerType_; auto tMessage = [=]() { - protobuf::PlayerMsg playerMsg = THUAI62Proto::THUAI62ProtobufPlayer(playerID, playerType_, studentType, trickerType); + protobuf::PlayerMsg playerMsg = THUAI62Proto::THUAI62ProtobufPlayer(playerID, playerType, studentType, trickerType); grpc::ClientContext context; auto MessageReader = THUAI6Stub->AddPlayer(&context, playerMsg); @@ -277,3 +276,27 @@ void Communication::AddPlayer(int64_t playerID, THUAI6::PlayerType playerType_, }; 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 e5aeed7..cd8dca6 100644 --- a/CAPI/cpp/API/src/DebugAPI.cpp +++ b/CAPI/cpp/API/src/DebugAPI.cpp @@ -410,12 +410,62 @@ std::vector> TrickerDebugAPI::GetFullMap() const return logic.GetFullMap(); } -const std::vector StudentDebugAPI::GetPlayerGUIDs() const +bool StudentDebugAPI::IsDoorOpen(int32_t cellX, int32_t cellY) const +{ + return logic.IsDoorOpen(cellX, cellY); +} + +bool TrickerDebugAPI::IsDoorOpen(int32_t cellX, int32_t cellY) const +{ + return logic.IsDoorOpen(cellX, cellY); +} + +int32_t StudentDebugAPI::GetClassroomProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetClassroomProgress(cellX, cellY); +} + +int32_t TrickerDebugAPI::GetClassroomProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetClassroomProgress(cellX, cellY); +} + +int32_t StudentDebugAPI::GetChestProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetChestProgress(cellX, cellY); +} + +int32_t TrickerDebugAPI::GetChestProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetChestProgress(cellX, cellY); +} + +int32_t StudentDebugAPI::GetGateProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetGateProgress(cellX, cellY); +} + +int32_t TrickerDebugAPI::GetGateProgress(int32_t cellX, int32_t cellY) const +{ + return logic.GetGateProgress(cellX, cellY); +} + +std::shared_ptr StudentDebugAPI::GetGameInfo() const +{ + return logic.GetGameInfo(); +} + +std::shared_ptr TrickerDebugAPI::GetGameInfo() const +{ + return logic.GetGameInfo(); +} + +std::vector StudentDebugAPI::GetPlayerGUIDs() const { return logic.GetPlayerGUIDs(); } -const std::vector TrickerDebugAPI::GetPlayerGUIDs() const +std::vector TrickerDebugAPI::GetPlayerGUIDs() const { return logic.GetPlayerGUIDs(); } @@ -492,17 +542,21 @@ std::shared_ptr TrickerDebugAPI::GetSelfInfo() const void StudentDebugAPI::PrintStudent() const { - for (auto student : logic.GetStudents()) + for (const auto& student : logic.GetStudents()) { logger->info("******Student Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); - logger->info("speed={}, view range={}, damage={}, skill time={}, place={}", student->speed, student->viewRange, student->damage, student->timeUntilSkillAvailable, THUAI6::placeTypeDict[student->place]); - logger->info("state={}, determination={}, fail num={}, fail time={}, emo time={}", THUAI6::playerStateDict[student->playerState], student->determination, student->failNum, student->failTime, student->emoTime); + logger->info("speed={}, view range={}, damage={}, place={}", student->speed, student->viewRange, student->damage, 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) + skillTime += std::to_string(time) + ", "; + logger->info(skillTime); std::string studentBuff = "buff="; std::string studentProp = "prop="; - for (auto buff : student->buff) + for (const auto& buff : student->buff) studentBuff += THUAI6::studentBuffDict[buff] + ", "; - for (auto prop : student->props) + for (const auto& prop : student->props) studentProp += THUAI6::propTypeDict[prop] + ", "; logger->info(studentBuff); logger->info(studentProp); @@ -512,17 +566,21 @@ void StudentDebugAPI::PrintStudent() const void TrickerDebugAPI::PrintStudent() const { - for (auto student : logic.GetStudents()) + for (const auto& student : logic.GetStudents()) { logger->info("******Student Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); - logger->info("speed={}, view range={}, damage={}, skill time={}, place={}", student->speed, student->viewRange, student->damage, student->timeUntilSkillAvailable, THUAI6::placeTypeDict[student->place]); - logger->info("state={}, determination={}, fail num={}, fail time={}, emo time={}", THUAI6::playerStateDict[student->playerState], student->determination, student->failNum, student->failTime, student->emoTime); + logger->info("speed={}, view range={}, damage={}, place={}", student->speed, student->viewRange, student->damage, 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) + skillTime += std::to_string(time) + ", "; + logger->info(skillTime); std::string studentBuff = "buff="; std::string studentProp = "prop="; - for (auto buff : student->buff) + for (const auto& buff : student->buff) studentBuff += THUAI6::studentBuffDict[buff] + ", "; - for (auto prop : student->props) + for (const auto& prop : student->props) studentProp += THUAI6::propTypeDict[prop] + ", "; logger->info(studentBuff); logger->info(studentProp); @@ -532,18 +590,22 @@ void TrickerDebugAPI::PrintStudent() const void StudentDebugAPI::PrintTricker() const { - for (auto tricker : logic.GetTrickers()) + for (const auto& tricker : logic.GetTrickers()) { logger->info("******Tricker Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); - logger->info("speed={}, view range={}, skill time={}, place={}", tricker->speed, tricker->viewRange, tricker->timeUntilSkillAvailable, THUAI6::placeTypeDict[tricker->place]); + logger->info("speed={}, view range={}, place={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place]); logger->info("damage={}, state={}", tricker->damage, THUAI6::playerStateDict[tricker->playerState]); + std::string skillTime = "skill time="; + for (const auto& time : tricker->timeUntilSkillAvailable) + skillTime += std::to_string(time) + ", "; + logger->info(skillTime); std::string trickerBuff = "buff="; - for (auto buff : tricker->buff) + for (const auto& buff : tricker->buff) trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; logger->info(trickerBuff); std::string trickerProp = "prop="; - for (auto prop : tricker->props) + for (const auto& prop : tricker->props) trickerProp += THUAI6::propTypeDict[prop] + ", "; logger->info(trickerProp); logger->info("************************"); @@ -556,14 +618,18 @@ void TrickerDebugAPI::PrintTricker() const { logger->info("******Tricker Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); - logger->info("speed={}, view range={}, skill time={}, place={}", tricker->speed, tricker->viewRange, tricker->timeUntilSkillAvailable, THUAI6::placeTypeDict[tricker->place]); + logger->info("speed={}, view range={}, place={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place]); logger->info("damage={}, state={}", tricker->damage, THUAI6::playerStateDict[tricker->playerState]); + std::string skillTime = "skill time="; + for (const auto& time : tricker->timeUntilSkillAvailable) + skillTime += std::to_string(time) + ", "; + logger->info(skillTime); std::string trickerBuff = "buff="; - for (auto buff : tricker->buff) + for (const auto& buff : tricker->buff) trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; logger->info(trickerBuff); std::string trickerProp = "prop="; - for (auto prop : tricker->props) + for (const auto& prop : tricker->props) trickerProp += THUAI6::propTypeDict[prop] + ", "; logger->info(trickerProp); logger->info("************************"); @@ -595,14 +661,18 @@ 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={}, skill time={}, place={}", self->speed, self->viewRange, self->damage, self->timeUntilSkillAvailable, THUAI6::placeTypeDict[self->place]); - logger->info("state={}, determination={}, fail num={}, fail time={}, emo time={}", THUAI6::playerStateDict[self->playerState], self->determination, self->failNum, self->failTime, self->emoTime); + logger->info("speed={}, view range={}, damage={}, place={}", self->speed, self->viewRange, self->damage, 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) + skillTime += std::to_string(time) + ", "; + logger->info(skillTime); std::string studentBuff = "buff="; - for (auto buff : self->buff) + for (const auto& buff : self->buff) studentBuff += THUAI6::studentBuffDict[buff] + ", "; logger->info(studentBuff); std::string studentProp = "prop="; - for (auto prop : self->props) + for (const auto& prop : self->props) studentProp += THUAI6::propTypeDict[prop] + ", "; logger->info(studentProp); logger->info("*********************"); @@ -613,14 +683,18 @@ void TrickerDebugAPI::PrintSelfInfo() const auto self = logic.TrickerGetSelfInfo(); logger->info("******Self Info******"); logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y); - logger->info("speed={}, view range={}, skill time={}, place={}", self->speed, self->viewRange, self->timeUntilSkillAvailable, THUAI6::placeTypeDict[self->place]); + logger->info("speed={}, view range={}, place={}", self->speed, self->viewRange, THUAI6::placeTypeDict[self->place]); logger->info("damage={}, state={}", self->damage, THUAI6::playerStateDict[self->playerState]); + std::string skillTime = "skill time="; + for (const auto& time : self->timeUntilSkillAvailable) + skillTime += std::to_string(time) + ", "; + logger->info(skillTime); std::string trickerBuff = "buff="; - for (auto buff : self->buff) + for (const auto& buff : self->buff) trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; logger->info(trickerBuff); std::string trickerProp = "prop="; - for (auto prop : self->props) + for (const auto& prop : self->props) trickerProp += THUAI6::propTypeDict[prop] + ", "; logger->info(trickerProp); logger->info("*********************"); diff --git a/CAPI/cpp/API/src/logic.cpp b/CAPI/cpp/API/src/logic.cpp index f5f278d..48809c6 100644 --- a/CAPI/cpp/API/src/logic.cpp +++ b/CAPI/cpp/API/src/logic.cpp @@ -65,14 +65,65 @@ std::vector> Logic::GetFullMap() const { std::unique_lock lock(mtxState); logger->debug("Called GetFullMap"); - return currentState->gameMap->gameMap; + return currentState->gameMap; } -THUAI6::PlaceType Logic::GetPlaceType(int32_t CellX, int32_t CellY) const +THUAI6::PlaceType Logic::GetPlaceType(int32_t cellX, int32_t cellY) const { std::unique_lock lock(mtxState); logger->debug("Called GetPlaceType"); - return currentState->gameMap->gameMap[CellX][CellY]; + return currentState->gameMap[cellX][cellY]; +} + +bool Logic::IsDoorOpen(int32_t cellX, int32_t cellY) const +{ + std::unique_lock lock(mtxState); + logger->debug("Called IsDoorOpen"); + auto pos = std::make_pair(cellX, cellY); + if (currentState->mapInfo->doorState.count(pos) == 0) + return false; + else + return currentState->mapInfo->doorState[pos]; +} + +int32_t Logic::GetClassroomProgress(int32_t cellX, int32_t cellY) const +{ + std::unique_lock lock(mtxState); + logger->debug("Called GetClassroomProgress"); + auto pos = std::make_pair(cellX, cellY); + if (currentState->mapInfo->classRoomState.count(pos) == 0) + return 0; + else + return currentState->mapInfo->classRoomState[pos]; +} + +int32_t Logic::GetChestProgress(int32_t cellX, int32_t cellY) const +{ + std::unique_lock lock(mtxState); + logger->debug("Called GetChestProgress"); + auto pos = std::make_pair(cellX, cellY); + if (currentState->mapInfo->chestState.count(pos) == 0) + return 0; + else + return currentState->mapInfo->chestState[pos]; +} + +int32_t Logic::GetGateProgress(int32_t cellX, int32_t cellY) const +{ + std::unique_lock lock(mtxState); + logger->debug("Called GetGateProgress"); + auto pos = std::make_pair(cellX, cellY); + if (currentState->mapInfo->gateState.count(pos) == 0) + return 0; + else + return currentState->mapInfo->gateState[pos]; +} + +std::shared_ptr Logic::GetGameInfo() const +{ + std::unique_lock lock(mtxState); + logger->debug("Called GetGameInfo"); + return currentState->gameInfo; } bool Logic::Move(int64_t time, double angle) @@ -195,7 +246,8 @@ void Logic::ProcessMessage() { logger->info("Message thread start!"); pComm->AddPlayer(playerID, playerType, studentType, trickerType); - logger->info("Join the player!"); + currentState->gameMap = pComm->GetMap(playerID); + bufferState->gameMap = currentState->gameMap; pComm->ReadMessage(playerID); while (gameState != THUAI6::GameState::GameEnd) { @@ -268,7 +320,6 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message) logger->debug("Buffer cleared!"); // 读取新的信息 - bufferState->gameMap = Proto2THUAI6::Protobuf2THUAI6Map(message.map_message()); bufferState->gameInfo = Proto2THUAI6::Protobuf2THUAI6GameInfo(message.all_message()); if (playerType == THUAI6::PlayerType::StudentPlayer) { @@ -284,7 +335,7 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message) } 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->gameMap)) + 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!"); @@ -306,7 +357,7 @@ 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->gameMap)) + 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!"); @@ -327,6 +378,69 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message) 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) + { + 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: + { + 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: + { + 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()); + logger->debug("Add Door!"); + } + else + { + bufferState->mapInfo->doorState[pos] = item.door_message().is_open(); + logger->debug("Update Door!"); + } + 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) + { + 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::NullMessageOfObj: + default: + break; } if (asynchronous) { @@ -387,7 +501,7 @@ int Logic::GetCounter() const return counterState; } -const std::vector Logic::GetPlayerGUIDs() const +std::vector Logic::GetPlayerGUIDs() const { std::unique_lock lock(mtxState); return currentState->guids; diff --git a/CAPI/cpp/proto/Message2Clients.pb.cc b/CAPI/cpp/proto/Message2Clients.pb.cc index 9506680..8fdc6bb 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_.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_.time_until_skill_available_)*/ 0, /*decltype(_impl_.fail_num_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.player_state_)*/ 0, /*decltype(_impl_.state_)*/ 0, /*decltype(_impl_.fail_time_)*/ 0, /*decltype(_impl_.emo_time_)*/ 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_.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_)*/ {}} { } struct MessageOfStudentDefaultTypeInternal @@ -48,7 +48,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*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_.time_until_skill_available_)*/ 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_.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_)*/ {}} { } struct MessageOfTrickerDefaultTypeInternal @@ -242,28 +242,6 @@ namespace protobuf }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOfChestDefaultTypeInternal _MessageOfChest_default_instance_; - PROTOBUF_CONSTEXPR MessageOfMapObj::MessageOfMapObj( - ::_pbi::ConstantInitialized - ) : - _impl_{ - /*decltype(_impl_.message_of_map_obj_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}} - { - } - struct MessageOfMapObjDefaultTypeInternal - { - PROTOBUF_CONSTEXPR MessageOfMapObjDefaultTypeInternal() : - _instance(::_pbi::ConstantInitialized{}) - { - } - ~MessageOfMapObjDefaultTypeInternal() - { - } - union - { - MessageOfMapObj _instance; - }; - }; - PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOfMapObjDefaultTypeInternal _MessageOfMapObj_default_instance_; PROTOBUF_CONSTEXPR MessageOfMap_Row::MessageOfMap_Row( ::_pbi::ConstantInitialized ) : @@ -290,7 +268,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.row_)*/ {}, /*decltype(_impl_.map_obj_message_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.row_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageOfMapDefaultTypeInternal @@ -356,7 +334,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.obj_message_)*/ {}, /*decltype(_impl_.map_message_)*/ nullptr, /*decltype(_impl_.all_message_)*/ nullptr, /*decltype(_impl_.game_state_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.obj_message_)*/ {}, /*decltype(_impl_.all_message_)*/ nullptr, /*decltype(_impl_.game_state_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageToClientDefaultTypeInternal @@ -441,7 +419,7 @@ namespace protobuf }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MsgResDefaultTypeInternal _MsgRes_default_instance_; } // namespace protobuf -static ::_pb::Metadata file_level_metadata_Message2Clients_2eproto[19]; +static ::_pb::Metadata file_level_metadata_Message2Clients_2eproto[18]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_Message2Clients_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_Message2Clients_2eproto = nullptr; @@ -456,15 +434,13 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.y_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.speed_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.determination_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.fail_num_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.addiction_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.time_until_skill_available_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.place_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.prop_), 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_.fail_time_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.emo_time_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.view_range_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfStudent, _impl_.radius_), @@ -586,17 +562,6 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfChest, _impl_.y_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfChest, _impl_.progress_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfMapObj, _internal_metadata_), - ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfMapObj, _impl_._oneof_case_[0]), - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - ::_pbi::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfMapObj, _impl_.message_of_map_obj_), - ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfMap_Row, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -610,7 +575,6 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfMap, _impl_.row_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfMap, _impl_.map_obj_message_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfObj, _internal_metadata_), ~0u, // no _extensions_ @@ -622,6 +586,10 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V ::_pbi::kInvalidFieldOffsetTag, ::_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_), @@ -645,7 +613,6 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageToClient, _impl_.obj_message_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageToClient, _impl_.map_message_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageToClient, _impl_.game_state_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageToClient, _impl_.all_message_), ~0u, // no _has_bits_ @@ -676,24 +643,23 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { {0, -1, -1, sizeof(::protobuf::MessageOfStudent)}, - {29, -1, -1, sizeof(::protobuf::MessageOfTricker)}, - {52, -1, -1, sizeof(::protobuf::MessageOfBullet)}, - {66, -1, -1, sizeof(::protobuf::MessageOfBombedBullet)}, - {78, -1, -1, sizeof(::protobuf::MessageOfProp)}, - {92, -1, -1, sizeof(::protobuf::MessageOfPickedProp)}, - {103, -1, -1, sizeof(::protobuf::MessageOfClassroom)}, - {112, -1, -1, sizeof(::protobuf::MessageOfGate)}, - {121, -1, -1, sizeof(::protobuf::MessageOfDoor)}, - {130, -1, -1, sizeof(::protobuf::MessageOfChest)}, - {139, -1, -1, sizeof(::protobuf::MessageOfMapObj)}, - {150, -1, -1, sizeof(::protobuf::MessageOfMap_Row)}, - {157, -1, -1, sizeof(::protobuf::MessageOfMap)}, - {165, -1, -1, sizeof(::protobuf::MessageOfObj)}, - {177, -1, -1, sizeof(::protobuf::MessageOfAll)}, - {192, -1, -1, sizeof(::protobuf::MessageToClient)}, - {202, -1, -1, sizeof(::protobuf::MoveRes)}, - {211, -1, -1, sizeof(::protobuf::BoolRes)}, - {218, -1, -1, sizeof(::protobuf::MsgRes)}, + {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)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -707,7 +673,6 @@ static const ::_pb::Message* const file_default_instances[] = { &::protobuf::_MessageOfGate_default_instance_._instance, &::protobuf::_MessageOfDoor_default_instance_._instance, &::protobuf::_MessageOfChest_default_instance_._instance, - &::protobuf::_MessageOfMapObj_default_instance_._instance, &::protobuf::_MessageOfMap_Row_default_instance_._instance, &::protobuf::_MessageOfMap_default_instance_._instance, &::protobuf::_MessageOfObj_default_instance_._instance, @@ -720,88 +685,84 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\025Message2Clients.proto\022\010protobuf\032\021Messa" - "geType.proto\"\303\004\n\020MessageOfStudent\022\t\n\001x\030\001" + "geType.proto\"\237\004\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\020\n\010fail_num\030\005 \001(\005\022\"\n\032time_" - "until_skill_available\030\006 \001(\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(\0162" - "\025.protobuf.PlayerState\022\014\n\004guid\030\n \001(\003\022$\n\005" - "state\030\013 \001(\0162\025.protobuf.PlayerState\022\021\n\tfa" - "il_time\030\014 \001(\001\022\020\n\010emo_time\030\016 \001(\001\022\021\n\tplaye" - "r_id\030\017 \001(\003\022\022\n\nview_range\030\020 \001(\005\022\016\n\006radius" - "\030\021 \001(\005\022\016\n\006damage\030\022 \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\'\n\004buf" - "f\030\030 \003(\0162\031.protobuf.StudentBuffType\"\266\003\n\020M" - "essageOfTricker\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_unt" - "il_skill_available\030\005 \001(\001\022\"\n\005place\030\006 \001(\0162" - "\023.protobuf.PlaceType\022 \n\004prop\030\007 \003(\0162\022.pro" - "tobuf.PropType\022+\n\014tricker_type\030\010 \001(\0162\025.p" - "rotobuf.TrickerType\022\014\n\004guid\030\t \001(\003\022\017\n\007mov" - "able\030\n \001(\010\022\021\n\tplayer_id\030\013 \001(\003\022\022\n\nview_ra" - "nge\030\014 \001(\005\022\016\n\006radius\030\r \001(\005\022+\n\014player_stat" - "e\030\016 \001(\0162\025.protobuf.PlayerState\022\024\n\014trick_" - "desire\030\017 \001(\001\022\024\n\014class_volume\030\020 \001(\001\022\'\n\004bu" - "ff\030\021 \003(\0162\031.protobuf.TrickerBuffType\"\317\001\n\017" - "MessageOfBullet\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\014\n\004guid\030\005 \001(\003\022\"\n\004tea" - "m\030\006 \001(\0162\024.protobuf.PlayerType\022\"\n\005place\030\007" - " \001(\0162\023.protobuf.PlaceType\022\022\n\nbomb_range\030" - "\010 \001(\001\"\223\001\n\025MessageOfBombedBullet\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\022\n\nm" - "apping_id\030\005 \001(\003\022\022\n\nbomb_range\030\006 \001(\001\"\264\001\n\r" - "MessageOfProp\022 \n\004type\030\001 \001(\0162\022.protobuf.P" - "ropType\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\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\023MessageOfPickedPro" - "p\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\"<\n\022MessageOfClas" - "sroom\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\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\rMessageOfDoor\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\"\367\001\n\017MessageOfMapObj\0229\n\021" - "classroom_message\030\001 \001(\0132\034.protobuf.Messa" - "geOfClassroomH\000\022/\n\014door_message\030\002 \001(\0132\027." - "protobuf.MessageOfDoorH\000\022/\n\014gate_message" - "\030\003 \001(\0132\027.protobuf.MessageOfGateH\000\0221\n\rche" - "st_message\030\004 \001(\0132\030.protobuf.MessageOfChe" - "stH\000B\024\n\022message_of_map_obj\"\224\001\n\014MessageOf" - "Map\022\'\n\003row\030\002 \003(\0132\032.protobuf.MessageOfMap" - ".Row\0222\n\017map_obj_message\030\003 \003(\0132\031.protobuf" - ".MessageOfMapObj\032\'\n\003Row\022 \n\003col\030\001 \003(\0162\023.p" - "rotobuf.PlaceType\"\266\002\n\014MessageOfObj\0225\n\017st" - "udent_message\030\001 \001(\0132\032.protobuf.MessageOf" - "StudentH\000\0225\n\017tricker_message\030\002 \001(\0132\032.pro" - "tobuf.MessageOfTrickerH\000\022/\n\014prop_message" - "\030\003 \001(\0132\027.protobuf.MessageOfPropH\000\0223\n\016bul" - "let_message\030\004 \001(\0132\031.protobuf.MessageOfBu" - "lletH\000\022@\n\025bombed_bullet_message\030\005 \001(\0132\037." - "protobuf.MessageOfBombedBulletH\000B\020\n\016mess" - "age_of_obj\"\350\001\n\014MessageOfAll\022\021\n\tgame_time" - "\030\001 \001(\005\022\024\n\014subject_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\013gate_opened\030\007 \001(\010\022\035\n\025hidden_gat" - "e_refreshed\030\010 \001(\010\022\032\n\022hidden_gate_opened\030" - "\t \001(\010\"\301\001\n\017MessageToClient\022+\n\013obj_message" - "\030\001 \003(\0132\026.protobuf.MessageOfObj\022+\n\013map_me" - "ssage\030\002 \001(\0132\026.protobuf.MessageOfMap\022\'\n\ng" - "ame_state\030\003 \001(\0162\023.protobuf.GameState\022+\n\013" - "all_message\030\004 \001(\0132\026.protobuf.MessageOfAl" - "l\"J\n\007MoveRes\022\024\n\014actual_speed\030\001 \001(\003\022\024\n\014ac" - "tual_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"; + "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" + "(\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" + "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" + "essageOfPropH\000\0223\n\016bullet_message\030\004 \001(\0132\031" + ".protobuf.MessageOfBulletH\000\022@\n\025bombed_bu" + "llet_message\030\005 \001(\0132\037.protobuf.MessageOfB" + "ombedBulletH\000\0229\n\021classroom_message\030\006 \001(\013" + "2\034.protobuf.MessageOfClassroomH\000\022/\n\014door" + "_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"; static const ::_pbi::DescriptorTable* const descriptor_table_Message2Clients_2eproto_deps[1] = { &::descriptor_table_MessageType_2eproto, }; @@ -809,13 +770,13 @@ static ::_pbi::once_flag descriptor_table_Message2Clients_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Message2Clients_2eproto = { false, false, - 3319, + 3143, descriptor_table_protodef_Message2Clients_2eproto, "Message2Clients.proto", &descriptor_table_Message2Clients_2eproto_once, descriptor_table_Message2Clients_2eproto_deps, 1, - 19, + 18, schemas, file_default_instances, TableStruct_Message2Clients_2eproto::offsets, @@ -852,7 +813,7 @@ namespace protobuf MessageOfStudent* const _this = this; (void)_this; new (&_impl_) Impl_{ - 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_.time_until_skill_available_){}, decltype(_impl_.fail_num_){}, decltype(_impl_.place_){}, decltype(_impl_.guid_){}, decltype(_impl_.player_state_){}, decltype(_impl_.state_){}, decltype(_impl_.fail_time_){}, decltype(_impl_.emo_time_){}, 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_.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_)*/ {}}; _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_)); @@ -866,7 +827,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - 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_.time_until_skill_available_){0}, decltype(_impl_.fail_num_){0}, decltype(_impl_.place_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.player_state_){0}, decltype(_impl_.state_){0}, decltype(_impl_.fail_time_){0}, decltype(_impl_.emo_time_){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_.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_)*/ {}}; } MessageOfStudent::~MessageOfStudent() @@ -883,6 +844,7 @@ namespace protobuf inline void MessageOfStudent::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.time_until_skill_available_.~RepeatedField(); _impl_.prop_.~RepeatedField(); _impl_.buff_.~RepeatedField(); } @@ -899,6 +861,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; + _impl_.time_until_skill_available_.Clear(); _impl_.prop_.Clear(); _impl_.buff_.Clear(); ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.student_type_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.student_type_)); @@ -956,21 +919,26 @@ namespace protobuf else goto handle_unusual; continue; - // int32 fail_num = 5; + // int32 addiction = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.fail_num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _impl_.addiction_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // double time_until_skill_available = 6; + // repeated double time_until_skill_available = 6; case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 49)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - _impl_.time_until_skill_available_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_time_until_skill_available(), ptr, ctx); + CHK_(ptr); + } + else if (static_cast(tag) == 49) + { + _internal_add_time_until_skill_available(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else @@ -1035,26 +1003,6 @@ namespace protobuf else goto handle_unusual; continue; - // double fail_time = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 97)) - { - _impl_.fail_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } - else - goto handle_unusual; - continue; - // double emo_time = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 113)) - { - _impl_.emo_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } - else - goto handle_unusual; - continue; // int64 player_id = 15; case 15: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) @@ -1224,22 +1172,17 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_determination(), target); } - // int32 fail_num = 5; - if (this->_internal_fail_num() != 0) + // int32 addiction = 5; + if (this->_internal_addiction() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_fail_num(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_addiction(), target); } - // double time_until_skill_available = 6; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time_until_skill_available = this->_internal_time_until_skill_available(); - uint64_t raw_time_until_skill_available; - memcpy(&raw_time_until_skill_available, &tmp_time_until_skill_available, sizeof(tmp_time_until_skill_available)); - if (raw_time_until_skill_available != 0) + // repeated double time_until_skill_available = 6; + if (this->_internal_time_until_skill_available_size() > 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_time_until_skill_available(), target); + target = stream->WriteFixedPacked(6, _internal_time_until_skill_available(), target); } // .protobuf.PlaceType place = 7; @@ -1287,28 +1230,6 @@ namespace protobuf ); } - // double fail_time = 12; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_fail_time = this->_internal_fail_time(); - uint64_t raw_fail_time; - memcpy(&raw_fail_time, &tmp_fail_time, sizeof(tmp_fail_time)); - if (raw_fail_time != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(12, this->_internal_fail_time(), target); - } - - // double emo_time = 14; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_emo_time = this->_internal_emo_time(); - uint64_t raw_emo_time; - memcpy(&raw_emo_time, &tmp_emo_time, sizeof(tmp_emo_time)); - if (raw_emo_time != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(14, this->_internal_emo_time(), target); - } - // int64 player_id = 15; if (this->_internal_player_id() != 0) { @@ -1408,6 +1329,18 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; + // repeated double time_until_skill_available = 6; + { + unsigned int count = static_cast(this->_internal_time_until_skill_available_size()); + size_t data_size = 8UL * count; + if (data_size > 0) + { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + total_size += data_size; + } + // repeated .protobuf.PropType prop = 8; { size_t data_size = 0; @@ -1472,20 +1405,10 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_determination()); } - // double time_until_skill_available = 6; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time_until_skill_available = this->_internal_time_until_skill_available(); - uint64_t raw_time_until_skill_available; - memcpy(&raw_time_until_skill_available, &tmp_time_until_skill_available, sizeof(tmp_time_until_skill_available)); - if (raw_time_until_skill_available != 0) - { - total_size += 1 + 8; - } - - // int32 fail_num = 5; - if (this->_internal_fail_num() != 0) + // int32 addiction = 5; + if (this->_internal_addiction() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_fail_num()); + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_addiction()); } // .protobuf.PlaceType place = 7; @@ -1515,26 +1438,6 @@ namespace protobuf ::_pbi::WireFormatLite::EnumSize(this->_internal_state()); } - // double fail_time = 12; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_fail_time = this->_internal_fail_time(); - uint64_t raw_fail_time; - memcpy(&raw_fail_time, &tmp_fail_time, sizeof(tmp_fail_time)); - if (raw_fail_time != 0) - { - total_size += 1 + 8; - } - - // double emo_time = 14; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_emo_time = this->_internal_emo_time(); - uint64_t raw_emo_time; - memcpy(&raw_emo_time, &tmp_emo_time, sizeof(tmp_emo_time)); - if (raw_emo_time != 0) - { - total_size += 1 + 8; - } - // int64 player_id = 15; if (this->_internal_player_id() != 0) { @@ -1632,6 +1535,7 @@ namespace protobuf uint32_t cached_has_bits = 0; (void)cached_has_bits; + _this->_impl_.time_until_skill_available_.MergeFrom(from._impl_.time_until_skill_available_); _this->_impl_.prop_.MergeFrom(from._impl_.prop_); _this->_impl_.buff_.MergeFrom(from._impl_.buff_); if (from._internal_x() != 0) @@ -1650,17 +1554,9 @@ namespace protobuf { _this->_internal_set_determination(from._internal_determination()); } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time_until_skill_available = from._internal_time_until_skill_available(); - uint64_t raw_time_until_skill_available; - memcpy(&raw_time_until_skill_available, &tmp_time_until_skill_available, sizeof(tmp_time_until_skill_available)); - if (raw_time_until_skill_available != 0) - { - _this->_internal_set_time_until_skill_available(from._internal_time_until_skill_available()); - } - if (from._internal_fail_num() != 0) + if (from._internal_addiction() != 0) { - _this->_internal_set_fail_num(from._internal_fail_num()); + _this->_internal_set_addiction(from._internal_addiction()); } if (from._internal_place() != 0) { @@ -1678,22 +1574,6 @@ namespace protobuf { _this->_internal_set_state(from._internal_state()); } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_fail_time = from._internal_fail_time(); - uint64_t raw_fail_time; - memcpy(&raw_fail_time, &tmp_fail_time, sizeof(tmp_fail_time)); - if (raw_fail_time != 0) - { - _this->_internal_set_fail_time(from._internal_fail_time()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_emo_time = from._internal_emo_time(); - uint64_t raw_emo_time; - memcpy(&raw_emo_time, &tmp_emo_time, sizeof(tmp_emo_time)); - if (raw_emo_time != 0) - { - _this->_internal_set_emo_time(from._internal_emo_time()); - } if (from._internal_player_id() != 0) { _this->_internal_set_player_id(from._internal_player_id()); @@ -1755,6 +1635,7 @@ namespace protobuf { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.time_until_skill_available_.InternalSwap(&other->_impl_.time_until_skill_available_); _impl_.prop_.InternalSwap(&other->_impl_.prop_); _impl_.buff_.InternalSwap(&other->_impl_.buff_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< @@ -1790,7 +1671,7 @@ namespace protobuf MessageOfTricker* const _this = this; (void)_this; new (&_impl_) Impl_{ - 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_.time_until_skill_available_){}, 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_.movable_){}, decltype(_impl_.view_range_){}, decltype(_impl_.radius_){}, decltype(_impl_.player_state_){}, decltype(_impl_.trick_desire_){}, decltype(_impl_.class_volume_){}, /*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_)); @@ -1804,7 +1685,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - 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_.time_until_skill_available_){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_.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_)*/ {}}; } MessageOfTricker::~MessageOfTricker() @@ -1821,6 +1702,7 @@ namespace protobuf inline void MessageOfTricker::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.time_until_skill_available_.~RepeatedField(); _impl_.prop_.~RepeatedField(); _impl_.buff_.~RepeatedField(); } @@ -1837,6 +1719,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; + _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_)); @@ -1894,11 +1777,16 @@ namespace protobuf else goto handle_unusual; continue; - // double time_until_skill_available = 5; + // repeated double time_until_skill_available = 5; case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 41)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) + { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_time_until_skill_available(), ptr, ctx); + CHK_(ptr); + } + else if (static_cast(tag) == 41) { - _impl_.time_until_skill_available_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_add_time_until_skill_available(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else @@ -2101,15 +1989,10 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_damage(), target); } - // double time_until_skill_available = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time_until_skill_available = this->_internal_time_until_skill_available(); - uint64_t raw_time_until_skill_available; - memcpy(&raw_time_until_skill_available, &tmp_time_until_skill_available, sizeof(tmp_time_until_skill_available)); - if (raw_time_until_skill_available != 0) + // repeated double time_until_skill_available = 5; + if (this->_internal_time_until_skill_available_size() > 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_time_until_skill_available(), target); + target = stream->WriteFixedPacked(5, _internal_time_until_skill_available(), target); } // .protobuf.PlaceType place = 6; @@ -2237,6 +2120,18 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; + // repeated double time_until_skill_available = 5; + { + unsigned int count = static_cast(this->_internal_time_until_skill_available_size()); + size_t data_size = 8UL * count; + if (data_size > 0) + { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + total_size += data_size; + } + // repeated .protobuf.PropType prop = 7; { size_t data_size = 0; @@ -2301,16 +2196,6 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_damage()); } - // double time_until_skill_available = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time_until_skill_available = this->_internal_time_until_skill_available(); - uint64_t raw_time_until_skill_available; - memcpy(&raw_time_until_skill_available, &tmp_time_until_skill_available, sizeof(tmp_time_until_skill_available)); - if (raw_time_until_skill_available != 0) - { - total_size += 1 + 8; - } - // .protobuf.PlaceType place = 6; if (this->_internal_place() != 0) { @@ -2402,6 +2287,7 @@ namespace protobuf uint32_t cached_has_bits = 0; (void)cached_has_bits; + _this->_impl_.time_until_skill_available_.MergeFrom(from._impl_.time_until_skill_available_); _this->_impl_.prop_.MergeFrom(from._impl_.prop_); _this->_impl_.buff_.MergeFrom(from._impl_.buff_); if (from._internal_x() != 0) @@ -2420,14 +2306,6 @@ namespace protobuf { _this->_internal_set_damage(from._internal_damage()); } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time_until_skill_available = from._internal_time_until_skill_available(); - uint64_t raw_time_until_skill_available; - memcpy(&raw_time_until_skill_available, &tmp_time_until_skill_available, sizeof(tmp_time_until_skill_available)); - if (raw_time_until_skill_available != 0) - { - _this->_internal_set_time_until_skill_available(from._internal_time_until_skill_available()); - } if (from._internal_place() != 0) { _this->_internal_set_place(from._internal_place()); @@ -2497,6 +2375,7 @@ namespace protobuf { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.time_until_skill_available_.InternalSwap(&other->_impl_.time_until_skill_available_); _impl_.prop_.InternalSwap(&other->_impl_.prop_); _impl_.buff_.InternalSwap(&other->_impl_.buff_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< @@ -5164,179 +5043,42 @@ namespace protobuf // =================================================================== - class MessageOfMapObj::_Internal + class MessageOfMap_Row::_Internal { public: - static const ::protobuf::MessageOfClassroom& classroom_message(const MessageOfMapObj* msg); - static const ::protobuf::MessageOfDoor& door_message(const MessageOfMapObj* msg); - static const ::protobuf::MessageOfGate& gate_message(const MessageOfMapObj* msg); - static const ::protobuf::MessageOfChest& chest_message(const MessageOfMapObj* msg); }; - const ::protobuf::MessageOfClassroom& - MessageOfMapObj::_Internal::classroom_message(const MessageOfMapObj* msg) - { - return *msg->_impl_.message_of_map_obj_.classroom_message_; - } - const ::protobuf::MessageOfDoor& - MessageOfMapObj::_Internal::door_message(const MessageOfMapObj* msg) - { - return *msg->_impl_.message_of_map_obj_.door_message_; - } - const ::protobuf::MessageOfGate& - MessageOfMapObj::_Internal::gate_message(const MessageOfMapObj* msg) - { - return *msg->_impl_.message_of_map_obj_.gate_message_; - } - const ::protobuf::MessageOfChest& - MessageOfMapObj::_Internal::chest_message(const MessageOfMapObj* msg) - { - return *msg->_impl_.message_of_map_obj_.chest_message_; - } - void MessageOfMapObj::set_allocated_classroom_message(::protobuf::MessageOfClassroom* classroom_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - clear_message_of_map_obj(); - if (classroom_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(classroom_message); - if (message_arena != submessage_arena) - { - classroom_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, classroom_message, submessage_arena - ); - } - set_has_classroom_message(); - _impl_.message_of_map_obj_.classroom_message_ = classroom_message; - } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfMapObj.classroom_message) - } - void MessageOfMapObj::set_allocated_door_message(::protobuf::MessageOfDoor* door_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - clear_message_of_map_obj(); - if (door_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(door_message); - if (message_arena != submessage_arena) - { - door_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, door_message, submessage_arena - ); - } - set_has_door_message(); - _impl_.message_of_map_obj_.door_message_ = door_message; - } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfMapObj.door_message) - } - void MessageOfMapObj::set_allocated_gate_message(::protobuf::MessageOfGate* gate_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - clear_message_of_map_obj(); - if (gate_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(gate_message); - if (message_arena != submessage_arena) - { - gate_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, gate_message, submessage_arena - ); - } - set_has_gate_message(); - _impl_.message_of_map_obj_.gate_message_ = gate_message; - } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfMapObj.gate_message) - } - void MessageOfMapObj::set_allocated_chest_message(::protobuf::MessageOfChest* chest_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - clear_message_of_map_obj(); - if (chest_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(chest_message); - if (message_arena != submessage_arena) - { - chest_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, chest_message, submessage_arena - ); - } - set_has_chest_message(); - _impl_.message_of_map_obj_.chest_message_ = chest_message; - } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfMapObj.chest_message) - } - MessageOfMapObj::MessageOfMapObj(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + 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.MessageOfMapObj) + // @@protoc_insertion_point(arena_constructor:protobuf.MessageOfMap.Row) } - MessageOfMapObj::MessageOfMapObj(const MessageOfMapObj& from) : + MessageOfMap_Row::MessageOfMap_Row(const MessageOfMap_Row& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - MessageOfMapObj* const _this = this; + MessageOfMap_Row* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.message_of_map_obj_){}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}}; + 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_); - clear_has_message_of_map_obj(); - switch (from.message_of_map_obj_case()) - { - case kClassroomMessage: - { - _this->_internal_mutable_classroom_message()->::protobuf::MessageOfClassroom::MergeFrom( - from._internal_classroom_message() - ); - break; - } - case kDoorMessage: - { - _this->_internal_mutable_door_message()->::protobuf::MessageOfDoor::MergeFrom( - from._internal_door_message() - ); - break; - } - case kGateMessage: - { - _this->_internal_mutable_gate_message()->::protobuf::MessageOfGate::MergeFrom( - from._internal_gate_message() - ); - break; - } - case kChestMessage: - { - _this->_internal_mutable_chest_message()->::protobuf::MessageOfChest::MergeFrom( - from._internal_chest_message() - ); - break; - } - case MESSAGE_OF_MAP_OBJ_NOT_SET: - { - break; - } - } - // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfMapObj) + // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfMap.Row) } - inline void MessageOfMapObj::SharedCtor( + inline void MessageOfMap_Row::SharedCtor( ::_pb::Arena* arena, bool is_message_owned ) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.message_of_map_obj_){}, /*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._oneof_case_)*/ {}}; - clear_has_message_of_map_obj(); + decltype(_impl_.col_){arena}, /*decltype(_impl_._col_cached_byte_size_)*/ {0}, /*decltype(_impl_._cached_size_)*/ {}}; } - MessageOfMapObj::~MessageOfMapObj() + MessageOfMap_Row::~MessageOfMap_Row() { - // @@protoc_insertion_point(destructor:protobuf.MessageOfMapObj) + // @@protoc_insertion_point(destructor:protobuf.MessageOfMap.Row) if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; @@ -5345,412 +5087,34 @@ namespace protobuf SharedDtor(); } - inline void MessageOfMapObj::SharedDtor() + inline void MessageOfMap_Row::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (has_message_of_map_obj()) - { - clear_message_of_map_obj(); - } + _impl_.col_.~RepeatedField(); } - void MessageOfMapObj::SetCachedSize(int size) const + void MessageOfMap_Row::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } - void MessageOfMapObj::clear_message_of_map_obj() + 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) { - // @@protoc_insertion_point(one_of_clear_start:protobuf.MessageOfMapObj) - switch (message_of_map_obj_case()) - { - case kClassroomMessage: - { - if (GetArenaForAllocation() == nullptr) - { - delete _impl_.message_of_map_obj_.classroom_message_; - } - break; - } - case kDoorMessage: - { - if (GetArenaForAllocation() == nullptr) - { - delete _impl_.message_of_map_obj_.door_message_; - } - break; - } - case kGateMessage: - { - if (GetArenaForAllocation() == nullptr) - { - delete _impl_.message_of_map_obj_.gate_message_; - } - break; - } - case kChestMessage: - { - if (GetArenaForAllocation() == nullptr) - { - delete _impl_.message_of_map_obj_.chest_message_; - } - break; - } - case MESSAGE_OF_MAP_OBJ_NOT_SET: - { - break; - } - } - _impl_._oneof_case_[0] = MESSAGE_OF_MAP_OBJ_NOT_SET; - } - - void MessageOfMapObj::Clear() - { - // @@protoc_insertion_point(message_clear_start:protobuf.MessageOfMapObj) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - clear_message_of_map_obj(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); - } - - const char* MessageOfMapObj::_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) - { - // .protobuf.MessageOfClassroom classroom_message = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) - { - ptr = ctx->ParseMessage(_internal_mutable_classroom_message(), ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; - // .protobuf.MessageOfDoor door_message = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) - { - ptr = ctx->ParseMessage(_internal_mutable_door_message(), ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; - // .protobuf.MessageOfGate gate_message = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) - { - ptr = ctx->ParseMessage(_internal_mutable_gate_message(), ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; - // .protobuf.MessageOfChest chest_message = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) - { - ptr = ctx->ParseMessage(_internal_mutable_chest_message(), ptr); - CHK_(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* MessageOfMapObj::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream - ) const - { - // @@protoc_insertion_point(serialize_to_array_start:protobuf.MessageOfMapObj) - uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .protobuf.MessageOfClassroom classroom_message = 1; - if (_internal_has_classroom_message()) - { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::classroom_message(this), _Internal::classroom_message(this).GetCachedSize(), target, stream); - } - - // .protobuf.MessageOfDoor door_message = 2; - if (_internal_has_door_message()) - { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::door_message(this), _Internal::door_message(this).GetCachedSize(), target, stream); - } - - // .protobuf.MessageOfGate gate_message = 3; - if (_internal_has_gate_message()) - { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::gate_message(this), _Internal::gate_message(this).GetCachedSize(), target, stream); - } - - // .protobuf.MessageOfChest chest_message = 4; - if (_internal_has_chest_message()) - { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::chest_message(this), _Internal::chest_message(this).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.MessageOfMapObj) - return target; - } - - size_t MessageOfMapObj::ByteSizeLong() const - { - // @@protoc_insertion_point(message_byte_size_start:protobuf.MessageOfMapObj) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - switch (message_of_map_obj_case()) - { - // .protobuf.MessageOfClassroom classroom_message = 1; - case kClassroomMessage: - { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.message_of_map_obj_.classroom_message_ - ); - break; - } - // .protobuf.MessageOfDoor door_message = 2; - case kDoorMessage: - { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.message_of_map_obj_.door_message_ - ); - break; - } - // .protobuf.MessageOfGate gate_message = 3; - case kGateMessage: - { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.message_of_map_obj_.gate_message_ - ); - break; - } - // .protobuf.MessageOfChest chest_message = 4; - case kChestMessage: - { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.message_of_map_obj_.chest_message_ - ); - break; - } - case MESSAGE_OF_MAP_OBJ_NOT_SET: - { - break; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); - } - - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOfMapObj::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - MessageOfMapObj::MergeImpl}; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MessageOfMapObj::GetClassData() const - { - return &_class_data_; - } - - void MessageOfMapObj::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.MessageOfMapObj) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - switch (from.message_of_map_obj_case()) - { - case kClassroomMessage: - { - _this->_internal_mutable_classroom_message()->::protobuf::MessageOfClassroom::MergeFrom( - from._internal_classroom_message() - ); - break; - } - case kDoorMessage: - { - _this->_internal_mutable_door_message()->::protobuf::MessageOfDoor::MergeFrom( - from._internal_door_message() - ); - break; - } - case kGateMessage: - { - _this->_internal_mutable_gate_message()->::protobuf::MessageOfGate::MergeFrom( - from._internal_gate_message() - ); - break; - } - case kChestMessage: - { - _this->_internal_mutable_chest_message()->::protobuf::MessageOfChest::MergeFrom( - from._internal_chest_message() - ); - break; - } - case MESSAGE_OF_MAP_OBJ_NOT_SET: - { - break; - } - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - } - - void MessageOfMapObj::CopyFrom(const MessageOfMapObj& from) - { - // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MessageOfMapObj) - if (&from == this) - return; - Clear(); - MergeFrom(from); - } - - bool MessageOfMapObj::IsInitialized() const - { - return true; - } - - void MessageOfMapObj::InternalSwap(MessageOfMapObj* other) - { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.message_of_map_obj_, other->_impl_.message_of_map_obj_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); - } - - ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfMapObj::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)) +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) \ + goto failure + while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); @@ -5904,7 +5268,7 @@ namespace protobuf ::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] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[10] ); } @@ -5927,7 +5291,7 @@ namespace protobuf MessageOfMap* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.row_){from._impl_.row_}, decltype(_impl_.map_obj_message_){from._impl_.map_obj_message_}, /*decltype(_impl_._cached_size_)*/ {}}; + 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) @@ -5940,7 +5304,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.row_){arena}, decltype(_impl_.map_obj_message_){arena}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.row_){arena}, /*decltype(_impl_._cached_size_)*/ {}}; } MessageOfMap::~MessageOfMap() @@ -5958,7 +5322,6 @@ namespace protobuf { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.row_.~RepeatedPtrField(); - _impl_.map_obj_message_.~RepeatedPtrField(); } void MessageOfMap::SetCachedSize(int size) const @@ -5974,7 +5337,6 @@ namespace protobuf (void)cached_has_bits; _impl_.row_.Clear(); - _impl_.map_obj_message_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -6006,23 +5368,6 @@ namespace protobuf else goto handle_unusual; continue; - // repeated .protobuf.MessageOfMapObj map_obj_message = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) - { - ptr -= 1; - do - { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_map_obj_message(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) - break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } - else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -6068,17 +5413,6 @@ namespace protobuf InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); } - // repeated .protobuf.MessageOfMapObj map_obj_message = 3; - for (unsigned i = 0, - n = static_cast(this->_internal_map_obj_message_size()); - i < n; - i++) - { - const auto& repfield = this->_internal_map_obj_message(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -6106,14 +5440,6 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // repeated .protobuf.MessageOfMapObj map_obj_message = 3; - total_size += 1UL * this->_internal_map_obj_message_size(); - for (const auto& msg : this->_impl_.map_obj_message_) - { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -6135,7 +5461,6 @@ namespace protobuf (void)cached_has_bits; _this->_impl_.row_.MergeFrom(from._impl_.row_); - _this->_impl_.map_obj_message_.MergeFrom(from._impl_.map_obj_message_); _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -6158,13 +5483,12 @@ namespace protobuf using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.row_.InternalSwap(&other->_impl_.row_); - _impl_.map_obj_message_.InternalSwap(&other->_impl_.map_obj_message_); } ::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[12] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[11] ); } @@ -6178,6 +5502,10 @@ namespace protobuf static const ::protobuf::MessageOfProp& prop_message(const MessageOfObj* msg); static const ::protobuf::MessageOfBullet& bullet_message(const MessageOfObj* msg); static const ::protobuf::MessageOfBombedBullet& bombed_bullet_message(const MessageOfObj* msg); + static const ::protobuf::MessageOfClassroom& classroom_message(const MessageOfObj* msg); + 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); }; const ::protobuf::MessageOfStudent& @@ -6205,6 +5533,26 @@ namespace protobuf { return *msg->_impl_.message_of_obj_.bombed_bullet_message_; } + const ::protobuf::MessageOfClassroom& + MessageOfObj::_Internal::classroom_message(const MessageOfObj* msg) + { + return *msg->_impl_.message_of_obj_.classroom_message_; + } + const ::protobuf::MessageOfDoor& + MessageOfObj::_Internal::door_message(const MessageOfObj* msg) + { + return *msg->_impl_.message_of_obj_.door_message_; + } + const ::protobuf::MessageOfGate& + MessageOfObj::_Internal::gate_message(const MessageOfObj* msg) + { + return *msg->_impl_.message_of_obj_.gate_message_; + } + const ::protobuf::MessageOfChest& + MessageOfObj::_Internal::chest_message(const MessageOfObj* msg) + { + return *msg->_impl_.message_of_obj_.chest_message_; + } void MessageOfObj::set_allocated_student_message(::protobuf::MessageOfStudent* student_message) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); @@ -6241,64 +5589,140 @@ namespace protobuf set_has_tricker_message(); _impl_.message_of_obj_.tricker_message_ = tricker_message; } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.tricker_message) + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.tricker_message) + } + void MessageOfObj::set_allocated_prop_message(::protobuf::MessageOfProp* prop_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_message_of_obj(); + if (prop_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(prop_message); + if (message_arena != submessage_arena) + { + prop_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, prop_message, submessage_arena + ); + } + set_has_prop_message(); + _impl_.message_of_obj_.prop_message_ = prop_message; + } + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.prop_message) + } + void MessageOfObj::set_allocated_bullet_message(::protobuf::MessageOfBullet* bullet_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_message_of_obj(); + if (bullet_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bullet_message); + if (message_arena != submessage_arena) + { + bullet_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, bullet_message, submessage_arena + ); + } + set_has_bullet_message(); + _impl_.message_of_obj_.bullet_message_ = bullet_message; + } + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.bullet_message) + } + void MessageOfObj::set_allocated_bombed_bullet_message(::protobuf::MessageOfBombedBullet* bombed_bullet_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_message_of_obj(); + if (bombed_bullet_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bombed_bullet_message); + if (message_arena != submessage_arena) + { + bombed_bullet_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, bombed_bullet_message, submessage_arena + ); + } + set_has_bombed_bullet_message(); + _impl_.message_of_obj_.bombed_bullet_message_ = bombed_bullet_message; + } + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.bombed_bullet_message) + } + void MessageOfObj::set_allocated_classroom_message(::protobuf::MessageOfClassroom* classroom_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_message_of_obj(); + if (classroom_message) + { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(classroom_message); + if (message_arena != submessage_arena) + { + classroom_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, classroom_message, submessage_arena + ); + } + set_has_classroom_message(); + _impl_.message_of_obj_.classroom_message_ = classroom_message; + } + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.classroom_message) } - void MessageOfObj::set_allocated_prop_message(::protobuf::MessageOfProp* prop_message) + void MessageOfObj::set_allocated_door_message(::protobuf::MessageOfDoor* door_message) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_message_of_obj(); - if (prop_message) + if (door_message) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(prop_message); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(door_message); if (message_arena != submessage_arena) { - prop_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, prop_message, submessage_arena + door_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, door_message, submessage_arena ); } - set_has_prop_message(); - _impl_.message_of_obj_.prop_message_ = prop_message; + set_has_door_message(); + _impl_.message_of_obj_.door_message_ = door_message; } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.prop_message) + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.door_message) } - void MessageOfObj::set_allocated_bullet_message(::protobuf::MessageOfBullet* bullet_message) + void MessageOfObj::set_allocated_gate_message(::protobuf::MessageOfGate* gate_message) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_message_of_obj(); - if (bullet_message) + if (gate_message) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bullet_message); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(gate_message); if (message_arena != submessage_arena) { - bullet_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, bullet_message, submessage_arena + gate_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, gate_message, submessage_arena ); } - set_has_bullet_message(); - _impl_.message_of_obj_.bullet_message_ = bullet_message; + set_has_gate_message(); + _impl_.message_of_obj_.gate_message_ = gate_message; } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.bullet_message) + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.gate_message) } - void MessageOfObj::set_allocated_bombed_bullet_message(::protobuf::MessageOfBombedBullet* bombed_bullet_message) + void MessageOfObj::set_allocated_chest_message(::protobuf::MessageOfChest* chest_message) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_message_of_obj(); - if (bombed_bullet_message) + if (chest_message) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bombed_bullet_message); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(chest_message); if (message_arena != submessage_arena) { - bombed_bullet_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, bombed_bullet_message, submessage_arena + chest_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, chest_message, submessage_arena ); } - set_has_bombed_bullet_message(); - _impl_.message_of_obj_.bombed_bullet_message_ = bombed_bullet_message; + set_has_chest_message(); + _impl_.message_of_obj_.chest_message_ = chest_message; } - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.bombed_bullet_message) + // @@protoc_insertion_point(field_set_allocated:protobuf.MessageOfObj.chest_message) } MessageOfObj::MessageOfObj(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) @@ -6353,6 +5777,34 @@ namespace protobuf ); break; } + case kClassroomMessage: + { + _this->_internal_mutable_classroom_message()->::protobuf::MessageOfClassroom::MergeFrom( + from._internal_classroom_message() + ); + break; + } + case kDoorMessage: + { + _this->_internal_mutable_door_message()->::protobuf::MessageOfDoor::MergeFrom( + from._internal_door_message() + ); + break; + } + case kGateMessage: + { + _this->_internal_mutable_gate_message()->::protobuf::MessageOfGate::MergeFrom( + from._internal_gate_message() + ); + break; + } + case kChestMessage: + { + _this->_internal_mutable_chest_message()->::protobuf::MessageOfChest::MergeFrom( + from._internal_chest_message() + ); + break; + } case MESSAGE_OF_OBJ_NOT_SET: { break; @@ -6442,6 +5894,38 @@ namespace protobuf } break; } + case kClassroomMessage: + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.classroom_message_; + } + break; + } + case kDoorMessage: + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.door_message_; + } + break; + } + case kGateMessage: + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.gate_message_; + } + break; + } + case kChestMessage: + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.chest_message_; + } + break; + } case MESSAGE_OF_OBJ_NOT_SET: { break; @@ -6522,6 +6006,46 @@ namespace protobuf else goto handle_unusual; continue; + // .protobuf.MessageOfClassroom classroom_message = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) + { + ptr = ctx->ParseMessage(_internal_mutable_classroom_message(), ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // .protobuf.MessageOfDoor door_message = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) + { + ptr = ctx->ParseMessage(_internal_mutable_door_message(), ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // .protobuf.MessageOfGate gate_message = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) + { + ptr = ctx->ParseMessage(_internal_mutable_gate_message(), ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // .protobuf.MessageOfChest chest_message = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) + { + ptr = ctx->ParseMessage(_internal_mutable_chest_message(), ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -6591,6 +6115,34 @@ namespace protobuf InternalWriteMessage(5, _Internal::bombed_bullet_message(this), _Internal::bombed_bullet_message(this).GetCachedSize(), target, stream); } + // .protobuf.MessageOfClassroom classroom_message = 6; + if (_internal_has_classroom_message()) + { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::classroom_message(this), _Internal::classroom_message(this).GetCachedSize(), target, stream); + } + + // .protobuf.MessageOfDoor door_message = 7; + if (_internal_has_door_message()) + { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(7, _Internal::door_message(this), _Internal::door_message(this).GetCachedSize(), target, stream); + } + + // .protobuf.MessageOfGate gate_message = 8; + if (_internal_has_gate_message()) + { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(8, _Internal::gate_message(this), _Internal::gate_message(this).GetCachedSize(), target, stream); + } + + // .protobuf.MessageOfChest chest_message = 9; + if (_internal_has_chest_message()) + { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, _Internal::chest_message(this), _Internal::chest_message(this).GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -6657,6 +6209,42 @@ namespace protobuf ); break; } + // .protobuf.MessageOfClassroom classroom_message = 6; + case kClassroomMessage: + { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.message_of_obj_.classroom_message_ + ); + break; + } + // .protobuf.MessageOfDoor door_message = 7; + case kDoorMessage: + { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_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; + } case MESSAGE_OF_OBJ_NOT_SET: { break; @@ -6719,6 +6307,34 @@ namespace protobuf ); break; } + case kClassroomMessage: + { + _this->_internal_mutable_classroom_message()->::protobuf::MessageOfClassroom::MergeFrom( + from._internal_classroom_message() + ); + break; + } + case kDoorMessage: + { + _this->_internal_mutable_door_message()->::protobuf::MessageOfDoor::MergeFrom( + from._internal_door_message() + ); + break; + } + case kGateMessage: + { + _this->_internal_mutable_gate_message()->::protobuf::MessageOfGate::MergeFrom( + from._internal_gate_message() + ); + break; + } + case kChestMessage: + { + _this->_internal_mutable_chest_message()->::protobuf::MessageOfChest::MergeFrom( + from._internal_chest_message() + ); + break; + } case MESSAGE_OF_OBJ_NOT_SET: { break; @@ -6752,7 +6368,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[13] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[12] ); } @@ -7182,7 +6798,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[14] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[13] ); } @@ -7191,15 +6807,9 @@ namespace protobuf class MessageToClient::_Internal { public: - static const ::protobuf::MessageOfMap& map_message(const MessageToClient* msg); static const ::protobuf::MessageOfAll& all_message(const MessageToClient* msg); }; - const ::protobuf::MessageOfMap& - MessageToClient::_Internal::map_message(const MessageToClient* msg) - { - return *msg->_impl_.map_message_; - } const ::protobuf::MessageOfAll& MessageToClient::_Internal::all_message(const MessageToClient* msg) { @@ -7217,13 +6827,9 @@ namespace protobuf MessageToClient* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.obj_message_){from._impl_.obj_message_}, decltype(_impl_.map_message_){nullptr}, decltype(_impl_.all_message_){nullptr}, decltype(_impl_.game_state_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.obj_message_){from._impl_.obj_message_}, decltype(_impl_.all_message_){nullptr}, decltype(_impl_.game_state_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_map_message()) - { - _this->_impl_.map_message_ = new ::protobuf::MessageOfMap(*from._impl_.map_message_); - } if (from._internal_has_all_message()) { _this->_impl_.all_message_ = new ::protobuf::MessageOfAll(*from._impl_.all_message_); @@ -7239,7 +6845,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.obj_message_){arena}, decltype(_impl_.map_message_){nullptr}, decltype(_impl_.all_message_){nullptr}, decltype(_impl_.game_state_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.obj_message_){arena}, decltype(_impl_.all_message_){nullptr}, decltype(_impl_.game_state_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } MessageToClient::~MessageToClient() @@ -7257,8 +6863,6 @@ namespace protobuf { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.obj_message_.~RepeatedPtrField(); - if (this != internal_default_instance()) - delete _impl_.map_message_; if (this != internal_default_instance()) delete _impl_.all_message_; } @@ -7276,11 +6880,6 @@ namespace protobuf (void)cached_has_bits; _impl_.obj_message_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.map_message_ != nullptr) - { - delete _impl_.map_message_; - } - _impl_.map_message_ = nullptr; if (GetArenaForAllocation() == nullptr && _impl_.all_message_ != nullptr) { delete _impl_.all_message_; @@ -7318,19 +6917,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.MessageOfMap map_message = 2; + // .protobuf.GameState game_state = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) - { - ptr = ctx->ParseMessage(_internal_mutable_map_message(), ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; - // .protobuf.GameState game_state = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); @@ -7339,9 +6928,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.MessageOfAll all_message = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) + // .protobuf.MessageOfAll all_message = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_all_message(), ptr); CHK_(ptr); @@ -7394,27 +6983,20 @@ namespace protobuf InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); } - // .protobuf.MessageOfMap map_message = 2; - if (this->_internal_has_map_message()) - { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::map_message(this), _Internal::map_message(this).GetCachedSize(), target, stream); - } - - // .protobuf.GameState game_state = 3; + // .protobuf.GameState game_state = 2; if (this->_internal_game_state() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_game_state(), target + 2, this->_internal_game_state(), target ); } - // .protobuf.MessageOfAll all_message = 4; + // .protobuf.MessageOfAll all_message = 3; if (this->_internal_has_all_message()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::all_message(this), _Internal::all_message(this).GetCachedSize(), target, stream); + InternalWriteMessage(3, _Internal::all_message(this), _Internal::all_message(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -7444,16 +7026,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // .protobuf.MessageOfMap map_message = 2; - if (this->_internal_has_map_message()) - { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.map_message_ - ); - } - - // .protobuf.MessageOfAll all_message = 4; + // .protobuf.MessageOfAll all_message = 3; if (this->_internal_has_all_message()) { total_size += 1 + @@ -7462,7 +7035,7 @@ namespace protobuf ); } - // .protobuf.GameState game_state = 3; + // .protobuf.GameState game_state = 2; if (this->_internal_game_state() != 0) { total_size += 1 + @@ -7490,12 +7063,6 @@ namespace protobuf (void)cached_has_bits; _this->_impl_.obj_message_.MergeFrom(from._impl_.obj_message_); - if (from._internal_has_map_message()) - { - _this->_internal_mutable_map_message()->::protobuf::MessageOfMap::MergeFrom( - from._internal_map_message() - ); - } if (from._internal_has_all_message()) { _this->_internal_mutable_all_message()->::protobuf::MessageOfAll::MergeFrom( @@ -7529,16 +7096,16 @@ namespace protobuf _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.obj_message_.InternalSwap(&other->_impl_.obj_message_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MessageToClient, _impl_.game_state_) + sizeof(MessageToClient::_impl_.game_state_) - PROTOBUF_FIELD_OFFSET(MessageToClient, _impl_.map_message_)>( - reinterpret_cast(&_impl_.map_message_), - reinterpret_cast(&other->_impl_.map_message_) + PROTOBUF_FIELD_OFFSET(MessageToClient, _impl_.game_state_) + sizeof(MessageToClient::_impl_.game_state_) - PROTOBUF_FIELD_OFFSET(MessageToClient, _impl_.all_message_)>( + reinterpret_cast(&_impl_.all_message_), + reinterpret_cast(&other->_impl_.all_message_) ); } ::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[15] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[14] ); } @@ -7818,7 +7385,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[16] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[15] ); } @@ -8028,7 +7595,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[17] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[16] ); } @@ -8324,7 +7891,7 @@ namespace protobuf ::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[18] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[17] ); } @@ -8392,12 +7959,6 @@ PROTOBUF_NOINLINE ::protobuf::MessageOfChest* return Arena::CreateMessageInternal<::protobuf::MessageOfChest>(arena); } template<> -PROTOBUF_NOINLINE ::protobuf::MessageOfMapObj* - Arena::CreateMaybeMessage<::protobuf::MessageOfMapObj>(Arena* arena) -{ - return Arena::CreateMessageInternal<::protobuf::MessageOfMapObj>(arena); -} -template<> PROTOBUF_NOINLINE ::protobuf::MessageOfMap_Row* Arena::CreateMaybeMessage<::protobuf::MessageOfMap_Row>(Arena* arena) { diff --git a/CAPI/cpp/proto/Message2Clients.pb.h b/CAPI/cpp/proto/Message2Clients.pb.h index bd4288f..8975459 100644 --- a/CAPI/cpp/proto/Message2Clients.pb.h +++ b/CAPI/cpp/proto/Message2Clients.pb.h @@ -76,9 +76,6 @@ namespace protobuf class MessageOfMap; struct MessageOfMapDefaultTypeInternal; extern MessageOfMapDefaultTypeInternal _MessageOfMap_default_instance_; - class MessageOfMapObj; - struct MessageOfMapObjDefaultTypeInternal; - extern MessageOfMapObjDefaultTypeInternal _MessageOfMapObj_default_instance_; class MessageOfMap_Row; struct MessageOfMap_RowDefaultTypeInternal; extern MessageOfMap_RowDefaultTypeInternal _MessageOfMap_Row_default_instance_; @@ -127,8 +124,6 @@ template<> template<> ::protobuf::MessageOfMap* Arena::CreateMaybeMessage<::protobuf::MessageOfMap>(Arena*); template<> -::protobuf::MessageOfMapObj* Arena::CreateMaybeMessage<::protobuf::MessageOfMapObj>(Arena*); -template<> ::protobuf::MessageOfMap_Row* Arena::CreateMaybeMessage<::protobuf::MessageOfMap_Row>(Arena*); template<> ::protobuf::MessageOfObj* Arena::CreateMaybeMessage<::protobuf::MessageOfObj>(Arena*); @@ -310,20 +305,18 @@ namespace protobuf enum : int { + kTimeUntilSkillAvailableFieldNumber = 6, kPropFieldNumber = 8, kBuffFieldNumber = 24, kXFieldNumber = 1, kYFieldNumber = 2, kSpeedFieldNumber = 3, kDeterminationFieldNumber = 4, - kTimeUntilSkillAvailableFieldNumber = 6, - kFailNumFieldNumber = 5, + kAddictionFieldNumber = 5, kPlaceFieldNumber = 7, kGuidFieldNumber = 10, kPlayerStateFieldNumber = 9, kStateFieldNumber = 11, - kFailTimeFieldNumber = 12, - kEmoTimeFieldNumber = 14, kPlayerIdFieldNumber = 15, kViewRangeFieldNumber = 16, kRadiusFieldNumber = 17, @@ -334,6 +327,32 @@ namespace protobuf kRescueProgressFieldNumber = 22, kStudentTypeFieldNumber = 23, }; + // repeated double time_until_skill_available = 6; + int time_until_skill_available_size() const; + + private: + int _internal_time_until_skill_available_size() const; + + public: + void clear_time_until_skill_available(); + + private: + double _internal_time_until_skill_available(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + _internal_time_until_skill_available() const; + void _internal_add_time_until_skill_available(double value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* + _internal_mutable_time_until_skill_available(); + + public: + double time_until_skill_available(int index) const; + void set_time_until_skill_available(int index, double value); + void add_time_until_skill_available(double value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + time_until_skill_available() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* + mutable_time_until_skill_available(); + // repeated .protobuf.PropType prop = 8; int prop_size() const; @@ -416,24 +435,14 @@ namespace protobuf void _internal_set_determination(int32_t value); public: - // double time_until_skill_available = 6; - void clear_time_until_skill_available(); - double time_until_skill_available() const; - void set_time_until_skill_available(double value); - - private: - double _internal_time_until_skill_available() const; - void _internal_set_time_until_skill_available(double value); - - public: - // int32 fail_num = 5; - void clear_fail_num(); - int32_t fail_num() const; - void set_fail_num(int32_t value); + // int32 addiction = 5; + void clear_addiction(); + int32_t addiction() const; + void set_addiction(int32_t value); private: - int32_t _internal_fail_num() const; - void _internal_set_fail_num(int32_t value); + int32_t _internal_addiction() const; + void _internal_set_addiction(int32_t value); public: // .protobuf.PlaceType place = 7; @@ -475,26 +484,6 @@ namespace protobuf ::protobuf::PlayerState _internal_state() const; void _internal_set_state(::protobuf::PlayerState value); - public: - // double fail_time = 12; - void clear_fail_time(); - double fail_time() const; - void set_fail_time(double value); - - private: - double _internal_fail_time() const; - void _internal_set_fail_time(double value); - - public: - // double emo_time = 14; - void clear_emo_time(); - double emo_time() const; - void set_emo_time(double value); - - private: - double _internal_emo_time() const; - void _internal_set_emo_time(double value); - public: // int64 player_id = 15; void clear_player_id(); @@ -597,6 +586,7 @@ namespace protobuf typedef void DestructorSkippable_; struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField time_until_skill_available_; ::PROTOBUF_NAMESPACE_ID::RepeatedField prop_; mutable std::atomic _prop_cached_byte_size_; ::PROTOBUF_NAMESPACE_ID::RepeatedField buff_; @@ -605,14 +595,11 @@ namespace protobuf int32_t y_; int32_t speed_; int32_t determination_; - double time_until_skill_available_; - int32_t fail_num_; + int32_t addiction_; int place_; int64_t guid_; int player_state_; int state_; - double fail_time_; - double emo_time_; int64_t player_id_; int32_t view_range_; int32_t radius_; @@ -790,13 +777,13 @@ namespace protobuf enum : int { + kTimeUntilSkillAvailableFieldNumber = 5, kPropFieldNumber = 7, kBuffFieldNumber = 17, kXFieldNumber = 1, kYFieldNumber = 2, kSpeedFieldNumber = 3, kDamageFieldNumber = 4, - kTimeUntilSkillAvailableFieldNumber = 5, kPlaceFieldNumber = 6, kTrickerTypeFieldNumber = 8, kGuidFieldNumber = 9, @@ -808,6 +795,32 @@ namespace protobuf kTrickDesireFieldNumber = 15, kClassVolumeFieldNumber = 16, }; + // repeated double time_until_skill_available = 5; + int time_until_skill_available_size() const; + + private: + int _internal_time_until_skill_available_size() const; + + public: + void clear_time_until_skill_available(); + + private: + double _internal_time_until_skill_available(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + _internal_time_until_skill_available() const; + void _internal_add_time_until_skill_available(double value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* + _internal_mutable_time_until_skill_available(); + + public: + double time_until_skill_available(int index) const; + void set_time_until_skill_available(int index, double value); + void add_time_until_skill_available(double value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + time_until_skill_available() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* + mutable_time_until_skill_available(); + // repeated .protobuf.PropType prop = 7; int prop_size() const; @@ -889,16 +902,6 @@ namespace protobuf int32_t _internal_damage() const; void _internal_set_damage(int32_t value); - public: - // double time_until_skill_available = 5; - void clear_time_until_skill_available(); - double time_until_skill_available() const; - void set_time_until_skill_available(double value); - - private: - double _internal_time_until_skill_available() const; - void _internal_set_time_until_skill_available(double value); - public: // .protobuf.PlaceType place = 6; void clear_place(); @@ -1011,6 +1014,7 @@ namespace protobuf typedef void DestructorSkippable_; struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField time_until_skill_available_; ::PROTOBUF_NAMESPACE_ID::RepeatedField prop_; mutable std::atomic _prop_cached_byte_size_; ::PROTOBUF_NAMESPACE_ID::RepeatedField buff_; @@ -1019,7 +1023,6 @@ namespace protobuf int32_t y_; int32_t speed_; int32_t damage_; - double time_until_skill_available_; int place_; int tricker_type_; int64_t guid_; @@ -2948,31 +2951,31 @@ namespace protobuf }; // ------------------------------------------------------------------- - class MessageOfMapObj final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMapObj) */ + class MessageOfMap_Row final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMap.Row) */ { public: - inline MessageOfMapObj() : - MessageOfMapObj(nullptr) + inline MessageOfMap_Row() : + MessageOfMap_Row(nullptr) { } - ~MessageOfMapObj() override; - explicit PROTOBUF_CONSTEXPR MessageOfMapObj(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + ~MessageOfMap_Row() override; + explicit PROTOBUF_CONSTEXPR MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - MessageOfMapObj(const MessageOfMapObj& from); - MessageOfMapObj(MessageOfMapObj&& from) noexcept + MessageOfMap_Row(const MessageOfMap_Row& from); + MessageOfMap_Row(MessageOfMap_Row&& from) noexcept : - MessageOfMapObj() + MessageOfMap_Row() { *this = ::std::move(from); } - inline MessageOfMapObj& operator=(const MessageOfMapObj& from) + inline MessageOfMap_Row& operator=(const MessageOfMap_Row& from) { CopyFrom(from); return *this; } - inline MessageOfMapObj& operator=(MessageOfMapObj&& from) noexcept + inline MessageOfMap_Row& operator=(MessageOfMap_Row&& from) noexcept { if (this == &from) return *this; @@ -3003,33 +3006,24 @@ namespace protobuf { return default_instance().GetMetadata().reflection; } - static const MessageOfMapObj& default_instance() + static const MessageOfMap_Row& default_instance() { return *internal_default_instance(); } - enum MessageOfMapObjCase - { - kClassroomMessage = 1, - kDoorMessage = 2, - kGateMessage = 3, - kChestMessage = 4, - MESSAGE_OF_MAP_OBJ_NOT_SET = 0, - }; - - static inline const MessageOfMapObj* internal_default_instance() + static inline const MessageOfMap_Row* internal_default_instance() { - return reinterpret_cast( - &_MessageOfMapObj_default_instance_ + return reinterpret_cast( + &_MessageOfMap_Row_default_instance_ ); } static constexpr int kIndexInFileMessages = 10; - friend void swap(MessageOfMapObj& a, MessageOfMapObj& b) + friend void swap(MessageOfMap_Row& a, MessageOfMap_Row& b) { a.Swap(&b); } - inline void Swap(MessageOfMapObj* other) + inline void Swap(MessageOfMap_Row* other) { if (other == this) return; @@ -3048,7 +3042,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(MessageOfMapObj* other) + void UnsafeArenaSwap(MessageOfMap_Row* other) { if (other == this) return; @@ -3058,16 +3052,16 @@ namespace protobuf // implements Message ---------------------------------------------- - MessageOfMapObj* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + MessageOfMap_Row* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MessageOfMapObj& from); + void CopyFrom(const MessageOfMap_Row& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const MessageOfMapObj& from) + void MergeFrom(const MessageOfMap_Row& from) { - MessageOfMapObj::MergeImpl(*this, from); + MessageOfMap_Row::MergeImpl(*this, from); } private: @@ -3091,17 +3085,17 @@ namespace protobuf void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(MessageOfMapObj* other); + void InternalSwap(MessageOfMap_Row* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protobuf.MessageOfMapObj"; + return "protobuf.MessageOfMap.Row"; } protected: - explicit MessageOfMapObj(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + explicit MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3115,116 +3109,33 @@ namespace protobuf enum : int { - kClassroomMessageFieldNumber = 1, - kDoorMessageFieldNumber = 2, - kGateMessageFieldNumber = 3, - kChestMessageFieldNumber = 4, + kColFieldNumber = 1, }; - // .protobuf.MessageOfClassroom classroom_message = 1; - bool has_classroom_message() const; - - private: - bool _internal_has_classroom_message() const; - - public: - void clear_classroom_message(); - const ::protobuf::MessageOfClassroom& classroom_message() const; - PROTOBUF_NODISCARD ::protobuf::MessageOfClassroom* release_classroom_message(); - ::protobuf::MessageOfClassroom* mutable_classroom_message(); - void set_allocated_classroom_message(::protobuf::MessageOfClassroom* classroom_message); - - private: - const ::protobuf::MessageOfClassroom& _internal_classroom_message() const; - ::protobuf::MessageOfClassroom* _internal_mutable_classroom_message(); - - public: - void unsafe_arena_set_allocated_classroom_message( - ::protobuf::MessageOfClassroom* classroom_message - ); - ::protobuf::MessageOfClassroom* unsafe_arena_release_classroom_message(); - - // .protobuf.MessageOfDoor door_message = 2; - bool has_door_message() const; - - private: - bool _internal_has_door_message() const; - - public: - void clear_door_message(); - const ::protobuf::MessageOfDoor& door_message() const; - PROTOBUF_NODISCARD ::protobuf::MessageOfDoor* release_door_message(); - ::protobuf::MessageOfDoor* mutable_door_message(); - void set_allocated_door_message(::protobuf::MessageOfDoor* door_message); - - private: - const ::protobuf::MessageOfDoor& _internal_door_message() const; - ::protobuf::MessageOfDoor* _internal_mutable_door_message(); - - public: - void unsafe_arena_set_allocated_door_message( - ::protobuf::MessageOfDoor* door_message - ); - ::protobuf::MessageOfDoor* unsafe_arena_release_door_message(); - - // .protobuf.MessageOfGate gate_message = 3; - bool has_gate_message() const; - - private: - bool _internal_has_gate_message() const; - - public: - void clear_gate_message(); - const ::protobuf::MessageOfGate& gate_message() const; - PROTOBUF_NODISCARD ::protobuf::MessageOfGate* release_gate_message(); - ::protobuf::MessageOfGate* mutable_gate_message(); - void set_allocated_gate_message(::protobuf::MessageOfGate* gate_message); - - private: - const ::protobuf::MessageOfGate& _internal_gate_message() const; - ::protobuf::MessageOfGate* _internal_mutable_gate_message(); - - public: - void unsafe_arena_set_allocated_gate_message( - ::protobuf::MessageOfGate* gate_message - ); - ::protobuf::MessageOfGate* unsafe_arena_release_gate_message(); - - // .protobuf.MessageOfChest chest_message = 4; - bool has_chest_message() const; + // repeated .protobuf.PlaceType col = 1; + int col_size() const; private: - bool _internal_has_chest_message() const; + int _internal_col_size() const; public: - void clear_chest_message(); - const ::protobuf::MessageOfChest& chest_message() const; - PROTOBUF_NODISCARD ::protobuf::MessageOfChest* release_chest_message(); - ::protobuf::MessageOfChest* mutable_chest_message(); - void set_allocated_chest_message(::protobuf::MessageOfChest* chest_message); + void clear_col(); private: - const ::protobuf::MessageOfChest& _internal_chest_message() const; - ::protobuf::MessageOfChest* _internal_mutable_chest_message(); + ::protobuf::PlaceType _internal_col(int index) const; + void _internal_add_col(::protobuf::PlaceType value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_col(); public: - void unsafe_arena_set_allocated_chest_message( - ::protobuf::MessageOfChest* chest_message - ); - ::protobuf::MessageOfChest* unsafe_arena_release_chest_message(); + ::protobuf::PlaceType col(int index) const; + void set_col(int index, ::protobuf::PlaceType value); + void add_col(::protobuf::PlaceType value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& col() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_col(); - void clear_message_of_map_obj(); - MessageOfMapObjCase message_of_map_obj_case() const; - // @@protoc_insertion_point(class_scope:protobuf.MessageOfMapObj) + // @@protoc_insertion_point(class_scope:protobuf.MessageOfMap.Row) private: class _Internal; - void set_has_classroom_message(); - void set_has_door_message(); - void set_has_gate_message(); - void set_has_chest_message(); - - inline bool has_message_of_map_obj() const; - inline void clear_has_message_of_map_obj(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; @@ -3232,20 +3143,9 @@ namespace protobuf typedef void DestructorSkippable_; struct Impl_ { - union MessageOfMapObjUnion - { - constexpr MessageOfMapObjUnion() : - _constinit_{} - { - } - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::protobuf::MessageOfClassroom* classroom_message_; - ::protobuf::MessageOfDoor* door_message_; - ::protobuf::MessageOfGate* gate_message_; - ::protobuf::MessageOfChest* chest_message_; - } message_of_map_obj_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField col_; + mutable std::atomic _col_cached_byte_size_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[1]; }; union { @@ -3255,31 +3155,31 @@ namespace protobuf }; // ------------------------------------------------------------------- - class MessageOfMap_Row final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMap.Row) */ + class MessageOfMap final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMap) */ { public: - inline MessageOfMap_Row() : - MessageOfMap_Row(nullptr) + inline MessageOfMap() : + MessageOfMap(nullptr) { } - ~MessageOfMap_Row() override; - explicit PROTOBUF_CONSTEXPR MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + ~MessageOfMap() override; + explicit PROTOBUF_CONSTEXPR MessageOfMap(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - MessageOfMap_Row(const MessageOfMap_Row& from); - MessageOfMap_Row(MessageOfMap_Row&& from) noexcept + MessageOfMap(const MessageOfMap& from); + MessageOfMap(MessageOfMap&& from) noexcept : - MessageOfMap_Row() + MessageOfMap() { *this = ::std::move(from); } - inline MessageOfMap_Row& operator=(const MessageOfMap_Row& from) + inline MessageOfMap& operator=(const MessageOfMap& from) { CopyFrom(from); return *this; } - inline MessageOfMap_Row& operator=(MessageOfMap_Row&& from) noexcept + inline MessageOfMap& operator=(MessageOfMap&& from) noexcept { if (this == &from) return *this; @@ -3310,24 +3210,24 @@ namespace protobuf { return default_instance().GetMetadata().reflection; } - static const MessageOfMap_Row& default_instance() + static const MessageOfMap& default_instance() { return *internal_default_instance(); } - static inline const MessageOfMap_Row* internal_default_instance() + static inline const MessageOfMap* internal_default_instance() { - return reinterpret_cast( - &_MessageOfMap_Row_default_instance_ + return reinterpret_cast( + &_MessageOfMap_default_instance_ ); } static constexpr int kIndexInFileMessages = 11; - friend void swap(MessageOfMap_Row& a, MessageOfMap_Row& b) + friend void swap(MessageOfMap& a, MessageOfMap& b) { a.Swap(&b); } - inline void Swap(MessageOfMap_Row* other) + inline void Swap(MessageOfMap* other) { if (other == this) return; @@ -3346,7 +3246,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(MessageOfMap_Row* other) + void UnsafeArenaSwap(MessageOfMap* other) { if (other == this) return; @@ -3356,16 +3256,16 @@ namespace protobuf // implements Message ---------------------------------------------- - MessageOfMap_Row* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + MessageOfMap* 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 MessageOfMap& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const MessageOfMap_Row& from) + void MergeFrom(const MessageOfMap& from) { - MessageOfMap_Row::MergeImpl(*this, from); + MessageOfMap::MergeImpl(*this, from); } private: @@ -3389,17 +3289,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(MessageOfMap* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protobuf.MessageOfMap.Row"; + return "protobuf.MessageOfMap"; } protected: - explicit MessageOfMap_Row(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + explicit MessageOfMap(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: static const ClassData _class_data_; @@ -3409,234 +3309,29 @@ namespace protobuf // nested types ---------------------------------------------------- + typedef MessageOfMap_Row Row; + // accessors ------------------------------------------------------- enum : int { - kColFieldNumber = 1, + kRowFieldNumber = 2, }; - // repeated .protobuf.PlaceType col = 1; - int col_size() const; + // repeated .protobuf.MessageOfMap.Row row = 2; + int row_size() const; private: - int _internal_col_size() const; + int _internal_row_size() const; public: - void clear_col(); + void clear_row(); + ::protobuf::MessageOfMap_Row* mutable_row(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>* + mutable_row(); private: - ::protobuf::PlaceType _internal_col(int index) const; - void _internal_add_col(::protobuf::PlaceType value); - ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_col(); - - public: - ::protobuf::PlaceType col(int index) const; - void set_col(int index, ::protobuf::PlaceType value); - void add_col(::protobuf::PlaceType value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField& col() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_col(); - - // @@protoc_insertion_point(class_scope:protobuf.MessageOfMap.Row) - - private: - class _Internal; - - template - friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ - { - ::PROTOBUF_NAMESPACE_ID::RepeatedField col_; - mutable std::atomic _col_cached_byte_size_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union - { - Impl_ _impl_; - }; - friend struct ::TableStruct_Message2Clients_2eproto; - }; - // ------------------------------------------------------------------- - - class MessageOfMap final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.MessageOfMap) */ - { - public: - 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, - kMapObjMessageFieldNumber = 3, - }; - // 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(); + const ::protobuf::MessageOfMap_Row& _internal_row(int index) const; + ::protobuf::MessageOfMap_Row* _internal_add_row(); public: const ::protobuf::MessageOfMap_Row& row(int index) const; @@ -3644,28 +3339,6 @@ namespace protobuf const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row>& row() const; - // repeated .protobuf.MessageOfMapObj map_obj_message = 3; - int map_obj_message_size() const; - - private: - int _internal_map_obj_message_size() const; - - public: - void clear_map_obj_message(); - ::protobuf::MessageOfMapObj* mutable_map_obj_message(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMapObj>* - mutable_map_obj_message(); - - private: - const ::protobuf::MessageOfMapObj& _internal_map_obj_message(int index) const; - ::protobuf::MessageOfMapObj* _internal_add_map_obj_message(); - - public: - const ::protobuf::MessageOfMapObj& map_obj_message(int index) const; - ::protobuf::MessageOfMapObj* add_map_obj_message(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMapObj>& - map_obj_message() const; - // @@protoc_insertion_point(class_scope:protobuf.MessageOfMap) private: @@ -3678,7 +3351,6 @@ namespace protobuf struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMap_Row> row_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMapObj> map_obj_message_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -3755,6 +3427,10 @@ namespace protobuf kPropMessage = 3, kBulletMessage = 4, kBombedBulletMessage = 5, + kClassroomMessage = 6, + kDoorMessage = 7, + kGateMessage = 8, + kChestMessage = 9, MESSAGE_OF_OBJ_NOT_SET = 0, }; @@ -3765,7 +3441,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 13; + 12; friend void swap(MessageOfObj& a, MessageOfObj& b) { @@ -3862,6 +3538,10 @@ namespace protobuf kPropMessageFieldNumber = 3, kBulletMessageFieldNumber = 4, kBombedBulletMessageFieldNumber = 5, + kClassroomMessageFieldNumber = 6, + kDoorMessageFieldNumber = 7, + kGateMessageFieldNumber = 8, + kChestMessageFieldNumber = 9, }; // .protobuf.MessageOfStudent student_message = 1; bool has_student_message() const; @@ -3978,41 +3658,141 @@ namespace protobuf ); ::protobuf::MessageOfBombedBullet* unsafe_arena_release_bombed_bullet_message(); - void clear_message_of_obj(); - MessageOfObjCase message_of_obj_case() const; - // @@protoc_insertion_point(class_scope:protobuf.MessageOfObj) + // .protobuf.MessageOfClassroom classroom_message = 6; + bool has_classroom_message() const; private: - class _Internal; - void set_has_student_message(); - void set_has_tricker_message(); - void set_has_prop_message(); - void set_has_bullet_message(); - void set_has_bombed_bullet_message(); + bool _internal_has_classroom_message() const; - inline bool has_message_of_obj() const; - inline void clear_has_message_of_obj(); + public: + void clear_classroom_message(); + const ::protobuf::MessageOfClassroom& classroom_message() const; + PROTOBUF_NODISCARD ::protobuf::MessageOfClassroom* release_classroom_message(); + ::protobuf::MessageOfClassroom* mutable_classroom_message(); + void set_allocated_classroom_message(::protobuf::MessageOfClassroom* classroom_message); - template - friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ - { - union MessageOfObjUnion - { - constexpr MessageOfObjUnion() : - _constinit_{} - { - } - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::protobuf::MessageOfStudent* student_message_; - ::protobuf::MessageOfTricker* tricker_message_; - ::protobuf::MessageOfProp* prop_message_; - ::protobuf::MessageOfBullet* bullet_message_; - ::protobuf::MessageOfBombedBullet* bombed_bullet_message_; - } message_of_obj_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + private: + const ::protobuf::MessageOfClassroom& _internal_classroom_message() const; + ::protobuf::MessageOfClassroom* _internal_mutable_classroom_message(); + + public: + void unsafe_arena_set_allocated_classroom_message( + ::protobuf::MessageOfClassroom* classroom_message + ); + ::protobuf::MessageOfClassroom* unsafe_arena_release_classroom_message(); + + // .protobuf.MessageOfDoor door_message = 7; + bool has_door_message() const; + + private: + bool _internal_has_door_message() const; + + public: + void clear_door_message(); + const ::protobuf::MessageOfDoor& door_message() const; + PROTOBUF_NODISCARD ::protobuf::MessageOfDoor* release_door_message(); + ::protobuf::MessageOfDoor* mutable_door_message(); + void set_allocated_door_message(::protobuf::MessageOfDoor* door_message); + + private: + const ::protobuf::MessageOfDoor& _internal_door_message() const; + ::protobuf::MessageOfDoor* _internal_mutable_door_message(); + + public: + void unsafe_arena_set_allocated_door_message( + ::protobuf::MessageOfDoor* door_message + ); + ::protobuf::MessageOfDoor* unsafe_arena_release_door_message(); + + // .protobuf.MessageOfGate gate_message = 8; + bool has_gate_message() const; + + private: + bool _internal_has_gate_message() const; + + public: + void clear_gate_message(); + const ::protobuf::MessageOfGate& gate_message() const; + PROTOBUF_NODISCARD ::protobuf::MessageOfGate* release_gate_message(); + ::protobuf::MessageOfGate* mutable_gate_message(); + void set_allocated_gate_message(::protobuf::MessageOfGate* gate_message); + + private: + const ::protobuf::MessageOfGate& _internal_gate_message() const; + ::protobuf::MessageOfGate* _internal_mutable_gate_message(); + + public: + void unsafe_arena_set_allocated_gate_message( + ::protobuf::MessageOfGate* gate_message + ); + ::protobuf::MessageOfGate* unsafe_arena_release_gate_message(); + + // .protobuf.MessageOfChest chest_message = 9; + bool has_chest_message() const; + + private: + bool _internal_has_chest_message() const; + + public: + void clear_chest_message(); + const ::protobuf::MessageOfChest& chest_message() const; + PROTOBUF_NODISCARD ::protobuf::MessageOfChest* release_chest_message(); + ::protobuf::MessageOfChest* mutable_chest_message(); + void set_allocated_chest_message(::protobuf::MessageOfChest* chest_message); + + private: + const ::protobuf::MessageOfChest& _internal_chest_message() const; + ::protobuf::MessageOfChest* _internal_mutable_chest_message(); + + public: + void unsafe_arena_set_allocated_chest_message( + ::protobuf::MessageOfChest* chest_message + ); + ::protobuf::MessageOfChest* unsafe_arena_release_chest_message(); + + void clear_message_of_obj(); + MessageOfObjCase message_of_obj_case() const; + // @@protoc_insertion_point(class_scope:protobuf.MessageOfObj) + + private: + class _Internal; + void set_has_student_message(); + void set_has_tricker_message(); + void set_has_prop_message(); + void set_has_bullet_message(); + void set_has_bombed_bullet_message(); + void set_has_classroom_message(); + void set_has_door_message(); + void set_has_gate_message(); + void set_has_chest_message(); + + inline bool has_message_of_obj() const; + inline void clear_has_message_of_obj(); + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ + { + union MessageOfObjUnion + { + constexpr MessageOfObjUnion() : + _constinit_{} + { + } + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::protobuf::MessageOfStudent* student_message_; + ::protobuf::MessageOfTricker* tricker_message_; + ::protobuf::MessageOfProp* prop_message_; + ::protobuf::MessageOfBullet* bullet_message_; + ::protobuf::MessageOfBombedBullet* bombed_bullet_message_; + ::protobuf::MessageOfClassroom* classroom_message_; + ::protobuf::MessageOfDoor* door_message_; + ::protobuf::MessageOfGate* gate_message_; + ::protobuf::MessageOfChest* chest_message_; + } message_of_obj_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; }; union @@ -4089,7 +3869,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 14; + 13; friend void swap(MessageOfAll& a, MessageOfAll& b) { @@ -4377,7 +4157,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 15; + 14; friend void swap(MessageToClient& a, MessageToClient& b) { @@ -4470,9 +4250,8 @@ namespace protobuf enum : int { kObjMessageFieldNumber = 1, - kMapMessageFieldNumber = 2, - kAllMessageFieldNumber = 4, - kGameStateFieldNumber = 3, + kAllMessageFieldNumber = 3, + kGameStateFieldNumber = 2, }; // repeated .protobuf.MessageOfObj obj_message = 1; int obj_message_size() const; @@ -4496,30 +4275,7 @@ namespace protobuf const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfObj>& obj_message() const; - // .protobuf.MessageOfMap map_message = 2; - 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(); - - // .protobuf.MessageOfAll all_message = 4; + // .protobuf.MessageOfAll all_message = 3; bool has_all_message() const; private: @@ -4542,7 +4298,7 @@ namespace protobuf ); ::protobuf::MessageOfAll* unsafe_arena_release_all_message(); - // .protobuf.GameState game_state = 3; + // .protobuf.GameState game_state = 2; void clear_game_state(); ::protobuf::GameState game_state() const; void set_game_state(::protobuf::GameState value); @@ -4564,7 +4320,6 @@ namespace protobuf struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfObj> obj_message_; - ::protobuf::MessageOfMap* map_message_; ::protobuf::MessageOfAll* all_message_; int game_state_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -4643,7 +4398,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 16; + 15; friend void swap(MoveRes& a, MoveRes& b) { @@ -4859,7 +4614,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 17; + 16; friend void swap(BoolRes& a, BoolRes& b) { @@ -5051,7 +4806,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 18; + 17; friend void swap(MsgRes& a, MsgRes& b) { @@ -5310,52 +5065,87 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.determination) } - // int32 fail_num = 5; - inline void MessageOfStudent::clear_fail_num() + // int32 addiction = 5; + inline void MessageOfStudent::clear_addiction() { - _impl_.fail_num_ = 0; + _impl_.addiction_ = 0; } - inline int32_t MessageOfStudent::_internal_fail_num() const + inline int32_t MessageOfStudent::_internal_addiction() const { - return _impl_.fail_num_; + return _impl_.addiction_; } - inline int32_t MessageOfStudent::fail_num() const + inline int32_t MessageOfStudent::addiction() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.fail_num) - return _internal_fail_num(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.addiction) + return _internal_addiction(); } - inline void MessageOfStudent::_internal_set_fail_num(int32_t value) + inline void MessageOfStudent::_internal_set_addiction(int32_t value) { - _impl_.fail_num_ = value; + _impl_.addiction_ = value; } - inline void MessageOfStudent::set_fail_num(int32_t value) + inline void MessageOfStudent::set_addiction(int32_t value) { - _internal_set_fail_num(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.fail_num) + _internal_set_addiction(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.addiction) } - // double time_until_skill_available = 6; + // repeated double time_until_skill_available = 6; + inline int MessageOfStudent::_internal_time_until_skill_available_size() const + { + return _impl_.time_until_skill_available_.size(); + } + inline int MessageOfStudent::time_until_skill_available_size() const + { + return _internal_time_until_skill_available_size(); + } inline void MessageOfStudent::clear_time_until_skill_available() { - _impl_.time_until_skill_available_ = 0; + _impl_.time_until_skill_available_.Clear(); } - inline double MessageOfStudent::_internal_time_until_skill_available() const + inline double MessageOfStudent::_internal_time_until_skill_available(int index) const { - return _impl_.time_until_skill_available_; + return _impl_.time_until_skill_available_.Get(index); } - inline double MessageOfStudent::time_until_skill_available() const + inline double MessageOfStudent::time_until_skill_available(int index) const { // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.time_until_skill_available) + return _internal_time_until_skill_available(index); + } + inline void MessageOfStudent::set_time_until_skill_available(int index, double value) + { + _impl_.time_until_skill_available_.Set(index, value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.time_until_skill_available) + } + inline void MessageOfStudent::_internal_add_time_until_skill_available(double value) + { + _impl_.time_until_skill_available_.Add(value); + } + inline void MessageOfStudent::add_time_until_skill_available(double value) + { + _internal_add_time_until_skill_available(value); + // @@protoc_insertion_point(field_add:protobuf.MessageOfStudent.time_until_skill_available) + } + inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + MessageOfStudent::_internal_time_until_skill_available() const + { + return _impl_.time_until_skill_available_; + } + inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + MessageOfStudent::time_until_skill_available() const + { + // @@protoc_insertion_point(field_list:protobuf.MessageOfStudent.time_until_skill_available) return _internal_time_until_skill_available(); } - inline void MessageOfStudent::_internal_set_time_until_skill_available(double value) + inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* + MessageOfStudent::_internal_mutable_time_until_skill_available() { - _impl_.time_until_skill_available_ = value; + return &_impl_.time_until_skill_available_; } - inline void MessageOfStudent::set_time_until_skill_available(double value) + inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* + MessageOfStudent::mutable_time_until_skill_available() { - _internal_set_time_until_skill_available(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.time_until_skill_available) + // @@protoc_insertion_point(field_mutable_list:protobuf.MessageOfStudent.time_until_skill_available) + return _internal_mutable_time_until_skill_available(); } // .protobuf.PlaceType place = 7; @@ -5508,54 +5298,6 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.state) } - // double fail_time = 12; - inline void MessageOfStudent::clear_fail_time() - { - _impl_.fail_time_ = 0; - } - inline double MessageOfStudent::_internal_fail_time() const - { - return _impl_.fail_time_; - } - inline double MessageOfStudent::fail_time() const - { - // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.fail_time) - return _internal_fail_time(); - } - inline void MessageOfStudent::_internal_set_fail_time(double value) - { - _impl_.fail_time_ = value; - } - inline void MessageOfStudent::set_fail_time(double value) - { - _internal_set_fail_time(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.fail_time) - } - - // double emo_time = 14; - inline void MessageOfStudent::clear_emo_time() - { - _impl_.emo_time_ = 0; - } - inline double MessageOfStudent::_internal_emo_time() const - { - return _impl_.emo_time_; - } - inline double MessageOfStudent::emo_time() const - { - // @@protoc_insertion_point(field_get:protobuf.MessageOfStudent.emo_time) - return _internal_emo_time(); - } - inline void MessageOfStudent::_internal_set_emo_time(double value) - { - _impl_.emo_time_ = value; - } - inline void MessageOfStudent::set_emo_time(double value) - { - _internal_set_emo_time(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfStudent.emo_time) - } - // int64 player_id = 15; inline void MessageOfStudent::clear_player_id() { @@ -5926,28 +5668,63 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.damage) } - // double time_until_skill_available = 5; + // repeated double time_until_skill_available = 5; + inline int MessageOfTricker::_internal_time_until_skill_available_size() const + { + return _impl_.time_until_skill_available_.size(); + } + inline int MessageOfTricker::time_until_skill_available_size() const + { + return _internal_time_until_skill_available_size(); + } inline void MessageOfTricker::clear_time_until_skill_available() { - _impl_.time_until_skill_available_ = 0; + _impl_.time_until_skill_available_.Clear(); } - inline double MessageOfTricker::_internal_time_until_skill_available() const + inline double MessageOfTricker::_internal_time_until_skill_available(int index) const { - return _impl_.time_until_skill_available_; + return _impl_.time_until_skill_available_.Get(index); } - inline double MessageOfTricker::time_until_skill_available() const + inline double MessageOfTricker::time_until_skill_available(int index) const { // @@protoc_insertion_point(field_get:protobuf.MessageOfTricker.time_until_skill_available) + return _internal_time_until_skill_available(index); + } + inline void MessageOfTricker::set_time_until_skill_available(int index, double value) + { + _impl_.time_until_skill_available_.Set(index, value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.time_until_skill_available) + } + inline void MessageOfTricker::_internal_add_time_until_skill_available(double value) + { + _impl_.time_until_skill_available_.Add(value); + } + inline void MessageOfTricker::add_time_until_skill_available(double value) + { + _internal_add_time_until_skill_available(value); + // @@protoc_insertion_point(field_add:protobuf.MessageOfTricker.time_until_skill_available) + } + inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + MessageOfTricker::_internal_time_until_skill_available() const + { + return _impl_.time_until_skill_available_; + } + inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + MessageOfTricker::time_until_skill_available() const + { + // @@protoc_insertion_point(field_list:protobuf.MessageOfTricker.time_until_skill_available) return _internal_time_until_skill_available(); } - inline void MessageOfTricker::_internal_set_time_until_skill_available(double value) + inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* + MessageOfTricker::_internal_mutable_time_until_skill_available() { - _impl_.time_until_skill_available_ = value; + return &_impl_.time_until_skill_available_; } - inline void MessageOfTricker::set_time_until_skill_available(double value) + inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* + MessageOfTricker::mutable_time_until_skill_available() { - _internal_set_time_until_skill_available(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfTricker.time_until_skill_available) + // @@protoc_insertion_point(field_mutable_list:protobuf.MessageOfTricker.time_until_skill_available) + return _internal_mutable_time_until_skill_available(); } // .protobuf.PlaceType place = 6; @@ -7268,138 +7045,156 @@ namespace protobuf // ------------------------------------------------------------------- - // MessageOfMapObj + // MessageOfMap_Row - // .protobuf.MessageOfClassroom classroom_message = 1; - inline bool MessageOfMapObj::_internal_has_classroom_message() const + // repeated .protobuf.PlaceType col = 1; + inline int MessageOfMap_Row::_internal_col_size() const { - return message_of_map_obj_case() == kClassroomMessage; + return _impl_.col_.size(); } - inline bool MessageOfMapObj::has_classroom_message() const + inline int MessageOfMap_Row::col_size() const { - return _internal_has_classroom_message(); + return _internal_col_size(); } - inline void MessageOfMapObj::set_has_classroom_message() + inline void MessageOfMap_Row::clear_col() { - _impl_._oneof_case_[0] = kClassroomMessage; + _impl_.col_.Clear(); } - inline void MessageOfMapObj::clear_classroom_message() + inline ::protobuf::PlaceType MessageOfMap_Row::_internal_col(int index) const { - if (_internal_has_classroom_message()) - { - if (GetArenaForAllocation() == nullptr) - { - delete _impl_.message_of_map_obj_.classroom_message_; - } - clear_has_message_of_map_obj(); - } + return static_cast<::protobuf::PlaceType>(_impl_.col_.Get(index)); } - inline ::protobuf::MessageOfClassroom* MessageOfMapObj::release_classroom_message() + inline ::protobuf::PlaceType MessageOfMap_Row::col(int index) const { - // @@protoc_insertion_point(field_release:protobuf.MessageOfMapObj.classroom_message) - if (_internal_has_classroom_message()) - { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfClassroom* temp = _impl_.message_of_map_obj_.classroom_message_; - if (GetArenaForAllocation() != nullptr) - { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - _impl_.message_of_map_obj_.classroom_message_ = nullptr; - return temp; - } - else - { - return nullptr; - } + // @@protoc_insertion_point(field_get:protobuf.MessageOfMap.Row.col) + return _internal_col(index); } - inline const ::protobuf::MessageOfClassroom& MessageOfMapObj::_internal_classroom_message() const + inline void MessageOfMap_Row::set_col(int index, ::protobuf::PlaceType value) { - return _internal_has_classroom_message() ? *_impl_.message_of_map_obj_.classroom_message_ : reinterpret_cast<::protobuf::MessageOfClassroom&>(::protobuf::_MessageOfClassroom_default_instance_); + _impl_.col_.Set(index, value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfMap.Row.col) } - inline const ::protobuf::MessageOfClassroom& MessageOfMapObj::classroom_message() const + inline void MessageOfMap_Row::_internal_add_col(::protobuf::PlaceType value) { - // @@protoc_insertion_point(field_get:protobuf.MessageOfMapObj.classroom_message) - return _internal_classroom_message(); + _impl_.col_.Add(value); } - inline ::protobuf::MessageOfClassroom* MessageOfMapObj::unsafe_arena_release_classroom_message() + inline void MessageOfMap_Row::add_col(::protobuf::PlaceType value) { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfMapObj.classroom_message) - if (_internal_has_classroom_message()) - { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfClassroom* temp = _impl_.message_of_map_obj_.classroom_message_; - _impl_.message_of_map_obj_.classroom_message_ = nullptr; - return temp; - } - else - { - return nullptr; - } + _internal_add_col(value); + // @@protoc_insertion_point(field_add:protobuf.MessageOfMap.Row.col) } - inline void MessageOfMapObj::unsafe_arena_set_allocated_classroom_message(::protobuf::MessageOfClassroom* classroom_message) + inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& + MessageOfMap_Row::col() const { - clear_message_of_map_obj(); - if (classroom_message) - { - set_has_classroom_message(); - _impl_.message_of_map_obj_.classroom_message_ = classroom_message; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfMapObj.classroom_message) + // @@protoc_insertion_point(field_list:protobuf.MessageOfMap.Row.col) + return _impl_.col_; } - inline ::protobuf::MessageOfClassroom* MessageOfMapObj::_internal_mutable_classroom_message() + inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* + MessageOfMap_Row::_internal_mutable_col() { - if (!_internal_has_classroom_message()) - { - clear_message_of_map_obj(); - set_has_classroom_message(); - _impl_.message_of_map_obj_.classroom_message_ = CreateMaybeMessage<::protobuf::MessageOfClassroom>(GetArenaForAllocation()); - } - return _impl_.message_of_map_obj_.classroom_message_; + return &_impl_.col_; } - inline ::protobuf::MessageOfClassroom* MessageOfMapObj::mutable_classroom_message() + inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* + MessageOfMap_Row::mutable_col() { - ::protobuf::MessageOfClassroom* _msg = _internal_mutable_classroom_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfMapObj.classroom_message) - return _msg; + // @@protoc_insertion_point(field_mutable_list:protobuf.MessageOfMap.Row.col) + return _internal_mutable_col(); } - // .protobuf.MessageOfDoor door_message = 2; - inline bool MessageOfMapObj::_internal_has_door_message() const + // ------------------------------------------------------------------- + + // MessageOfMap + + // repeated .protobuf.MessageOfMap.Row row = 2; + inline int MessageOfMap::_internal_row_size() const { - return message_of_map_obj_case() == kDoorMessage; + return _impl_.row_.size(); } - inline bool MessageOfMapObj::has_door_message() const + inline int MessageOfMap::row_size() const { - return _internal_has_door_message(); + return _internal_row_size(); } - inline void MessageOfMapObj::set_has_door_message() + inline void MessageOfMap::clear_row() { - _impl_._oneof_case_[0] = kDoorMessage; + _impl_.row_.Clear(); } - inline void MessageOfMapObj::clear_door_message() + inline ::protobuf::MessageOfMap_Row* MessageOfMap::mutable_row(int index) { - if (_internal_has_door_message()) + // @@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_; + } + + // ------------------------------------------------------------------- + + // MessageOfObj + + // .protobuf.MessageOfStudent student_message = 1; + inline bool MessageOfObj::_internal_has_student_message() const + { + return message_of_obj_case() == kStudentMessage; + } + inline bool MessageOfObj::has_student_message() const + { + return _internal_has_student_message(); + } + inline void MessageOfObj::set_has_student_message() + { + _impl_._oneof_case_[0] = kStudentMessage; + } + inline void MessageOfObj::clear_student_message() + { + if (_internal_has_student_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_map_obj_.door_message_; + delete _impl_.message_of_obj_.student_message_; } - clear_has_message_of_map_obj(); + clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfDoor* MessageOfMapObj::release_door_message() + inline ::protobuf::MessageOfStudent* MessageOfObj::release_student_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfMapObj.door_message) - if (_internal_has_door_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.student_message) + if (_internal_has_student_message()) { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfDoor* temp = _impl_.message_of_map_obj_.door_message_; + clear_has_message_of_obj(); + ::protobuf::MessageOfStudent* temp = _impl_.message_of_obj_.student_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_map_obj_.door_message_ = nullptr; + _impl_.message_of_obj_.student_message_ = nullptr; return temp; } else @@ -7407,23 +7202,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfDoor& MessageOfMapObj::_internal_door_message() const + inline const ::protobuf::MessageOfStudent& MessageOfObj::_internal_student_message() const { - return _internal_has_door_message() ? *_impl_.message_of_map_obj_.door_message_ : reinterpret_cast<::protobuf::MessageOfDoor&>(::protobuf::_MessageOfDoor_default_instance_); + return _internal_has_student_message() ? *_impl_.message_of_obj_.student_message_ : reinterpret_cast<::protobuf::MessageOfStudent&>(::protobuf::_MessageOfStudent_default_instance_); } - inline const ::protobuf::MessageOfDoor& MessageOfMapObj::door_message() const + inline const ::protobuf::MessageOfStudent& MessageOfObj::student_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfMapObj.door_message) - return _internal_door_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.student_message) + return _internal_student_message(); } - inline ::protobuf::MessageOfDoor* MessageOfMapObj::unsafe_arena_release_door_message() + inline ::protobuf::MessageOfStudent* MessageOfObj::unsafe_arena_release_student_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfMapObj.door_message) - if (_internal_has_door_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.student_message) + if (_internal_has_student_message()) { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfDoor* temp = _impl_.message_of_map_obj_.door_message_; - _impl_.message_of_map_obj_.door_message_ = nullptr; + clear_has_message_of_obj(); + ::protobuf::MessageOfStudent* temp = _impl_.message_of_obj_.student_message_; + _impl_.message_of_obj_.student_message_ = nullptr; return temp; } else @@ -7431,69 +7226,69 @@ namespace protobuf return nullptr; } } - inline void MessageOfMapObj::unsafe_arena_set_allocated_door_message(::protobuf::MessageOfDoor* door_message) + inline void MessageOfObj::unsafe_arena_set_allocated_student_message(::protobuf::MessageOfStudent* student_message) { - clear_message_of_map_obj(); - if (door_message) + clear_message_of_obj(); + if (student_message) { - set_has_door_message(); - _impl_.message_of_map_obj_.door_message_ = door_message; + set_has_student_message(); + _impl_.message_of_obj_.student_message_ = student_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfMapObj.door_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.student_message) } - inline ::protobuf::MessageOfDoor* MessageOfMapObj::_internal_mutable_door_message() + inline ::protobuf::MessageOfStudent* MessageOfObj::_internal_mutable_student_message() { - if (!_internal_has_door_message()) + if (!_internal_has_student_message()) { - clear_message_of_map_obj(); - set_has_door_message(); - _impl_.message_of_map_obj_.door_message_ = CreateMaybeMessage<::protobuf::MessageOfDoor>(GetArenaForAllocation()); + clear_message_of_obj(); + set_has_student_message(); + _impl_.message_of_obj_.student_message_ = CreateMaybeMessage<::protobuf::MessageOfStudent>(GetArenaForAllocation()); } - return _impl_.message_of_map_obj_.door_message_; + return _impl_.message_of_obj_.student_message_; } - inline ::protobuf::MessageOfDoor* MessageOfMapObj::mutable_door_message() + inline ::protobuf::MessageOfStudent* MessageOfObj::mutable_student_message() { - ::protobuf::MessageOfDoor* _msg = _internal_mutable_door_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfMapObj.door_message) + ::protobuf::MessageOfStudent* _msg = _internal_mutable_student_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.student_message) return _msg; } - // .protobuf.MessageOfGate gate_message = 3; - inline bool MessageOfMapObj::_internal_has_gate_message() const + // .protobuf.MessageOfTricker tricker_message = 2; + inline bool MessageOfObj::_internal_has_tricker_message() const { - return message_of_map_obj_case() == kGateMessage; + return message_of_obj_case() == kTrickerMessage; } - inline bool MessageOfMapObj::has_gate_message() const + inline bool MessageOfObj::has_tricker_message() const { - return _internal_has_gate_message(); + return _internal_has_tricker_message(); } - inline void MessageOfMapObj::set_has_gate_message() + inline void MessageOfObj::set_has_tricker_message() { - _impl_._oneof_case_[0] = kGateMessage; + _impl_._oneof_case_[0] = kTrickerMessage; } - inline void MessageOfMapObj::clear_gate_message() + inline void MessageOfObj::clear_tricker_message() { - if (_internal_has_gate_message()) + if (_internal_has_tricker_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_map_obj_.gate_message_; + delete _impl_.message_of_obj_.tricker_message_; } - clear_has_message_of_map_obj(); + clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfGate* MessageOfMapObj::release_gate_message() + inline ::protobuf::MessageOfTricker* MessageOfObj::release_tricker_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfMapObj.gate_message) - if (_internal_has_gate_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.tricker_message) + if (_internal_has_tricker_message()) { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfGate* temp = _impl_.message_of_map_obj_.gate_message_; + clear_has_message_of_obj(); + ::protobuf::MessageOfTricker* temp = _impl_.message_of_obj_.tricker_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_map_obj_.gate_message_ = nullptr; + _impl_.message_of_obj_.tricker_message_ = nullptr; return temp; } else @@ -7501,23 +7296,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfGate& MessageOfMapObj::_internal_gate_message() const + inline const ::protobuf::MessageOfTricker& MessageOfObj::_internal_tricker_message() const { - return _internal_has_gate_message() ? *_impl_.message_of_map_obj_.gate_message_ : reinterpret_cast<::protobuf::MessageOfGate&>(::protobuf::_MessageOfGate_default_instance_); + return _internal_has_tricker_message() ? *_impl_.message_of_obj_.tricker_message_ : reinterpret_cast<::protobuf::MessageOfTricker&>(::protobuf::_MessageOfTricker_default_instance_); } - inline const ::protobuf::MessageOfGate& MessageOfMapObj::gate_message() const + inline const ::protobuf::MessageOfTricker& MessageOfObj::tricker_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfMapObj.gate_message) - return _internal_gate_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.tricker_message) + return _internal_tricker_message(); } - inline ::protobuf::MessageOfGate* MessageOfMapObj::unsafe_arena_release_gate_message() + inline ::protobuf::MessageOfTricker* MessageOfObj::unsafe_arena_release_tricker_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfMapObj.gate_message) - if (_internal_has_gate_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.tricker_message) + if (_internal_has_tricker_message()) { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfGate* temp = _impl_.message_of_map_obj_.gate_message_; - _impl_.message_of_map_obj_.gate_message_ = nullptr; + clear_has_message_of_obj(); + ::protobuf::MessageOfTricker* temp = _impl_.message_of_obj_.tricker_message_; + _impl_.message_of_obj_.tricker_message_ = nullptr; return temp; } else @@ -7525,69 +7320,69 @@ namespace protobuf return nullptr; } } - inline void MessageOfMapObj::unsafe_arena_set_allocated_gate_message(::protobuf::MessageOfGate* gate_message) + inline void MessageOfObj::unsafe_arena_set_allocated_tricker_message(::protobuf::MessageOfTricker* tricker_message) { - clear_message_of_map_obj(); - if (gate_message) + clear_message_of_obj(); + if (tricker_message) { - set_has_gate_message(); - _impl_.message_of_map_obj_.gate_message_ = gate_message; + set_has_tricker_message(); + _impl_.message_of_obj_.tricker_message_ = tricker_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfMapObj.gate_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.tricker_message) } - inline ::protobuf::MessageOfGate* MessageOfMapObj::_internal_mutable_gate_message() + inline ::protobuf::MessageOfTricker* MessageOfObj::_internal_mutable_tricker_message() { - if (!_internal_has_gate_message()) + if (!_internal_has_tricker_message()) { - clear_message_of_map_obj(); - set_has_gate_message(); - _impl_.message_of_map_obj_.gate_message_ = CreateMaybeMessage<::protobuf::MessageOfGate>(GetArenaForAllocation()); + clear_message_of_obj(); + set_has_tricker_message(); + _impl_.message_of_obj_.tricker_message_ = CreateMaybeMessage<::protobuf::MessageOfTricker>(GetArenaForAllocation()); } - return _impl_.message_of_map_obj_.gate_message_; + return _impl_.message_of_obj_.tricker_message_; } - inline ::protobuf::MessageOfGate* MessageOfMapObj::mutable_gate_message() + inline ::protobuf::MessageOfTricker* MessageOfObj::mutable_tricker_message() { - ::protobuf::MessageOfGate* _msg = _internal_mutable_gate_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfMapObj.gate_message) + ::protobuf::MessageOfTricker* _msg = _internal_mutable_tricker_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.tricker_message) return _msg; } - // .protobuf.MessageOfChest chest_message = 4; - inline bool MessageOfMapObj::_internal_has_chest_message() const + // .protobuf.MessageOfProp prop_message = 3; + inline bool MessageOfObj::_internal_has_prop_message() const { - return message_of_map_obj_case() == kChestMessage; + return message_of_obj_case() == kPropMessage; } - inline bool MessageOfMapObj::has_chest_message() const + inline bool MessageOfObj::has_prop_message() const { - return _internal_has_chest_message(); + return _internal_has_prop_message(); } - inline void MessageOfMapObj::set_has_chest_message() + inline void MessageOfObj::set_has_prop_message() { - _impl_._oneof_case_[0] = kChestMessage; + _impl_._oneof_case_[0] = kPropMessage; } - inline void MessageOfMapObj::clear_chest_message() + inline void MessageOfObj::clear_prop_message() { - if (_internal_has_chest_message()) + if (_internal_has_prop_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_map_obj_.chest_message_; + delete _impl_.message_of_obj_.prop_message_; } - clear_has_message_of_map_obj(); + clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfChest* MessageOfMapObj::release_chest_message() + inline ::protobuf::MessageOfProp* MessageOfObj::release_prop_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfMapObj.chest_message) - if (_internal_has_chest_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.prop_message) + if (_internal_has_prop_message()) { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfChest* temp = _impl_.message_of_map_obj_.chest_message_; + clear_has_message_of_obj(); + ::protobuf::MessageOfProp* temp = _impl_.message_of_obj_.prop_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_map_obj_.chest_message_ = nullptr; + _impl_.message_of_obj_.prop_message_ = nullptr; return temp; } else @@ -7595,23 +7390,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfChest& MessageOfMapObj::_internal_chest_message() const + inline const ::protobuf::MessageOfProp& MessageOfObj::_internal_prop_message() const { - return _internal_has_chest_message() ? *_impl_.message_of_map_obj_.chest_message_ : reinterpret_cast<::protobuf::MessageOfChest&>(::protobuf::_MessageOfChest_default_instance_); + return _internal_has_prop_message() ? *_impl_.message_of_obj_.prop_message_ : reinterpret_cast<::protobuf::MessageOfProp&>(::protobuf::_MessageOfProp_default_instance_); } - inline const ::protobuf::MessageOfChest& MessageOfMapObj::chest_message() const + inline const ::protobuf::MessageOfProp& MessageOfObj::prop_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfMapObj.chest_message) - return _internal_chest_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.prop_message) + return _internal_prop_message(); } - inline ::protobuf::MessageOfChest* MessageOfMapObj::unsafe_arena_release_chest_message() + inline ::protobuf::MessageOfProp* MessageOfObj::unsafe_arena_release_prop_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfMapObj.chest_message) - if (_internal_has_chest_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.prop_message) + if (_internal_has_prop_message()) { - clear_has_message_of_map_obj(); - ::protobuf::MessageOfChest* temp = _impl_.message_of_map_obj_.chest_message_; - _impl_.message_of_map_obj_.chest_message_ = nullptr; + clear_has_message_of_obj(); + ::protobuf::MessageOfProp* temp = _impl_.message_of_obj_.prop_message_; + _impl_.message_of_obj_.prop_message_ = nullptr; return temp; } else @@ -7619,247 +7414,163 @@ namespace protobuf return nullptr; } } - inline void MessageOfMapObj::unsafe_arena_set_allocated_chest_message(::protobuf::MessageOfChest* chest_message) + inline void MessageOfObj::unsafe_arena_set_allocated_prop_message(::protobuf::MessageOfProp* prop_message) { - clear_message_of_map_obj(); - if (chest_message) + clear_message_of_obj(); + if (prop_message) { - set_has_chest_message(); - _impl_.message_of_map_obj_.chest_message_ = chest_message; + set_has_prop_message(); + _impl_.message_of_obj_.prop_message_ = prop_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfMapObj.chest_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.prop_message) } - inline ::protobuf::MessageOfChest* MessageOfMapObj::_internal_mutable_chest_message() + inline ::protobuf::MessageOfProp* MessageOfObj::_internal_mutable_prop_message() { - if (!_internal_has_chest_message()) + if (!_internal_has_prop_message()) { - clear_message_of_map_obj(); - set_has_chest_message(); - _impl_.message_of_map_obj_.chest_message_ = CreateMaybeMessage<::protobuf::MessageOfChest>(GetArenaForAllocation()); + clear_message_of_obj(); + set_has_prop_message(); + _impl_.message_of_obj_.prop_message_ = CreateMaybeMessage<::protobuf::MessageOfProp>(GetArenaForAllocation()); } - return _impl_.message_of_map_obj_.chest_message_; + return _impl_.message_of_obj_.prop_message_; } - inline ::protobuf::MessageOfChest* MessageOfMapObj::mutable_chest_message() + inline ::protobuf::MessageOfProp* MessageOfObj::mutable_prop_message() { - ::protobuf::MessageOfChest* _msg = _internal_mutable_chest_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfMapObj.chest_message) + ::protobuf::MessageOfProp* _msg = _internal_mutable_prop_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.prop_message) return _msg; } - inline bool MessageOfMapObj::has_message_of_map_obj() const - { - return message_of_map_obj_case() != MESSAGE_OF_MAP_OBJ_NOT_SET; - } - inline void MessageOfMapObj::clear_has_message_of_map_obj() - { - _impl_._oneof_case_[0] = MESSAGE_OF_MAP_OBJ_NOT_SET; - } - inline MessageOfMapObj::MessageOfMapObjCase MessageOfMapObj::message_of_map_obj_case() const - { - return MessageOfMapObj::MessageOfMapObjCase(_impl_._oneof_case_[0]); - } - // ------------------------------------------------------------------- - - // MessageOfMap_Row - - // repeated .protobuf.PlaceType col = 1; - inline int MessageOfMap_Row::_internal_col_size() const - { - return _impl_.col_.size(); - } - inline int MessageOfMap_Row::col_size() const - { - return _internal_col_size(); - } - inline void MessageOfMap_Row::clear_col() - { - _impl_.col_.Clear(); - } - inline ::protobuf::PlaceType MessageOfMap_Row::_internal_col(int index) const - { - return static_cast<::protobuf::PlaceType>(_impl_.col_.Get(index)); - } - inline ::protobuf::PlaceType MessageOfMap_Row::col(int index) const - { - // @@protoc_insertion_point(field_get:protobuf.MessageOfMap.Row.col) - return _internal_col(index); - } - inline void MessageOfMap_Row::set_col(int index, ::protobuf::PlaceType value) - { - _impl_.col_.Set(index, value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfMap.Row.col) - } - inline void MessageOfMap_Row::_internal_add_col(::protobuf::PlaceType value) - { - _impl_.col_.Add(value); - } - inline void MessageOfMap_Row::add_col(::protobuf::PlaceType value) - { - _internal_add_col(value); - // @@protoc_insertion_point(field_add:protobuf.MessageOfMap.Row.col) - } - inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& - MessageOfMap_Row::col() const - { - // @@protoc_insertion_point(field_list:protobuf.MessageOfMap.Row.col) - return _impl_.col_; - } - inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* - MessageOfMap_Row::_internal_mutable_col() - { - return &_impl_.col_; - } - inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* - MessageOfMap_Row::mutable_col() - { - // @@protoc_insertion_point(field_mutable_list:protobuf.MessageOfMap.Row.col) - return _internal_mutable_col(); - } - - // ------------------------------------------------------------------- - - // MessageOfMap - - // 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 + // .protobuf.MessageOfBullet bullet_message = 4; + inline bool MessageOfObj::_internal_has_bullet_message() const { - // @@protoc_insertion_point(field_list:protobuf.MessageOfMap.row) - return _impl_.row_; + return message_of_obj_case() == kBulletMessage; } - - // repeated .protobuf.MessageOfMapObj map_obj_message = 3; - inline int MessageOfMap::_internal_map_obj_message_size() const + inline bool MessageOfObj::has_bullet_message() const { - return _impl_.map_obj_message_.size(); + return _internal_has_bullet_message(); } - inline int MessageOfMap::map_obj_message_size() const + inline void MessageOfObj::set_has_bullet_message() { - return _internal_map_obj_message_size(); + _impl_._oneof_case_[0] = kBulletMessage; } - inline void MessageOfMap::clear_map_obj_message() + inline void MessageOfObj::clear_bullet_message() { - _impl_.map_obj_message_.Clear(); + if (_internal_has_bullet_message()) + { + if (GetArenaForAllocation() == nullptr) + { + delete _impl_.message_of_obj_.bullet_message_; + } + clear_has_message_of_obj(); + } } - inline ::protobuf::MessageOfMapObj* MessageOfMap::mutable_map_obj_message(int index) + inline ::protobuf::MessageOfBullet* MessageOfObj::release_bullet_message() { - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfMap.map_obj_message) - return _impl_.map_obj_message_.Mutable(index); + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.bullet_message) + if (_internal_has_bullet_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfBullet* temp = _impl_.message_of_obj_.bullet_message_; + if (GetArenaForAllocation() != nullptr) + { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.message_of_obj_.bullet_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } } - inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMapObj>* - MessageOfMap::mutable_map_obj_message() + inline const ::protobuf::MessageOfBullet& MessageOfObj::_internal_bullet_message() const { - // @@protoc_insertion_point(field_mutable_list:protobuf.MessageOfMap.map_obj_message) - return &_impl_.map_obj_message_; + return _internal_has_bullet_message() ? *_impl_.message_of_obj_.bullet_message_ : reinterpret_cast<::protobuf::MessageOfBullet&>(::protobuf::_MessageOfBullet_default_instance_); } - inline const ::protobuf::MessageOfMapObj& MessageOfMap::_internal_map_obj_message(int index) const + inline const ::protobuf::MessageOfBullet& MessageOfObj::bullet_message() const { - return _impl_.map_obj_message_.Get(index); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.bullet_message) + return _internal_bullet_message(); } - inline const ::protobuf::MessageOfMapObj& MessageOfMap::map_obj_message(int index) const + inline ::protobuf::MessageOfBullet* MessageOfObj::unsafe_arena_release_bullet_message() { - // @@protoc_insertion_point(field_get:protobuf.MessageOfMap.map_obj_message) - return _internal_map_obj_message(index); + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.bullet_message) + if (_internal_has_bullet_message()) + { + clear_has_message_of_obj(); + ::protobuf::MessageOfBullet* temp = _impl_.message_of_obj_.bullet_message_; + _impl_.message_of_obj_.bullet_message_ = nullptr; + return temp; + } + else + { + return nullptr; + } } - inline ::protobuf::MessageOfMapObj* MessageOfMap::_internal_add_map_obj_message() + inline void MessageOfObj::unsafe_arena_set_allocated_bullet_message(::protobuf::MessageOfBullet* bullet_message) { - return _impl_.map_obj_message_.Add(); + clear_message_of_obj(); + if (bullet_message) + { + set_has_bullet_message(); + _impl_.message_of_obj_.bullet_message_ = bullet_message; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.bullet_message) } - inline ::protobuf::MessageOfMapObj* MessageOfMap::add_map_obj_message() + inline ::protobuf::MessageOfBullet* MessageOfObj::_internal_mutable_bullet_message() { - ::protobuf::MessageOfMapObj* _add = _internal_add_map_obj_message(); - // @@protoc_insertion_point(field_add:protobuf.MessageOfMap.map_obj_message) - return _add; + if (!_internal_has_bullet_message()) + { + clear_message_of_obj(); + set_has_bullet_message(); + _impl_.message_of_obj_.bullet_message_ = CreateMaybeMessage<::protobuf::MessageOfBullet>(GetArenaForAllocation()); + } + return _impl_.message_of_obj_.bullet_message_; } - inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::protobuf::MessageOfMapObj>& - MessageOfMap::map_obj_message() const + inline ::protobuf::MessageOfBullet* MessageOfObj::mutable_bullet_message() { - // @@protoc_insertion_point(field_list:protobuf.MessageOfMap.map_obj_message) - return _impl_.map_obj_message_; + ::protobuf::MessageOfBullet* _msg = _internal_mutable_bullet_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.bullet_message) + return _msg; } - // ------------------------------------------------------------------- - - // MessageOfObj - - // .protobuf.MessageOfStudent student_message = 1; - inline bool MessageOfObj::_internal_has_student_message() const + // .protobuf.MessageOfBombedBullet bombed_bullet_message = 5; + inline bool MessageOfObj::_internal_has_bombed_bullet_message() const { - return message_of_obj_case() == kStudentMessage; + return message_of_obj_case() == kBombedBulletMessage; } - inline bool MessageOfObj::has_student_message() const + inline bool MessageOfObj::has_bombed_bullet_message() const { - return _internal_has_student_message(); + return _internal_has_bombed_bullet_message(); } - inline void MessageOfObj::set_has_student_message() + inline void MessageOfObj::set_has_bombed_bullet_message() { - _impl_._oneof_case_[0] = kStudentMessage; + _impl_._oneof_case_[0] = kBombedBulletMessage; } - inline void MessageOfObj::clear_student_message() + inline void MessageOfObj::clear_bombed_bullet_message() { - if (_internal_has_student_message()) + if (_internal_has_bombed_bullet_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_obj_.student_message_; + delete _impl_.message_of_obj_.bombed_bullet_message_; } clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfStudent* MessageOfObj::release_student_message() + inline ::protobuf::MessageOfBombedBullet* MessageOfObj::release_bombed_bullet_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.student_message) - if (_internal_has_student_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.bombed_bullet_message) + if (_internal_has_bombed_bullet_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfStudent* temp = _impl_.message_of_obj_.student_message_; + ::protobuf::MessageOfBombedBullet* temp = _impl_.message_of_obj_.bombed_bullet_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_obj_.student_message_ = nullptr; + _impl_.message_of_obj_.bombed_bullet_message_ = nullptr; return temp; } else @@ -7867,23 +7578,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfStudent& MessageOfObj::_internal_student_message() const + inline const ::protobuf::MessageOfBombedBullet& MessageOfObj::_internal_bombed_bullet_message() const { - return _internal_has_student_message() ? *_impl_.message_of_obj_.student_message_ : reinterpret_cast<::protobuf::MessageOfStudent&>(::protobuf::_MessageOfStudent_default_instance_); + return _internal_has_bombed_bullet_message() ? *_impl_.message_of_obj_.bombed_bullet_message_ : reinterpret_cast<::protobuf::MessageOfBombedBullet&>(::protobuf::_MessageOfBombedBullet_default_instance_); } - inline const ::protobuf::MessageOfStudent& MessageOfObj::student_message() const + inline const ::protobuf::MessageOfBombedBullet& MessageOfObj::bombed_bullet_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.student_message) - return _internal_student_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.bombed_bullet_message) + return _internal_bombed_bullet_message(); } - inline ::protobuf::MessageOfStudent* MessageOfObj::unsafe_arena_release_student_message() + inline ::protobuf::MessageOfBombedBullet* MessageOfObj::unsafe_arena_release_bombed_bullet_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.student_message) - if (_internal_has_student_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.bombed_bullet_message) + if (_internal_has_bombed_bullet_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfStudent* temp = _impl_.message_of_obj_.student_message_; - _impl_.message_of_obj_.student_message_ = nullptr; + ::protobuf::MessageOfBombedBullet* temp = _impl_.message_of_obj_.bombed_bullet_message_; + _impl_.message_of_obj_.bombed_bullet_message_ = nullptr; return temp; } else @@ -7891,69 +7602,69 @@ namespace protobuf return nullptr; } } - inline void MessageOfObj::unsafe_arena_set_allocated_student_message(::protobuf::MessageOfStudent* student_message) + inline void MessageOfObj::unsafe_arena_set_allocated_bombed_bullet_message(::protobuf::MessageOfBombedBullet* bombed_bullet_message) { clear_message_of_obj(); - if (student_message) + if (bombed_bullet_message) { - set_has_student_message(); - _impl_.message_of_obj_.student_message_ = student_message; + set_has_bombed_bullet_message(); + _impl_.message_of_obj_.bombed_bullet_message_ = bombed_bullet_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.student_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.bombed_bullet_message) } - inline ::protobuf::MessageOfStudent* MessageOfObj::_internal_mutable_student_message() + inline ::protobuf::MessageOfBombedBullet* MessageOfObj::_internal_mutable_bombed_bullet_message() { - if (!_internal_has_student_message()) + if (!_internal_has_bombed_bullet_message()) { clear_message_of_obj(); - set_has_student_message(); - _impl_.message_of_obj_.student_message_ = CreateMaybeMessage<::protobuf::MessageOfStudent>(GetArenaForAllocation()); + set_has_bombed_bullet_message(); + _impl_.message_of_obj_.bombed_bullet_message_ = CreateMaybeMessage<::protobuf::MessageOfBombedBullet>(GetArenaForAllocation()); } - return _impl_.message_of_obj_.student_message_; + return _impl_.message_of_obj_.bombed_bullet_message_; } - inline ::protobuf::MessageOfStudent* MessageOfObj::mutable_student_message() + inline ::protobuf::MessageOfBombedBullet* MessageOfObj::mutable_bombed_bullet_message() { - ::protobuf::MessageOfStudent* _msg = _internal_mutable_student_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.student_message) + ::protobuf::MessageOfBombedBullet* _msg = _internal_mutable_bombed_bullet_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.bombed_bullet_message) return _msg; } - // .protobuf.MessageOfTricker tricker_message = 2; - inline bool MessageOfObj::_internal_has_tricker_message() const + // .protobuf.MessageOfClassroom classroom_message = 6; + inline bool MessageOfObj::_internal_has_classroom_message() const { - return message_of_obj_case() == kTrickerMessage; + return message_of_obj_case() == kClassroomMessage; } - inline bool MessageOfObj::has_tricker_message() const + inline bool MessageOfObj::has_classroom_message() const { - return _internal_has_tricker_message(); + return _internal_has_classroom_message(); } - inline void MessageOfObj::set_has_tricker_message() + inline void MessageOfObj::set_has_classroom_message() { - _impl_._oneof_case_[0] = kTrickerMessage; + _impl_._oneof_case_[0] = kClassroomMessage; } - inline void MessageOfObj::clear_tricker_message() + inline void MessageOfObj::clear_classroom_message() { - if (_internal_has_tricker_message()) + if (_internal_has_classroom_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_obj_.tricker_message_; + delete _impl_.message_of_obj_.classroom_message_; } clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfTricker* MessageOfObj::release_tricker_message() + inline ::protobuf::MessageOfClassroom* MessageOfObj::release_classroom_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.tricker_message) - if (_internal_has_tricker_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.classroom_message) + if (_internal_has_classroom_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfTricker* temp = _impl_.message_of_obj_.tricker_message_; + ::protobuf::MessageOfClassroom* temp = _impl_.message_of_obj_.classroom_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_obj_.tricker_message_ = nullptr; + _impl_.message_of_obj_.classroom_message_ = nullptr; return temp; } else @@ -7961,23 +7672,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfTricker& MessageOfObj::_internal_tricker_message() const + inline const ::protobuf::MessageOfClassroom& MessageOfObj::_internal_classroom_message() const { - return _internal_has_tricker_message() ? *_impl_.message_of_obj_.tricker_message_ : reinterpret_cast<::protobuf::MessageOfTricker&>(::protobuf::_MessageOfTricker_default_instance_); + return _internal_has_classroom_message() ? *_impl_.message_of_obj_.classroom_message_ : reinterpret_cast<::protobuf::MessageOfClassroom&>(::protobuf::_MessageOfClassroom_default_instance_); } - inline const ::protobuf::MessageOfTricker& MessageOfObj::tricker_message() const + inline const ::protobuf::MessageOfClassroom& MessageOfObj::classroom_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.tricker_message) - return _internal_tricker_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.classroom_message) + return _internal_classroom_message(); } - inline ::protobuf::MessageOfTricker* MessageOfObj::unsafe_arena_release_tricker_message() + inline ::protobuf::MessageOfClassroom* MessageOfObj::unsafe_arena_release_classroom_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.tricker_message) - if (_internal_has_tricker_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.classroom_message) + if (_internal_has_classroom_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfTricker* temp = _impl_.message_of_obj_.tricker_message_; - _impl_.message_of_obj_.tricker_message_ = nullptr; + ::protobuf::MessageOfClassroom* temp = _impl_.message_of_obj_.classroom_message_; + _impl_.message_of_obj_.classroom_message_ = nullptr; return temp; } else @@ -7985,69 +7696,69 @@ namespace protobuf return nullptr; } } - inline void MessageOfObj::unsafe_arena_set_allocated_tricker_message(::protobuf::MessageOfTricker* tricker_message) + inline void MessageOfObj::unsafe_arena_set_allocated_classroom_message(::protobuf::MessageOfClassroom* classroom_message) { clear_message_of_obj(); - if (tricker_message) + if (classroom_message) { - set_has_tricker_message(); - _impl_.message_of_obj_.tricker_message_ = tricker_message; + set_has_classroom_message(); + _impl_.message_of_obj_.classroom_message_ = classroom_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.tricker_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.classroom_message) } - inline ::protobuf::MessageOfTricker* MessageOfObj::_internal_mutable_tricker_message() + inline ::protobuf::MessageOfClassroom* MessageOfObj::_internal_mutable_classroom_message() { - if (!_internal_has_tricker_message()) + if (!_internal_has_classroom_message()) { clear_message_of_obj(); - set_has_tricker_message(); - _impl_.message_of_obj_.tricker_message_ = CreateMaybeMessage<::protobuf::MessageOfTricker>(GetArenaForAllocation()); + set_has_classroom_message(); + _impl_.message_of_obj_.classroom_message_ = CreateMaybeMessage<::protobuf::MessageOfClassroom>(GetArenaForAllocation()); } - return _impl_.message_of_obj_.tricker_message_; + return _impl_.message_of_obj_.classroom_message_; } - inline ::protobuf::MessageOfTricker* MessageOfObj::mutable_tricker_message() + inline ::protobuf::MessageOfClassroom* MessageOfObj::mutable_classroom_message() { - ::protobuf::MessageOfTricker* _msg = _internal_mutable_tricker_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.tricker_message) + ::protobuf::MessageOfClassroom* _msg = _internal_mutable_classroom_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.classroom_message) return _msg; } - // .protobuf.MessageOfProp prop_message = 3; - inline bool MessageOfObj::_internal_has_prop_message() const + // .protobuf.MessageOfDoor door_message = 7; + inline bool MessageOfObj::_internal_has_door_message() const { - return message_of_obj_case() == kPropMessage; + return message_of_obj_case() == kDoorMessage; } - inline bool MessageOfObj::has_prop_message() const + inline bool MessageOfObj::has_door_message() const { - return _internal_has_prop_message(); + return _internal_has_door_message(); } - inline void MessageOfObj::set_has_prop_message() + inline void MessageOfObj::set_has_door_message() { - _impl_._oneof_case_[0] = kPropMessage; + _impl_._oneof_case_[0] = kDoorMessage; } - inline void MessageOfObj::clear_prop_message() + inline void MessageOfObj::clear_door_message() { - if (_internal_has_prop_message()) + if (_internal_has_door_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_obj_.prop_message_; + delete _impl_.message_of_obj_.door_message_; } clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfProp* MessageOfObj::release_prop_message() + inline ::protobuf::MessageOfDoor* MessageOfObj::release_door_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.prop_message) - if (_internal_has_prop_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.door_message) + if (_internal_has_door_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfProp* temp = _impl_.message_of_obj_.prop_message_; + ::protobuf::MessageOfDoor* temp = _impl_.message_of_obj_.door_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_obj_.prop_message_ = nullptr; + _impl_.message_of_obj_.door_message_ = nullptr; return temp; } else @@ -8055,23 +7766,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfProp& MessageOfObj::_internal_prop_message() const + inline const ::protobuf::MessageOfDoor& MessageOfObj::_internal_door_message() const { - return _internal_has_prop_message() ? *_impl_.message_of_obj_.prop_message_ : reinterpret_cast<::protobuf::MessageOfProp&>(::protobuf::_MessageOfProp_default_instance_); + return _internal_has_door_message() ? *_impl_.message_of_obj_.door_message_ : reinterpret_cast<::protobuf::MessageOfDoor&>(::protobuf::_MessageOfDoor_default_instance_); } - inline const ::protobuf::MessageOfProp& MessageOfObj::prop_message() const + inline const ::protobuf::MessageOfDoor& MessageOfObj::door_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.prop_message) - return _internal_prop_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.door_message) + return _internal_door_message(); } - inline ::protobuf::MessageOfProp* MessageOfObj::unsafe_arena_release_prop_message() + inline ::protobuf::MessageOfDoor* MessageOfObj::unsafe_arena_release_door_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.prop_message) - if (_internal_has_prop_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.door_message) + if (_internal_has_door_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfProp* temp = _impl_.message_of_obj_.prop_message_; - _impl_.message_of_obj_.prop_message_ = nullptr; + ::protobuf::MessageOfDoor* temp = _impl_.message_of_obj_.door_message_; + _impl_.message_of_obj_.door_message_ = nullptr; return temp; } else @@ -8079,69 +7790,69 @@ namespace protobuf return nullptr; } } - inline void MessageOfObj::unsafe_arena_set_allocated_prop_message(::protobuf::MessageOfProp* prop_message) + inline void MessageOfObj::unsafe_arena_set_allocated_door_message(::protobuf::MessageOfDoor* door_message) { clear_message_of_obj(); - if (prop_message) + if (door_message) { - set_has_prop_message(); - _impl_.message_of_obj_.prop_message_ = prop_message; + set_has_door_message(); + _impl_.message_of_obj_.door_message_ = door_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.prop_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.door_message) } - inline ::protobuf::MessageOfProp* MessageOfObj::_internal_mutable_prop_message() + inline ::protobuf::MessageOfDoor* MessageOfObj::_internal_mutable_door_message() { - if (!_internal_has_prop_message()) + if (!_internal_has_door_message()) { clear_message_of_obj(); - set_has_prop_message(); - _impl_.message_of_obj_.prop_message_ = CreateMaybeMessage<::protobuf::MessageOfProp>(GetArenaForAllocation()); + set_has_door_message(); + _impl_.message_of_obj_.door_message_ = CreateMaybeMessage<::protobuf::MessageOfDoor>(GetArenaForAllocation()); } - return _impl_.message_of_obj_.prop_message_; + return _impl_.message_of_obj_.door_message_; } - inline ::protobuf::MessageOfProp* MessageOfObj::mutable_prop_message() + inline ::protobuf::MessageOfDoor* MessageOfObj::mutable_door_message() { - ::protobuf::MessageOfProp* _msg = _internal_mutable_prop_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.prop_message) + ::protobuf::MessageOfDoor* _msg = _internal_mutable_door_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.door_message) return _msg; } - // .protobuf.MessageOfBullet bullet_message = 4; - inline bool MessageOfObj::_internal_has_bullet_message() const + // .protobuf.MessageOfGate gate_message = 8; + inline bool MessageOfObj::_internal_has_gate_message() const { - return message_of_obj_case() == kBulletMessage; + return message_of_obj_case() == kGateMessage; } - inline bool MessageOfObj::has_bullet_message() const + inline bool MessageOfObj::has_gate_message() const { - return _internal_has_bullet_message(); + return _internal_has_gate_message(); } - inline void MessageOfObj::set_has_bullet_message() + inline void MessageOfObj::set_has_gate_message() { - _impl_._oneof_case_[0] = kBulletMessage; + _impl_._oneof_case_[0] = kGateMessage; } - inline void MessageOfObj::clear_bullet_message() + inline void MessageOfObj::clear_gate_message() { - if (_internal_has_bullet_message()) + if (_internal_has_gate_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_obj_.bullet_message_; + delete _impl_.message_of_obj_.gate_message_; } clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfBullet* MessageOfObj::release_bullet_message() + inline ::protobuf::MessageOfGate* MessageOfObj::release_gate_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.bullet_message) - if (_internal_has_bullet_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.gate_message) + if (_internal_has_gate_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfBullet* temp = _impl_.message_of_obj_.bullet_message_; + ::protobuf::MessageOfGate* temp = _impl_.message_of_obj_.gate_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_obj_.bullet_message_ = nullptr; + _impl_.message_of_obj_.gate_message_ = nullptr; return temp; } else @@ -8149,23 +7860,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfBullet& MessageOfObj::_internal_bullet_message() const + inline const ::protobuf::MessageOfGate& MessageOfObj::_internal_gate_message() const { - return _internal_has_bullet_message() ? *_impl_.message_of_obj_.bullet_message_ : reinterpret_cast<::protobuf::MessageOfBullet&>(::protobuf::_MessageOfBullet_default_instance_); + return _internal_has_gate_message() ? *_impl_.message_of_obj_.gate_message_ : reinterpret_cast<::protobuf::MessageOfGate&>(::protobuf::_MessageOfGate_default_instance_); } - inline const ::protobuf::MessageOfBullet& MessageOfObj::bullet_message() const + inline const ::protobuf::MessageOfGate& MessageOfObj::gate_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.bullet_message) - return _internal_bullet_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.gate_message) + return _internal_gate_message(); } - inline ::protobuf::MessageOfBullet* MessageOfObj::unsafe_arena_release_bullet_message() + inline ::protobuf::MessageOfGate* MessageOfObj::unsafe_arena_release_gate_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.bullet_message) - if (_internal_has_bullet_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.gate_message) + if (_internal_has_gate_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfBullet* temp = _impl_.message_of_obj_.bullet_message_; - _impl_.message_of_obj_.bullet_message_ = nullptr; + ::protobuf::MessageOfGate* temp = _impl_.message_of_obj_.gate_message_; + _impl_.message_of_obj_.gate_message_ = nullptr; return temp; } else @@ -8173,69 +7884,69 @@ namespace protobuf return nullptr; } } - inline void MessageOfObj::unsafe_arena_set_allocated_bullet_message(::protobuf::MessageOfBullet* bullet_message) + inline void MessageOfObj::unsafe_arena_set_allocated_gate_message(::protobuf::MessageOfGate* gate_message) { clear_message_of_obj(); - if (bullet_message) + if (gate_message) { - set_has_bullet_message(); - _impl_.message_of_obj_.bullet_message_ = bullet_message; + set_has_gate_message(); + _impl_.message_of_obj_.gate_message_ = gate_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.bullet_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.gate_message) } - inline ::protobuf::MessageOfBullet* MessageOfObj::_internal_mutable_bullet_message() + inline ::protobuf::MessageOfGate* MessageOfObj::_internal_mutable_gate_message() { - if (!_internal_has_bullet_message()) + if (!_internal_has_gate_message()) { clear_message_of_obj(); - set_has_bullet_message(); - _impl_.message_of_obj_.bullet_message_ = CreateMaybeMessage<::protobuf::MessageOfBullet>(GetArenaForAllocation()); + set_has_gate_message(); + _impl_.message_of_obj_.gate_message_ = CreateMaybeMessage<::protobuf::MessageOfGate>(GetArenaForAllocation()); } - return _impl_.message_of_obj_.bullet_message_; + return _impl_.message_of_obj_.gate_message_; } - inline ::protobuf::MessageOfBullet* MessageOfObj::mutable_bullet_message() + inline ::protobuf::MessageOfGate* MessageOfObj::mutable_gate_message() { - ::protobuf::MessageOfBullet* _msg = _internal_mutable_bullet_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.bullet_message) + ::protobuf::MessageOfGate* _msg = _internal_mutable_gate_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.gate_message) return _msg; } - // .protobuf.MessageOfBombedBullet bombed_bullet_message = 5; - inline bool MessageOfObj::_internal_has_bombed_bullet_message() const + // .protobuf.MessageOfChest chest_message = 9; + inline bool MessageOfObj::_internal_has_chest_message() const { - return message_of_obj_case() == kBombedBulletMessage; + return message_of_obj_case() == kChestMessage; } - inline bool MessageOfObj::has_bombed_bullet_message() const + inline bool MessageOfObj::has_chest_message() const { - return _internal_has_bombed_bullet_message(); + return _internal_has_chest_message(); } - inline void MessageOfObj::set_has_bombed_bullet_message() + inline void MessageOfObj::set_has_chest_message() { - _impl_._oneof_case_[0] = kBombedBulletMessage; + _impl_._oneof_case_[0] = kChestMessage; } - inline void MessageOfObj::clear_bombed_bullet_message() + inline void MessageOfObj::clear_chest_message() { - if (_internal_has_bombed_bullet_message()) + if (_internal_has_chest_message()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.message_of_obj_.bombed_bullet_message_; + delete _impl_.message_of_obj_.chest_message_; } clear_has_message_of_obj(); } } - inline ::protobuf::MessageOfBombedBullet* MessageOfObj::release_bombed_bullet_message() + inline ::protobuf::MessageOfChest* MessageOfObj::release_chest_message() { - // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.bombed_bullet_message) - if (_internal_has_bombed_bullet_message()) + // @@protoc_insertion_point(field_release:protobuf.MessageOfObj.chest_message) + if (_internal_has_chest_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfBombedBullet* temp = _impl_.message_of_obj_.bombed_bullet_message_; + ::protobuf::MessageOfChest* temp = _impl_.message_of_obj_.chest_message_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.message_of_obj_.bombed_bullet_message_ = nullptr; + _impl_.message_of_obj_.chest_message_ = nullptr; return temp; } else @@ -8243,23 +7954,23 @@ namespace protobuf return nullptr; } } - inline const ::protobuf::MessageOfBombedBullet& MessageOfObj::_internal_bombed_bullet_message() const + inline const ::protobuf::MessageOfChest& MessageOfObj::_internal_chest_message() const { - return _internal_has_bombed_bullet_message() ? *_impl_.message_of_obj_.bombed_bullet_message_ : reinterpret_cast<::protobuf::MessageOfBombedBullet&>(::protobuf::_MessageOfBombedBullet_default_instance_); + return _internal_has_chest_message() ? *_impl_.message_of_obj_.chest_message_ : reinterpret_cast<::protobuf::MessageOfChest&>(::protobuf::_MessageOfChest_default_instance_); } - inline const ::protobuf::MessageOfBombedBullet& MessageOfObj::bombed_bullet_message() const + inline const ::protobuf::MessageOfChest& MessageOfObj::chest_message() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.bombed_bullet_message) - return _internal_bombed_bullet_message(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfObj.chest_message) + return _internal_chest_message(); } - inline ::protobuf::MessageOfBombedBullet* MessageOfObj::unsafe_arena_release_bombed_bullet_message() + inline ::protobuf::MessageOfChest* MessageOfObj::unsafe_arena_release_chest_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.bombed_bullet_message) - if (_internal_has_bombed_bullet_message()) + // @@protoc_insertion_point(field_unsafe_arena_release:protobuf.MessageOfObj.chest_message) + if (_internal_has_chest_message()) { clear_has_message_of_obj(); - ::protobuf::MessageOfBombedBullet* temp = _impl_.message_of_obj_.bombed_bullet_message_; - _impl_.message_of_obj_.bombed_bullet_message_ = nullptr; + ::protobuf::MessageOfChest* temp = _impl_.message_of_obj_.chest_message_; + _impl_.message_of_obj_.chest_message_ = nullptr; return temp; } else @@ -8267,30 +7978,30 @@ namespace protobuf return nullptr; } } - inline void MessageOfObj::unsafe_arena_set_allocated_bombed_bullet_message(::protobuf::MessageOfBombedBullet* bombed_bullet_message) + inline void MessageOfObj::unsafe_arena_set_allocated_chest_message(::protobuf::MessageOfChest* chest_message) { clear_message_of_obj(); - if (bombed_bullet_message) + if (chest_message) { - set_has_bombed_bullet_message(); - _impl_.message_of_obj_.bombed_bullet_message_ = bombed_bullet_message; + set_has_chest_message(); + _impl_.message_of_obj_.chest_message_ = chest_message; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.bombed_bullet_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageOfObj.chest_message) } - inline ::protobuf::MessageOfBombedBullet* MessageOfObj::_internal_mutable_bombed_bullet_message() + inline ::protobuf::MessageOfChest* MessageOfObj::_internal_mutable_chest_message() { - if (!_internal_has_bombed_bullet_message()) + if (!_internal_has_chest_message()) { clear_message_of_obj(); - set_has_bombed_bullet_message(); - _impl_.message_of_obj_.bombed_bullet_message_ = CreateMaybeMessage<::protobuf::MessageOfBombedBullet>(GetArenaForAllocation()); + set_has_chest_message(); + _impl_.message_of_obj_.chest_message_ = CreateMaybeMessage<::protobuf::MessageOfChest>(GetArenaForAllocation()); } - return _impl_.message_of_obj_.bombed_bullet_message_; + return _impl_.message_of_obj_.chest_message_; } - inline ::protobuf::MessageOfBombedBullet* MessageOfObj::mutable_bombed_bullet_message() + inline ::protobuf::MessageOfChest* MessageOfObj::mutable_chest_message() { - ::protobuf::MessageOfBombedBullet* _msg = _internal_mutable_bombed_bullet_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.bombed_bullet_message) + ::protobuf::MessageOfChest* _msg = _internal_mutable_chest_message(); + // @@protoc_insertion_point(field_mutable:protobuf.MessageOfObj.chest_message) return _msg; } @@ -8580,118 +8291,7 @@ namespace protobuf return _impl_.obj_message_; } - // .protobuf.MessageOfMap map_message = 2; - inline bool MessageToClient::_internal_has_map_message() const - { - return this != internal_default_instance() && _impl_.map_message_ != nullptr; - } - inline bool MessageToClient::has_map_message() const - { - return _internal_has_map_message(); - } - inline void MessageToClient::clear_map_message() - { - if (GetArenaForAllocation() == nullptr && _impl_.map_message_ != nullptr) - { - delete _impl_.map_message_; - } - _impl_.map_message_ = nullptr; - } - inline const ::protobuf::MessageOfMap& MessageToClient::_internal_map_message() const - { - const ::protobuf::MessageOfMap* p = _impl_.map_message_; - return p != nullptr ? *p : reinterpret_cast(::protobuf::_MessageOfMap_default_instance_); - } - inline const ::protobuf::MessageOfMap& MessageToClient::map_message() const - { - // @@protoc_insertion_point(field_get:protobuf.MessageToClient.map_message) - return _internal_map_message(); - } - inline void MessageToClient::unsafe_arena_set_allocated_map_message( - ::protobuf::MessageOfMap* map_message - ) - { - if (GetArenaForAllocation() == nullptr) - { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.map_message_); - } - _impl_.map_message_ = map_message; - if (map_message) - { - } - else - { - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf.MessageToClient.map_message) - } - inline ::protobuf::MessageOfMap* MessageToClient::release_map_message() - { - ::protobuf::MessageOfMap* temp = _impl_.map_message_; - _impl_.map_message_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) - { - delete old; - } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) - { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; - } - inline ::protobuf::MessageOfMap* MessageToClient::unsafe_arena_release_map_message() - { - // @@protoc_insertion_point(field_release:protobuf.MessageToClient.map_message) - - ::protobuf::MessageOfMap* temp = _impl_.map_message_; - _impl_.map_message_ = nullptr; - return temp; - } - inline ::protobuf::MessageOfMap* MessageToClient::_internal_mutable_map_message() - { - if (_impl_.map_message_ == nullptr) - { - auto* p = CreateMaybeMessage<::protobuf::MessageOfMap>(GetArenaForAllocation()); - _impl_.map_message_ = p; - } - return _impl_.map_message_; - } - inline ::protobuf::MessageOfMap* MessageToClient::mutable_map_message() - { - ::protobuf::MessageOfMap* _msg = _internal_mutable_map_message(); - // @@protoc_insertion_point(field_mutable:protobuf.MessageToClient.map_message) - return _msg; - } - inline void MessageToClient::set_allocated_map_message(::protobuf::MessageOfMap* map_message) - { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) - { - delete _impl_.map_message_; - } - 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 - ); - } - } - else - { - } - _impl_.map_message_ = map_message; - // @@protoc_insertion_point(field_set_allocated:protobuf.MessageToClient.map_message) - } - - // .protobuf.GameState game_state = 3; + // .protobuf.GameState game_state = 2; inline void MessageToClient::clear_game_state() { _impl_.game_state_ = 0; @@ -8715,7 +8315,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageToClient.game_state) } - // .protobuf.MessageOfAll all_message = 4; + // .protobuf.MessageOfAll all_message = 3; inline bool MessageToClient::_internal_has_all_message() const { return this != internal_default_instance() && _impl_.all_message_ != nullptr; @@ -9076,8 +8676,6 @@ namespace protobuf // ------------------------------------------------------------------- - // ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) } // namespace protobuf diff --git a/CAPI/cpp/proto/Message2Server.pb.cc b/CAPI/cpp/proto/Message2Server.pb.cc index 8d59963..90f8c2e 100644 --- a/CAPI/cpp/proto/Message2Server.pb.cc +++ b/CAPI/cpp/proto/Message2Server.pb.cc @@ -48,7 +48,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_.time_in_milliseconds_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_.time_in_milliseconds_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}} { } struct MoveMsgDefaultTypeInternal @@ -70,7 +70,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.prop_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.prop_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct PropMsgDefaultTypeInternal @@ -92,7 +92,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.message_)*/ {&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.to_player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.to_player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.message_)*/ {&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.to_player_id_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}} { } struct SendMsgDefaultTypeInternal @@ -114,7 +114,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.angle_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct AttackMsgDefaultTypeInternal @@ -136,7 +136,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}} { } struct IDMsgDefaultTypeInternal @@ -158,7 +158,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.player_type_)*/ 0, /*decltype(_impl_.skill_id_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.skill_id_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct SkillMsgDefaultTypeInternal @@ -189,9 +189,9 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.player_type_), ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.player_type_), PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _impl_.job_type_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _internal_metadata_), @@ -200,7 +200,6 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.player_type_), PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.angle_), PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _impl_.time_in_milliseconds_), ~0u, // no _has_bits_ @@ -210,7 +209,6 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, _impl_.player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, _impl_.player_type_), PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, _impl_.prop_type_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _internal_metadata_), @@ -219,9 +217,7 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.player_type_), PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.to_player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.to_player_type_), PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _impl_.message_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _internal_metadata_), @@ -230,7 +226,6 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.player_type_), PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _impl_.angle_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _internal_metadata_), @@ -239,7 +234,6 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _impl_.player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _impl_.player_type_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _internal_metadata_), ~0u, // no _extensions_ @@ -247,17 +241,16 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _impl_.player_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _impl_.player_type_), PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _impl_.skill_id_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { {0, -1, -1, sizeof(::protobuf::PlayerMsg)}, {11, -1, -1, sizeof(::protobuf::MoveMsg)}, - {21, -1, -1, sizeof(::protobuf::PropMsg)}, - {30, -1, -1, sizeof(::protobuf::SendMsg)}, - {41, -1, -1, sizeof(::protobuf::AttackMsg)}, - {50, -1, -1, sizeof(::protobuf::IDMsg)}, - {58, -1, -1, sizeof(::protobuf::SkillMsg)}, + {20, -1, -1, sizeof(::protobuf::PropMsg)}, + {28, -1, -1, sizeof(::protobuf::SendMsg)}, + {37, -1, -1, sizeof(::protobuf::AttackMsg)}, + {45, -1, -1, sizeof(::protobuf::IDMsg)}, + {52, -1, -1, sizeof(::protobuf::SkillMsg)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -273,27 +266,19 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_Message2Server_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\024Message2Server.proto\022\010protobuf\032\021Messag" "eType.proto\"\263\001\n\tPlayerMsg\022\021\n\tplayer_id\030\001" - " \001(\003\022)\n\013player_type\030\002 \001(\0162\024.protobuf.Pla" - "yerType\022-\n\014student_type\030\003 \001(\0162\025.protobuf" - ".StudentTypeH\000\022-\n\014tricker_type\030\004 \001(\0162\025.p" - "rotobuf.TrickerTypeH\000B\n\n\010job_type\"t\n\007Mov" - "eMsg\022\021\n\tplayer_id\030\001 \001(\003\022)\n\013player_type\030\002" - " \001(\0162\024.protobuf.PlayerType\022\r\n\005angle\030\003 \001(" - "\001\022\034\n\024time_in_milliseconds\030\004 \001(\003\"n\n\007PropM" - "sg\022\021\n\tplayer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001" - "(\0162\024.protobuf.PlayerType\022%\n\tprop_type\030\003 " - "\001(\0162\022.protobuf.PropType\"\234\001\n\007SendMsg\022\021\n\tp" - "layer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001(\0162\024.pr" - "otobuf.PlayerType\022\024\n\014to_player_id\030\003 \001(\003\022" - ",\n\016to_player_type\030\004 \001(\0162\024.protobuf.Playe" - "rType\022\017\n\007message\030\005 \001(\t\"X\n\tAttackMsg\022\021\n\tp" - "layer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001(\0162\024.pr" - "otobuf.PlayerType\022\r\n\005angle\030\003 \001(\001\"E\n\005IDMs" - "g\022\021\n\tplayer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001(" - "\0162\024.protobuf.PlayerType\"Z\n\010SkillMsg\022\021\n\tp" - "layer_id\030\001 \001(\003\022)\n\013player_type\030\002 \001(\0162\024.pr" - "otobuf.PlayerType\022\020\n\010skill_id\030\003 \001(\005b\006pro" - "to3"; + " \001(\003\022-\n\014student_type\030\002 \001(\0162\025.protobuf.St" + "udentTypeH\000\022-\n\014tricker_type\030\003 \001(\0162\025.prot" + "obuf.TrickerTypeH\000\022)\n\013player_type\030\004 \001(\0162" + "\024.protobuf.PlayerTypeB\n\n\010job_type\"I\n\007Mov" + "eMsg\022\021\n\tplayer_id\030\001 \001(\003\022\r\n\005angle\030\002 \001(\001\022\034" + "\n\024time_in_milliseconds\030\003 \001(\003\"C\n\007PropMsg\022" + "\021\n\tplayer_id\030\001 \001(\003\022%\n\tprop_type\030\002 \001(\0162\022." + "protobuf.PropType\"C\n\007SendMsg\022\021\n\tplayer_i" + "d\030\001 \001(\003\022\024\n\014to_player_id\030\002 \001(\003\022\017\n\007message" + "\030\003 \001(\t\"-\n\tAttackMsg\022\021\n\tplayer_id\030\001 \001(\003\022\r" + "\n\005angle\030\002 \001(\001\"\032\n\005IDMsg\022\021\n\tplayer_id\030\001 \001(" + "\003\"/\n\010SkillMsg\022\021\n\tplayer_id\030\001 \001(\003\022\020\n\010skil" + "l_id\030\002 \001(\005b\006proto3"; static const ::_pbi::DescriptorTable* const descriptor_table_Message2Server_2eproto_deps[1] = { &::descriptor_table_MessageType_2eproto, }; @@ -301,7 +286,7 @@ static ::_pbi::once_flag descriptor_table_Message2Server_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Message2Server_2eproto = { false, false, - 883, + 578, descriptor_table_protodef_Message2Server_2eproto, "Message2Server.proto", &descriptor_table_Message2Server_2eproto_once, @@ -461,35 +446,35 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType player_type = 2; + // .protobuf.StudentType student_type = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); + _internal_set_student_type(static_cast<::protobuf::StudentType>(val)); } else goto handle_unusual; continue; - // .protobuf.StudentType student_type = 3; + // .protobuf.TrickerType tricker_type = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_student_type(static_cast<::protobuf::StudentType>(val)); + _internal_set_tricker_type(static_cast<::protobuf::TrickerType>(val)); } else goto handle_unusual; continue; - // .protobuf.TrickerType tricker_type = 4; + // .protobuf.PlayerType player_type = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_tricker_type(static_cast<::protobuf::TrickerType>(val)); + _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); } else goto handle_unusual; @@ -535,30 +520,30 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) + // .protobuf.StudentType student_type = 2; + if (_internal_has_student_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_player_type(), target + 2, this->_internal_student_type(), target ); } - // .protobuf.StudentType student_type = 3; - if (_internal_has_student_type()) + // .protobuf.TrickerType tricker_type = 3; + if (_internal_has_tricker_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_student_type(), target + 3, this->_internal_tricker_type(), target ); } - // .protobuf.TrickerType tricker_type = 4; - if (_internal_has_tricker_type()) + // .protobuf.PlayerType player_type = 4; + if (this->_internal_player_type() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_tricker_type(), target + 4, this->_internal_player_type(), target ); } @@ -587,7 +572,7 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // .protobuf.PlayerType player_type = 2; + // .protobuf.PlayerType player_type = 4; if (this->_internal_player_type() != 0) { total_size += 1 + @@ -596,14 +581,14 @@ namespace protobuf switch (job_type_case()) { - // .protobuf.StudentType student_type = 3; + // .protobuf.StudentType student_type = 2; case kStudentType: { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_student_type()); break; } - // .protobuf.TrickerType tricker_type = 4; + // .protobuf.TrickerType tricker_type = 3; case kTrickerType: { total_size += 1 + @@ -716,10 +701,10 @@ namespace protobuf MoveMsg* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, decltype(_impl_.time_in_milliseconds_){}, decltype(_impl_.player_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, decltype(_impl_.time_in_milliseconds_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.player_type_)); + ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.time_in_milliseconds_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.time_in_milliseconds_)); // @@protoc_insertion_point(copy_constructor:protobuf.MoveMsg) } @@ -730,7 +715,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, decltype(_impl_.time_in_milliseconds_){int64_t{0}}, decltype(_impl_.player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, decltype(_impl_.time_in_milliseconds_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}}; } MoveMsg::~MoveMsg() @@ -761,7 +746,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.player_type_)); + ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.time_in_milliseconds_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.time_in_milliseconds_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -786,20 +771,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType player_type = 2; + // double angle = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) - { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); - } - else - goto handle_unusual; - continue; - // double angle = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 25)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { _impl_.angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(double); @@ -807,9 +781,9 @@ namespace protobuf else goto handle_unusual; continue; - // int64 time_in_milliseconds = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) + // int64 time_in_milliseconds = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { _impl_.time_in_milliseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); @@ -858,16 +832,7 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_player_type(), target - ); - } - - // double angle = 3; + // double angle = 2; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_angle = this->_internal_angle(); uint64_t raw_angle; @@ -875,14 +840,14 @@ namespace protobuf if (raw_angle != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_angle(), target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_angle(), target); } - // int64 time_in_milliseconds = 4; + // int64 time_in_milliseconds = 3; if (this->_internal_time_in_milliseconds() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_time_in_milliseconds(), target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_time_in_milliseconds(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -910,7 +875,7 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // double angle = 3; + // double angle = 2; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_angle = this->_internal_angle(); uint64_t raw_angle; @@ -920,19 +885,12 @@ namespace protobuf total_size += 1 + 8; } - // int64 time_in_milliseconds = 4; + // int64 time_in_milliseconds = 3; if (this->_internal_time_in_milliseconds() != 0) { total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_time_in_milliseconds()); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type()); - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -969,10 +927,6 @@ namespace protobuf { _this->_internal_set_time_in_milliseconds(from._internal_time_in_milliseconds()); } - if (from._internal_player_type() != 0) - { - _this->_internal_set_player_type(from._internal_player_type()); - } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -995,7 +949,7 @@ namespace protobuf using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.player_type_) + sizeof(MoveMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.player_id_)>( + PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.time_in_milliseconds_) + sizeof(MoveMsg::_impl_.time_in_milliseconds_) - PROTOBUF_FIELD_OFFSET(MoveMsg, _impl_.player_id_)>( reinterpret_cast(&_impl_.player_id_), reinterpret_cast(&other->_impl_.player_id_) ); @@ -1027,7 +981,7 @@ namespace protobuf PropMsg* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.prop_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){}, decltype(_impl_.prop_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.prop_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.prop_type_)); @@ -1041,7 +995,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.prop_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.prop_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } PropMsg::~PropMsg() @@ -1097,20 +1051,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType player_type = 2; + // .protobuf.PropType prop_type = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) - { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); - } - else - goto handle_unusual; - continue; - // .protobuf.PropType prop_type = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); @@ -1160,21 +1103,12 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_player_type(), target - ); - } - - // .protobuf.PropType prop_type = 3; + // .protobuf.PropType prop_type = 2; if (this->_internal_prop_type() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_prop_type(), target + 2, this->_internal_prop_type(), target ); } @@ -1203,14 +1137,7 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type()); - } - - // .protobuf.PropType prop_type = 3; + // .protobuf.PropType prop_type = 2; if (this->_internal_prop_type() != 0) { total_size += 1 + @@ -1241,10 +1168,6 @@ namespace protobuf { _this->_internal_set_player_id(from._internal_player_id()); } - if (from._internal_player_type() != 0) - { - _this->_internal_set_player_type(from._internal_player_type()); - } if (from._internal_prop_type() != 0) { _this->_internal_set_prop_type(from._internal_prop_type()); @@ -1303,7 +1226,7 @@ namespace protobuf SendMsg* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.message_){}, decltype(_impl_.player_id_){}, decltype(_impl_.to_player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.to_player_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.message_){}, decltype(_impl_.player_id_){}, decltype(_impl_.to_player_id_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_.message_.InitDefault(); @@ -1314,7 +1237,7 @@ namespace protobuf { _this->_impl_.message_.Set(from._internal_message(), _this->GetArenaForAllocation()); } - ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.to_player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.to_player_type_)); + ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.to_player_id_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.to_player_id_)); // @@protoc_insertion_point(copy_constructor:protobuf.SendMsg) } @@ -1325,7 +1248,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.message_){}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.to_player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.to_player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.message_){}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.to_player_id_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}}; _impl_.message_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.message_.Set("", GetArenaForAllocation()); @@ -1362,7 +1285,7 @@ namespace protobuf (void)cached_has_bits; _impl_.message_.ClearToEmpty(); - ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.to_player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.to_player_type_)); + ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.to_player_id_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.to_player_id_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1387,20 +1310,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType player_type = 2; + // int64 to_player_id = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) - { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); - } - else - goto handle_unusual; - continue; - // int64 to_player_id = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { _impl_.to_player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); @@ -1408,20 +1320,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType to_player_type = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) - { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_to_player_type(static_cast<::protobuf::PlayerType>(val)); - } - else - goto handle_unusual; - continue; - // string message = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) + // string message = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { auto str = _internal_mutable_message(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); @@ -1472,39 +1373,21 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_player_type(), target - ); - } - - // int64 to_player_id = 3; + // int64 to_player_id = 2; if (this->_internal_to_player_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_to_player_id(), target); - } - - // .protobuf.PlayerType to_player_type = 4; - if (this->_internal_to_player_type() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_to_player_type(), target - ); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_to_player_id(), target); } - // string message = 5; + // string message = 3; if (!this->_internal_message().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_message().data(), static_cast(this->_internal_message().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "protobuf.SendMsg.message" ); target = stream->WriteStringMaybeAliased( - 5, this->_internal_message(), target + 3, this->_internal_message(), target ); } @@ -1527,7 +1410,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - // string message = 5; + // string message = 3; if (!this->_internal_message().empty()) { total_size += 1 + @@ -1542,26 +1425,12 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // int64 to_player_id = 3; + // int64 to_player_id = 2; if (this->_internal_to_player_id() != 0) { total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_to_player_id()); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type()); - } - - // .protobuf.PlayerType to_player_type = 4; - if (this->_internal_to_player_type() != 0) - { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_to_player_type()); - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -1594,14 +1463,6 @@ namespace protobuf { _this->_internal_set_to_player_id(from._internal_to_player_id()); } - if (from._internal_player_type() != 0) - { - _this->_internal_set_player_type(from._internal_player_type()); - } - if (from._internal_to_player_type() != 0) - { - _this->_internal_set_to_player_type(from._internal_to_player_type()); - } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -1629,7 +1490,7 @@ namespace protobuf &_impl_.message_, lhs_arena, &other->_impl_.message_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.to_player_type_) + sizeof(SendMsg::_impl_.to_player_type_) - PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.player_id_)>( + PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.to_player_id_) + sizeof(SendMsg::_impl_.to_player_id_) - PROTOBUF_FIELD_OFFSET(SendMsg, _impl_.player_id_)>( reinterpret_cast(&_impl_.player_id_), reinterpret_cast(&other->_impl_.player_id_) ); @@ -1661,10 +1522,10 @@ namespace protobuf AttackMsg* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, decltype(_impl_.player_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){}, decltype(_impl_.angle_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.player_type_)); + ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.angle_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.angle_)); // @@protoc_insertion_point(copy_constructor:protobuf.AttackMsg) } @@ -1675,7 +1536,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, decltype(_impl_.player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.angle_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } AttackMsg::~AttackMsg() @@ -1706,7 +1567,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.player_type_)); + ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.angle_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.angle_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1731,20 +1592,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType player_type = 2; + // double angle = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) - { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); - } - else - goto handle_unusual; - continue; - // double angle = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 25)) + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { _impl_.angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(double); @@ -1793,16 +1643,7 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_player_type(), target - ); - } - - // double angle = 3; + // double angle = 2; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_angle = this->_internal_angle(); uint64_t raw_angle; @@ -1810,7 +1651,7 @@ namespace protobuf if (raw_angle != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_angle(), target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_angle(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -1838,7 +1679,7 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // double angle = 3; + // double angle = 2; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_angle = this->_internal_angle(); uint64_t raw_angle; @@ -1848,13 +1689,6 @@ namespace protobuf total_size += 1 + 8; } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type()); - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -1887,10 +1721,6 @@ namespace protobuf { _this->_internal_set_angle(from._internal_angle()); } - if (from._internal_player_type() != 0) - { - _this->_internal_set_player_type(from._internal_player_type()); - } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -1913,7 +1743,7 @@ namespace protobuf using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.player_type_) + sizeof(AttackMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.player_id_)>( + PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.angle_) + sizeof(AttackMsg::_impl_.angle_) - PROTOBUF_FIELD_OFFSET(AttackMsg, _impl_.player_id_)>( reinterpret_cast(&_impl_.player_id_), reinterpret_cast(&other->_impl_.player_id_) ); @@ -1945,10 +1775,10 @@ namespace protobuf IDMsg* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.player_type_)); + _this->_impl_.player_id_ = from._impl_.player_id_; // @@protoc_insertion_point(copy_constructor:protobuf.IDMsg) } @@ -1959,7 +1789,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}}; } IDMsg::~IDMsg() @@ -1990,7 +1820,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.player_type_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.player_type_)); + _impl_.player_id_ = int64_t{0}; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2015,17 +1845,6 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType player_type = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) - { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); - } - else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -2067,15 +1886,6 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_player_type(), target - ); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -2101,13 +1911,6 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type()); - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -2132,10 +1935,6 @@ namespace protobuf { _this->_internal_set_player_id(from._internal_player_id()); } - if (from._internal_player_type() != 0) - { - _this->_internal_set_player_type(from._internal_player_type()); - } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2157,11 +1956,7 @@ namespace protobuf { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(IDMsg, _impl_.player_type_) + sizeof(IDMsg::_impl_.player_type_) - PROTOBUF_FIELD_OFFSET(IDMsg, _impl_.player_id_)>( - reinterpret_cast(&_impl_.player_id_), - reinterpret_cast(&other->_impl_.player_id_) - ); + swap(_impl_.player_id_, other->_impl_.player_id_); } ::PROTOBUF_NAMESPACE_ID::Metadata IDMsg::GetMetadata() const @@ -2190,7 +1985,7 @@ namespace protobuf SkillMsg* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){}, decltype(_impl_.player_type_){}, decltype(_impl_.skill_id_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){}, decltype(_impl_.skill_id_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.skill_id_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.skill_id_)); @@ -2204,7 +1999,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.player_type_){0}, decltype(_impl_.skill_id_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.skill_id_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } SkillMsg::~SkillMsg() @@ -2260,20 +2055,9 @@ namespace protobuf else goto handle_unusual; continue; - // .protobuf.PlayerType player_type = 2; + // int32 skill_id = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) - { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_player_type(static_cast<::protobuf::PlayerType>(val)); - } - else - goto handle_unusual; - continue; - // int32 skill_id = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { _impl_.skill_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); @@ -2322,20 +2106,11 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_player_type(), target - ); - } - - // int32 skill_id = 3; + // int32 skill_id = 2; if (this->_internal_skill_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_skill_id(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_skill_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -2363,14 +2138,7 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } - // .protobuf.PlayerType player_type = 2; - if (this->_internal_player_type() != 0) - { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_player_type()); - } - - // int32 skill_id = 3; + // int32 skill_id = 2; if (this->_internal_skill_id() != 0) { total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_skill_id()); @@ -2400,10 +2168,6 @@ namespace protobuf { _this->_internal_set_player_id(from._internal_player_id()); } - if (from._internal_player_type() != 0) - { - _this->_internal_set_player_type(from._internal_player_type()); - } if (from._internal_skill_id() != 0) { _this->_internal_set_skill_id(from._internal_skill_id()); diff --git a/CAPI/cpp/proto/Message2Server.pb.h b/CAPI/cpp/proto/Message2Server.pb.h index 1ad4a82..3a8896f 100644 --- a/CAPI/cpp/proto/Message2Server.pb.h +++ b/CAPI/cpp/proto/Message2Server.pb.h @@ -153,8 +153,8 @@ namespace protobuf } enum JobTypeCase { - kStudentType = 3, - kTrickerType = 4, + kStudentType = 2, + kTrickerType = 3, JOB_TYPE_NOT_SET = 0, }; @@ -258,9 +258,9 @@ namespace protobuf enum : int { kPlayerIdFieldNumber = 1, - kPlayerTypeFieldNumber = 2, - kStudentTypeFieldNumber = 3, - kTrickerTypeFieldNumber = 4, + kPlayerTypeFieldNumber = 4, + kStudentTypeFieldNumber = 2, + kTrickerTypeFieldNumber = 3, }; // int64 player_id = 1; void clear_player_id(); @@ -272,7 +272,7 @@ namespace protobuf void _internal_set_player_id(int64_t value); public: - // .protobuf.PlayerType player_type = 2; + // .protobuf.PlayerType player_type = 4; void clear_player_type(); ::protobuf::PlayerType player_type() const; void set_player_type(::protobuf::PlayerType value); @@ -282,7 +282,7 @@ namespace protobuf void _internal_set_player_type(::protobuf::PlayerType value); public: - // .protobuf.StudentType student_type = 3; + // .protobuf.StudentType student_type = 2; bool has_student_type() const; private: @@ -298,7 +298,7 @@ namespace protobuf void _internal_set_student_type(::protobuf::StudentType value); public: - // .protobuf.TrickerType tricker_type = 4; + // .protobuf.TrickerType tricker_type = 3; bool has_tricker_type() const; private: @@ -514,9 +514,8 @@ namespace protobuf enum : int { kPlayerIdFieldNumber = 1, - kAngleFieldNumber = 3, - kTimeInMillisecondsFieldNumber = 4, - kPlayerTypeFieldNumber = 2, + kAngleFieldNumber = 2, + kTimeInMillisecondsFieldNumber = 3, }; // int64 player_id = 1; void clear_player_id(); @@ -528,7 +527,7 @@ namespace protobuf void _internal_set_player_id(int64_t value); public: - // double angle = 3; + // double angle = 2; void clear_angle(); double angle() const; void set_angle(double value); @@ -538,7 +537,7 @@ namespace protobuf void _internal_set_angle(double value); public: - // int64 time_in_milliseconds = 4; + // int64 time_in_milliseconds = 3; void clear_time_in_milliseconds(); int64_t time_in_milliseconds() const; void set_time_in_milliseconds(int64_t value); @@ -547,16 +546,6 @@ namespace protobuf int64_t _internal_time_in_milliseconds() const; void _internal_set_time_in_milliseconds(int64_t value); - public: - // .protobuf.PlayerType player_type = 2; - void clear_player_type(); - ::protobuf::PlayerType player_type() const; - void set_player_type(::protobuf::PlayerType value); - - private: - ::protobuf::PlayerType _internal_player_type() const; - void _internal_set_player_type(::protobuf::PlayerType value); - public: // @@protoc_insertion_point(class_scope:protobuf.MoveMsg) @@ -572,7 +561,6 @@ namespace protobuf int64_t player_id_; double angle_; int64_t time_in_milliseconds_; - int player_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -742,8 +730,7 @@ namespace protobuf enum : int { kPlayerIdFieldNumber = 1, - kPlayerTypeFieldNumber = 2, - kPropTypeFieldNumber = 3, + kPropTypeFieldNumber = 2, }; // int64 player_id = 1; void clear_player_id(); @@ -755,17 +742,7 @@ namespace protobuf void _internal_set_player_id(int64_t value); public: - // .protobuf.PlayerType player_type = 2; - void clear_player_type(); - ::protobuf::PlayerType player_type() const; - void set_player_type(::protobuf::PlayerType value); - - private: - ::protobuf::PlayerType _internal_player_type() const; - void _internal_set_player_type(::protobuf::PlayerType value); - - public: - // .protobuf.PropType prop_type = 3; + // .protobuf.PropType prop_type = 2; void clear_prop_type(); ::protobuf::PropType prop_type() const; void set_prop_type(::protobuf::PropType value); @@ -787,7 +764,6 @@ namespace protobuf struct Impl_ { int64_t player_id_; - int player_type_; int prop_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; @@ -957,13 +933,11 @@ namespace protobuf enum : int { - kMessageFieldNumber = 5, + kMessageFieldNumber = 3, kPlayerIdFieldNumber = 1, - kToPlayerIdFieldNumber = 3, - kPlayerTypeFieldNumber = 2, - kToPlayerTypeFieldNumber = 4, + kToPlayerIdFieldNumber = 2, }; - // string message = 5; + // string message = 3; void clear_message(); const std::string& message() const; template @@ -988,7 +962,7 @@ namespace protobuf void _internal_set_player_id(int64_t value); public: - // int64 to_player_id = 3; + // int64 to_player_id = 2; void clear_to_player_id(); int64_t to_player_id() const; void set_to_player_id(int64_t value); @@ -997,26 +971,6 @@ namespace protobuf int64_t _internal_to_player_id() const; void _internal_set_to_player_id(int64_t value); - public: - // .protobuf.PlayerType player_type = 2; - void clear_player_type(); - ::protobuf::PlayerType player_type() const; - void set_player_type(::protobuf::PlayerType value); - - private: - ::protobuf::PlayerType _internal_player_type() const; - void _internal_set_player_type(::protobuf::PlayerType value); - - public: - // .protobuf.PlayerType to_player_type = 4; - void clear_to_player_type(); - ::protobuf::PlayerType to_player_type() const; - void set_to_player_type(::protobuf::PlayerType value); - - private: - ::protobuf::PlayerType _internal_to_player_type() const; - void _internal_set_to_player_type(::protobuf::PlayerType value); - public: // @@protoc_insertion_point(class_scope:protobuf.SendMsg) @@ -1032,8 +986,6 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_; int64_t player_id_; int64_t to_player_id_; - int player_type_; - int to_player_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -1203,8 +1155,7 @@ namespace protobuf enum : int { kPlayerIdFieldNumber = 1, - kAngleFieldNumber = 3, - kPlayerTypeFieldNumber = 2, + kAngleFieldNumber = 2, }; // int64 player_id = 1; void clear_player_id(); @@ -1216,7 +1167,7 @@ namespace protobuf void _internal_set_player_id(int64_t value); public: - // double angle = 3; + // double angle = 2; void clear_angle(); double angle() const; void set_angle(double value); @@ -1225,16 +1176,6 @@ namespace protobuf double _internal_angle() const; void _internal_set_angle(double value); - public: - // .protobuf.PlayerType player_type = 2; - void clear_player_type(); - ::protobuf::PlayerType player_type() const; - void set_player_type(::protobuf::PlayerType value); - - private: - ::protobuf::PlayerType _internal_player_type() const; - void _internal_set_player_type(::protobuf::PlayerType value); - public: // @@protoc_insertion_point(class_scope:protobuf.AttackMsg) @@ -1249,7 +1190,6 @@ namespace protobuf { int64_t player_id_; double angle_; - int player_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -1419,7 +1359,6 @@ namespace protobuf enum : int { kPlayerIdFieldNumber = 1, - kPlayerTypeFieldNumber = 2, }; // int64 player_id = 1; void clear_player_id(); @@ -1430,16 +1369,6 @@ namespace protobuf int64_t _internal_player_id() const; void _internal_set_player_id(int64_t value); - public: - // .protobuf.PlayerType player_type = 2; - void clear_player_type(); - ::protobuf::PlayerType player_type() const; - void set_player_type(::protobuf::PlayerType value); - - private: - ::protobuf::PlayerType _internal_player_type() const; - void _internal_set_player_type(::protobuf::PlayerType value); - public: // @@protoc_insertion_point(class_scope:protobuf.IDMsg) @@ -1453,7 +1382,6 @@ namespace protobuf struct Impl_ { int64_t player_id_; - int player_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -1623,8 +1551,7 @@ namespace protobuf enum : int { kPlayerIdFieldNumber = 1, - kPlayerTypeFieldNumber = 2, - kSkillIdFieldNumber = 3, + kSkillIdFieldNumber = 2, }; // int64 player_id = 1; void clear_player_id(); @@ -1636,17 +1563,7 @@ namespace protobuf void _internal_set_player_id(int64_t value); public: - // .protobuf.PlayerType player_type = 2; - void clear_player_type(); - ::protobuf::PlayerType player_type() const; - void set_player_type(::protobuf::PlayerType value); - - private: - ::protobuf::PlayerType _internal_player_type() const; - void _internal_set_player_type(::protobuf::PlayerType value); - - public: - // int32 skill_id = 3; + // int32 skill_id = 2; void clear_skill_id(); int32_t skill_id() const; void set_skill_id(int32_t value); @@ -1668,7 +1585,6 @@ namespace protobuf struct Impl_ { int64_t player_id_; - int player_type_; int32_t skill_id_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; @@ -1712,31 +1628,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.PlayerMsg.player_id) } - // .protobuf.PlayerType player_type = 2; - inline void PlayerMsg::clear_player_type() - { - _impl_.player_type_ = 0; - } - inline ::protobuf::PlayerType PlayerMsg::_internal_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.player_type_); - } - inline ::protobuf::PlayerType PlayerMsg::player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.PlayerMsg.player_type) - return _internal_player_type(); - } - inline void PlayerMsg::_internal_set_player_type(::protobuf::PlayerType value) - { - _impl_.player_type_ = value; - } - inline void PlayerMsg::set_player_type(::protobuf::PlayerType value) - { - _internal_set_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.PlayerMsg.player_type) - } - - // .protobuf.StudentType student_type = 3; + // .protobuf.StudentType student_type = 2; inline bool PlayerMsg::_internal_has_student_type() const { return job_type_case() == kStudentType; @@ -1785,7 +1677,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.PlayerMsg.student_type) } - // .protobuf.TrickerType tricker_type = 4; + // .protobuf.TrickerType tricker_type = 3; inline bool PlayerMsg::_internal_has_tricker_type() const { return job_type_case() == kTrickerType; @@ -1834,6 +1726,30 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.PlayerMsg.tricker_type) } + // .protobuf.PlayerType player_type = 4; + inline void PlayerMsg::clear_player_type() + { + _impl_.player_type_ = 0; + } + inline ::protobuf::PlayerType PlayerMsg::_internal_player_type() const + { + return static_cast<::protobuf::PlayerType>(_impl_.player_type_); + } + inline ::protobuf::PlayerType PlayerMsg::player_type() const + { + // @@protoc_insertion_point(field_get:protobuf.PlayerMsg.player_type) + return _internal_player_type(); + } + inline void PlayerMsg::_internal_set_player_type(::protobuf::PlayerType value) + { + _impl_.player_type_ = value; + } + inline void PlayerMsg::set_player_type(::protobuf::PlayerType value) + { + _internal_set_player_type(value); + // @@protoc_insertion_point(field_set:protobuf.PlayerMsg.player_type) + } + inline bool PlayerMsg::has_job_type() const { return job_type_case() != JOB_TYPE_NOT_SET; @@ -1874,31 +1790,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MoveMsg.player_id) } - // .protobuf.PlayerType player_type = 2; - inline void MoveMsg::clear_player_type() - { - _impl_.player_type_ = 0; - } - inline ::protobuf::PlayerType MoveMsg::_internal_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.player_type_); - } - inline ::protobuf::PlayerType MoveMsg::player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.MoveMsg.player_type) - return _internal_player_type(); - } - inline void MoveMsg::_internal_set_player_type(::protobuf::PlayerType value) - { - _impl_.player_type_ = value; - } - inline void MoveMsg::set_player_type(::protobuf::PlayerType value) - { - _internal_set_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.MoveMsg.player_type) - } - - // double angle = 3; + // double angle = 2; inline void MoveMsg::clear_angle() { _impl_.angle_ = 0; @@ -1922,7 +1814,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MoveMsg.angle) } - // int64 time_in_milliseconds = 4; + // int64 time_in_milliseconds = 3; inline void MoveMsg::clear_time_in_milliseconds() { _impl_.time_in_milliseconds_ = int64_t{0}; @@ -1974,31 +1866,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.PropMsg.player_id) } - // .protobuf.PlayerType player_type = 2; - inline void PropMsg::clear_player_type() - { - _impl_.player_type_ = 0; - } - inline ::protobuf::PlayerType PropMsg::_internal_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.player_type_); - } - inline ::protobuf::PlayerType PropMsg::player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.PropMsg.player_type) - return _internal_player_type(); - } - inline void PropMsg::_internal_set_player_type(::protobuf::PlayerType value) - { - _impl_.player_type_ = value; - } - inline void PropMsg::set_player_type(::protobuf::PlayerType value) - { - _internal_set_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.PropMsg.player_type) - } - - // .protobuf.PropType prop_type = 3; + // .protobuf.PropType prop_type = 2; inline void PropMsg::clear_prop_type() { _impl_.prop_type_ = 0; @@ -2050,31 +1918,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.SendMsg.player_id) } - // .protobuf.PlayerType player_type = 2; - inline void SendMsg::clear_player_type() - { - _impl_.player_type_ = 0; - } - inline ::protobuf::PlayerType SendMsg::_internal_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.player_type_); - } - inline ::protobuf::PlayerType SendMsg::player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.SendMsg.player_type) - return _internal_player_type(); - } - inline void SendMsg::_internal_set_player_type(::protobuf::PlayerType value) - { - _impl_.player_type_ = value; - } - inline void SendMsg::set_player_type(::protobuf::PlayerType value) - { - _internal_set_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.SendMsg.player_type) - } - - // int64 to_player_id = 3; + // int64 to_player_id = 2; inline void SendMsg::clear_to_player_id() { _impl_.to_player_id_ = int64_t{0}; @@ -2098,31 +1942,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.SendMsg.to_player_id) } - // .protobuf.PlayerType to_player_type = 4; - inline void SendMsg::clear_to_player_type() - { - _impl_.to_player_type_ = 0; - } - inline ::protobuf::PlayerType SendMsg::_internal_to_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.to_player_type_); - } - inline ::protobuf::PlayerType SendMsg::to_player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.SendMsg.to_player_type) - return _internal_to_player_type(); - } - inline void SendMsg::_internal_set_to_player_type(::protobuf::PlayerType value) - { - _impl_.to_player_type_ = value; - } - inline void SendMsg::set_to_player_type(::protobuf::PlayerType value) - { - _internal_set_to_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.SendMsg.to_player_type) - } - - // string message = 5; + // string message = 3; inline void SendMsg::clear_message() { _impl_.message_.ClearToEmpty(); @@ -2207,31 +2027,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.AttackMsg.player_id) } - // .protobuf.PlayerType player_type = 2; - inline void AttackMsg::clear_player_type() - { - _impl_.player_type_ = 0; - } - inline ::protobuf::PlayerType AttackMsg::_internal_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.player_type_); - } - inline ::protobuf::PlayerType AttackMsg::player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.AttackMsg.player_type) - return _internal_player_type(); - } - inline void AttackMsg::_internal_set_player_type(::protobuf::PlayerType value) - { - _impl_.player_type_ = value; - } - inline void AttackMsg::set_player_type(::protobuf::PlayerType value) - { - _internal_set_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.AttackMsg.player_type) - } - - // double angle = 3; + // double angle = 2; inline void AttackMsg::clear_angle() { _impl_.angle_ = 0; @@ -2283,30 +2079,6 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.IDMsg.player_id) } - // .protobuf.PlayerType player_type = 2; - inline void IDMsg::clear_player_type() - { - _impl_.player_type_ = 0; - } - inline ::protobuf::PlayerType IDMsg::_internal_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.player_type_); - } - inline ::protobuf::PlayerType IDMsg::player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.IDMsg.player_type) - return _internal_player_type(); - } - inline void IDMsg::_internal_set_player_type(::protobuf::PlayerType value) - { - _impl_.player_type_ = value; - } - inline void IDMsg::set_player_type(::protobuf::PlayerType value) - { - _internal_set_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.IDMsg.player_type) - } - // ------------------------------------------------------------------- // SkillMsg @@ -2335,31 +2107,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.SkillMsg.player_id) } - // .protobuf.PlayerType player_type = 2; - inline void SkillMsg::clear_player_type() - { - _impl_.player_type_ = 0; - } - inline ::protobuf::PlayerType SkillMsg::_internal_player_type() const - { - return static_cast<::protobuf::PlayerType>(_impl_.player_type_); - } - inline ::protobuf::PlayerType SkillMsg::player_type() const - { - // @@protoc_insertion_point(field_get:protobuf.SkillMsg.player_type) - return _internal_player_type(); - } - inline void SkillMsg::_internal_set_player_type(::protobuf::PlayerType value) - { - _impl_.player_type_ = value; - } - inline void SkillMsg::set_player_type(::protobuf::PlayerType value) - { - _internal_set_player_type(value); - // @@protoc_insertion_point(field_set:protobuf.SkillMsg.player_type) - } - - // int32 skill_id = 3; + // int32 skill_id = 2; inline void SkillMsg::clear_skill_id() { _impl_.skill_id_ = 0; diff --git a/CAPI/cpp/proto/Services.grpc.pb.cc b/CAPI/cpp/proto/Services.grpc.pb.cc index d2372a9..7d1e51b 100644 --- a/CAPI/cpp/proto/Services.grpc.pb.cc +++ b/CAPI/cpp/proto/Services.grpc.pb.cc @@ -42,6 +42,7 @@ 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) @@ -71,7 +72,8 @@ 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_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) { } @@ -591,6 +593,34 @@ 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( @@ -859,6 +889,20 @@ 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() @@ -1017,4 +1061,12 @@ 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 04be257..9299202 100644 --- a/CAPI/cpp/proto/Services.grpc.pb.h +++ b/CAPI/cpp/proto/Services.grpc.pb.h @@ -230,6 +230,16 @@ 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: @@ -284,6 +294,9 @@ 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() @@ -336,6 +349,8 @@ 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 { @@ -518,6 +533,15 @@ 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 { @@ -558,6 +582,8 @@ 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; @@ -622,6 +648,8 @@ 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_; @@ -641,6 +669,7 @@ 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()); @@ -680,6 +709,8 @@ 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 @@ -1213,7 +1244,35 @@ namespace protobuf ::grpc::Service::RequestAsyncUnary(18, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_TryConnection>>>>>>>>>>>>>>>>>> AsyncService; + 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; template class WithCallbackMethod_TryConnection : public BaseClass { @@ -1939,7 +1998,46 @@ namespace protobuf return nullptr; } }; - typedef WithCallbackMethod_TryConnection>>>>>>>>>>>>>>>>>> CallbackService; + 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 CallbackService ExperimentalCallbackService; template class WithGenericMethod_TryConnection : public BaseClass @@ -2398,6 +2496,30 @@ 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: @@ -2930,6 +3052,34 @@ 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: @@ -3519,6 +3669,37 @@ 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: @@ -3977,7 +4158,34 @@ 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; }; - typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>> StreamedUnaryService; + 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; template class WithSplitStreamingMethod_AddPlayer : public BaseClass { @@ -4033,7 +4241,7 @@ namespace protobuf 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 WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>>>>> StreamedService; }; } // namespace protobuf diff --git a/CAPI/cpp/proto/Services.pb.cc b/CAPI/cpp/proto/Services.pb.cc index 11e1aa4..c63c71f 100644 --- a/CAPI/cpp/proto/Services.pb.cc +++ b/CAPI/cpp/proto/Services.pb.cc @@ -31,7 +31,7 @@ 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\350\007\n\020Avai" + "nts.proto\032\024Message2Server.proto2\233\010\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" @@ -56,8 +56,9 @@ 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.BoolResb\006prot" - "o3"; + ".protobuf.IDMsg\032\021.protobuf.BoolRes\0221\n\006Ge" + "tMap\022\017.protobuf.IDMsg\032\026.protobuf.Message" + "OfMapb\006proto3"; static const ::_pbi::DescriptorTable* const descriptor_table_Services_2eproto_deps[2] = { &::descriptor_table_Message2Clients_2eproto, &::descriptor_table_Message2Server_2eproto, @@ -66,7 +67,7 @@ static ::_pbi::once_flag descriptor_table_Services_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Services_2eproto = { false, false, - 1082, + 1133, descriptor_table_protodef_Services_2eproto, "Services.proto", &descriptor_table_Services_2eproto_once,