Browse Source

Merge pull request #135 from DragonAura/dev

feat(CAPI):  update w/ new rules & change file structure
tags/0.1.0
Timothy Liu GitHub 2 years ago
parent
commit
0e0661d0b0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
100 changed files with 12727 additions and 3161 deletions
  1. +0
    -0
      CAPI/cpp/.gitattributes
  2. +0
    -0
      CAPI/cpp/.gitignore
  3. +0
    -0
      CAPI/cpp/API/API.vcxproj
  4. +0
    -0
      CAPI/cpp/API/API.vcxproj.filters
  5. +0
    -0
      CAPI/cpp/API/include/AI.h
  6. +24
    -24
      CAPI/cpp/API/include/API.h
  7. +13
    -5
      CAPI/cpp/API/include/Communication.h
  8. +0
    -0
      CAPI/cpp/API/include/ConcurrentQueue.hpp
  9. +0
    -0
      CAPI/cpp/API/include/constants.h
  10. +5
    -5
      CAPI/cpp/API/include/logic.h
  11. +4
    -1
      CAPI/cpp/API/include/state.h
  12. +98
    -23
      CAPI/cpp/API/include/structures.h
  13. +101
    -29
      CAPI/cpp/API/include/utils.hpp
  14. +0
    -0
      CAPI/cpp/API/src/AI.cpp
  15. +18
    -18
      CAPI/cpp/API/src/API.cpp
  16. +97
    -24
      CAPI/cpp/API/src/Communication.cpp
  17. +63
    -39
      CAPI/cpp/API/src/DebugAPI.cpp
  18. +76
    -66
      CAPI/cpp/API/src/logic.cpp
  19. +0
    -0
      CAPI/cpp/API/src/main.cpp
  20. +0
    -0
      CAPI/cpp/CAPI.sln
  21. +0
    -0
      CAPI/cpp/CMakeLists.txt
  22. +1
    -0
      CAPI/cpp/Develop Progress.md
  23. +0
    -0
      CAPI/cpp/README.md
  24. +3667
    -506
      CAPI/cpp/proto/Message2Clients.pb.cc
  25. +5112
    -1582
      CAPI/cpp/proto/Message2Clients.pb.h
  26. +678
    -162
      CAPI/cpp/proto/Message2Server.pb.cc
  27. +626
    -111
      CAPI/cpp/proto/Message2Server.pb.h
  28. +40
    -29
      CAPI/cpp/proto/MessageType.pb.cc
  29. +27
    -19
      CAPI/cpp/proto/MessageType.pb.h
  30. +390
    -78
      CAPI/cpp/proto/Services.grpc.pb.cc
  31. +1681
    -436
      CAPI/cpp/proto/Services.grpc.pb.h
  32. +6
    -4
      CAPI/cpp/proto/Services.pb.cc
  33. +0
    -0
      CAPI/cpp/proto/Services.pb.h
  34. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/async.h
  35. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/async_logger-inl.h
  36. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/async_logger.h
  37. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/cfg/argv.h
  38. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/cfg/env.h
  39. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/cfg/helpers-inl.h
  40. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/cfg/helpers.h
  41. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/common-inl.h
  42. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/common.h
  43. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/backtracer-inl.h
  44. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/backtracer.h
  45. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/circular_q.h
  46. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/console_globals.h
  47. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/file_helper-inl.h
  48. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/file_helper.h
  49. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/fmt_helper.h
  50. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/log_msg-inl.h
  51. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/log_msg.h
  52. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/log_msg_buffer-inl.h
  53. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/log_msg_buffer.h
  54. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/mpmc_blocking_q.h
  55. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/null_mutex.h
  56. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/os-inl.h
  57. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/os.h
  58. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/periodic_worker-inl.h
  59. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/periodic_worker.h
  60. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/registry-inl.h
  61. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/registry.h
  62. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/synchronous_factory.h
  63. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/tcp_client-windows.h
  64. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/tcp_client.h
  65. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/thread_pool-inl.h
  66. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/thread_pool.h
  67. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/udp_client-windows.h
  68. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/udp_client.h
  69. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/details/windows_include.h
  70. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bin_to_hex.h
  71. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/args.h
  72. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/chrono.h
  73. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/color.h
  74. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/compile.h
  75. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/core.h
  76. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/fmt.license.rst
  77. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/format-inl.h
  78. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/format.h
  79. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/locale.h
  80. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/os.h
  81. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/ostream.h
  82. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/printf.h
  83. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/ranges.h
  84. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/std.h
  85. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/bundled/xchar.h
  86. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/chrono.h
  87. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/compile.h
  88. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/fmt.h
  89. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/ostr.h
  90. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/ranges.h
  91. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/std.h
  92. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fmt/xchar.h
  93. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/formatter.h
  94. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/fwd.h
  95. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/logger-inl.h
  96. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/logger.h
  97. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/pattern_formatter-inl.h
  98. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/pattern_formatter.h
  99. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/sinks/android_sink.h
  100. +0
    -0
      CAPI/cpp/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h

CAPI/.gitattributes → CAPI/cpp/.gitattributes View File


CAPI/.gitignore → CAPI/cpp/.gitignore View File


CAPI/API/API.vcxproj → CAPI/cpp/API/API.vcxproj View File


CAPI/API/API.vcxproj.filters → CAPI/cpp/API/API.vcxproj.filters View File


CAPI/API/include/AI.h → CAPI/cpp/API/include/AI.h View File


CAPI/API/include/API.h → CAPI/cpp/API/include/API.h View File

@@ -44,8 +44,8 @@ public:
// 供IAPI使用的操作相关的部分 // 供IAPI使用的操作相关的部分
virtual bool Move(int64_t time, double angle) = 0; virtual bool Move(int64_t time, double angle) = 0;
virtual bool PickProp(THUAI6::PropType prop) = 0; virtual bool PickProp(THUAI6::PropType prop) = 0;
virtual bool UseProp() = 0;
virtual bool UseSkill() = 0;
virtual bool UseProp(THUAI6::PropType prop) = 0;
virtual bool UseSkill(int32_t skillID) = 0;
virtual bool SendMessage(int64_t toID, std::string message) = 0; virtual bool SendMessage(int64_t toID, std::string message) = 0;
virtual bool HaveMessage() = 0; virtual bool HaveMessage() = 0;
virtual std::optional<std::pair<int64_t, std::string>> GetMessage() = 0; virtual std::optional<std::pair<int64_t, std::string>> GetMessage() = 0;
@@ -58,11 +58,11 @@ public:
virtual bool Graduate() = 0; virtual bool Graduate() = 0;


virtual bool StartLearning() = 0; virtual bool StartLearning() = 0;
virtual bool StartHelpMate() = 0;
virtual bool StartHealMate() = 0;
virtual bool StartTreatMate() = 0;
virtual bool StartRescueMate() = 0;


// ITrickerAPI使用的部分 // ITrickerAPI使用的部分
virtual bool Trick(double angle) = 0;
virtual bool Attack(double angle) = 0;


virtual const std::vector<int64_t> GetPlayerGUIDs() const = 0; virtual const std::vector<int64_t> GetPlayerGUIDs() const = 0;
}; };
@@ -82,8 +82,8 @@ public:


// 捡道具、使用技能 // 捡道具、使用技能
virtual std::future<bool> PickProp(THUAI6::PropType prop) = 0; virtual std::future<bool> PickProp(THUAI6::PropType prop) = 0;
virtual std::future<bool> UseProp() = 0;
virtual std::future<bool> UseSkill() = 0;
virtual std::future<bool> UseProp(THUAI6::PropType prop) = 0;
virtual std::future<bool> UseSkill(int32_t skillID) = 0;


// 发送信息、接受信息,注意收消息时无消息则返回nullopt // 发送信息、接受信息,注意收消息时无消息则返回nullopt
virtual std::future<bool> SendMessage(int64_t, std::string) = 0; virtual std::future<bool> SendMessage(int64_t, std::string) = 0;
@@ -138,8 +138,8 @@ public:
/*****学生阵营的特定函数*****/ /*****学生阵营的特定函数*****/


virtual std::future<bool> StartLearning() = 0; virtual std::future<bool> StartLearning() = 0;
virtual std::future<bool> StartHelpMate() = 0;
virtual std::future<bool> StartHealMate() = 0;
virtual std::future<bool> StartTreatMate() = 0;
virtual std::future<bool> StartRescueMate() = 0;
virtual std::future<bool> Graduate() = 0; virtual std::future<bool> Graduate() = 0;
[[nodiscard]] virtual std::shared_ptr<const THUAI6::Student> GetSelfInfo() const = 0; [[nodiscard]] virtual std::shared_ptr<const THUAI6::Student> GetSelfInfo() const = 0;
}; };
@@ -149,7 +149,7 @@ class ITrickerAPI : public IAPI
public: public:
/*****捣蛋鬼阵营的特定函数*****/ /*****捣蛋鬼阵营的特定函数*****/


virtual std::future<bool> Trick(double angleInRadian) = 0;
virtual std::future<bool> Attack(double angleInRadian) = 0;
[[nodiscard]] virtual std::shared_ptr<const THUAI6::Tricker> GetSelfInfo() const = 0; [[nodiscard]] virtual std::shared_ptr<const THUAI6::Tricker> GetSelfInfo() const = 0;
}; };


@@ -187,8 +187,8 @@ public:
std::future<bool> MoveDown(int64_t timeInMilliseconds) override; std::future<bool> MoveDown(int64_t timeInMilliseconds) override;


std::future<bool> PickProp(THUAI6::PropType prop) override; std::future<bool> PickProp(THUAI6::PropType prop) override;
std::future<bool> UseProp() override;
std::future<bool> UseSkill() override;
std::future<bool> UseProp(THUAI6::PropType prop) override;
std::future<bool> UseSkill(int32_t skillID) override;


std::future<bool> SendMessage(int64_t, std::string) override; std::future<bool> SendMessage(int64_t, std::string) override;
[[nodiscard]] std::future<bool> HaveMessage() override; [[nodiscard]] std::future<bool> HaveMessage() override;
@@ -207,8 +207,8 @@ public:
[[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override; [[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override;


std::future<bool> StartLearning() override; std::future<bool> StartLearning() override;
std::future<bool> StartHelpMate() override;
std::future<bool> StartHealMate() override;
std::future<bool> StartTreatMate() override;
std::future<bool> StartRescueMate() override;
std::future<bool> Graduate() override; std::future<bool> Graduate() override;
[[nodiscard]] std::shared_ptr<const THUAI6::Student> GetSelfInfo() const override; [[nodiscard]] std::shared_ptr<const THUAI6::Student> GetSelfInfo() const override;


@@ -253,8 +253,8 @@ public:
std::future<bool> MoveDown(int64_t timeInMilliseconds) override; std::future<bool> MoveDown(int64_t timeInMilliseconds) override;


std::future<bool> PickProp(THUAI6::PropType prop) override; std::future<bool> PickProp(THUAI6::PropType prop) override;
std::future<bool> UseProp() override;
std::future<bool> UseSkill() override;
std::future<bool> UseProp(THUAI6::PropType prop) override;
std::future<bool> UseSkill(int32_t skillID) override;


std::future<bool> SendMessage(int64_t, std::string) override; std::future<bool> SendMessage(int64_t, std::string) override;
[[nodiscard]] std::future<bool> HaveMessage() override; [[nodiscard]] std::future<bool> HaveMessage() override;
@@ -272,7 +272,7 @@ public:


[[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override; [[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override;


std::future<bool> Trick(double angleInRadian) override;
std::future<bool> Attack(double angleInRadian) override;
[[nodiscard]] std::shared_ptr<const THUAI6::Tricker> GetSelfInfo() const override; [[nodiscard]] std::shared_ptr<const THUAI6::Tricker> GetSelfInfo() const override;


void PrintStudent() const override void PrintStudent() const override
@@ -309,8 +309,8 @@ public:
std::future<bool> MoveDown(int64_t timeInMilliseconds) override; std::future<bool> MoveDown(int64_t timeInMilliseconds) override;


std::future<bool> PickProp(THUAI6::PropType prop) override; std::future<bool> PickProp(THUAI6::PropType prop) override;
std::future<bool> UseProp() override;
std::future<bool> UseSkill() override;
std::future<bool> UseProp(THUAI6::PropType prop) override;
std::future<bool> UseSkill(int32_t skillID) override;


std::future<bool> SendMessage(int64_t, std::string) override; std::future<bool> SendMessage(int64_t, std::string) override;
[[nodiscard]] std::future<bool> HaveMessage() override; [[nodiscard]] std::future<bool> HaveMessage() override;
@@ -329,8 +329,8 @@ public:
[[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override; [[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override;


std::future<bool> StartLearning() override; std::future<bool> StartLearning() override;
std::future<bool> StartHelpMate() override;
std::future<bool> StartHealMate() override;
std::future<bool> StartTreatMate() override;
std::future<bool> StartRescueMate() override;
std::future<bool> Graduate() override; std::future<bool> Graduate() override;
[[nodiscard]] virtual std::shared_ptr<const THUAI6::Student> GetSelfInfo() const override; [[nodiscard]] virtual std::shared_ptr<const THUAI6::Student> GetSelfInfo() const override;


@@ -362,8 +362,8 @@ public:
std::future<bool> MoveDown(int64_t timeInMilliseconds) override; std::future<bool> MoveDown(int64_t timeInMilliseconds) override;


std::future<bool> PickProp(THUAI6::PropType prop) override; std::future<bool> PickProp(THUAI6::PropType prop) override;
std::future<bool> UseProp() override;
std::future<bool> UseSkill() override;
std::future<bool> UseProp(THUAI6::PropType prop) override;
std::future<bool> UseSkill(int32_t skillID) override;


std::future<bool> SendMessage(int64_t, std::string) override; std::future<bool> SendMessage(int64_t, std::string) override;
[[nodiscard]] std::future<bool> HaveMessage() override; [[nodiscard]] std::future<bool> HaveMessage() override;
@@ -381,7 +381,7 @@ public:


[[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override; [[nodiscard]] const std::vector<int64_t> GetPlayerGUIDs() const override;


std::future<bool> Trick(double angleInRadian) override;
std::future<bool> Attack(double angleInRadian) override;
[[nodiscard]] std::shared_ptr<const THUAI6::Tricker> GetSelfInfo() const override; [[nodiscard]] std::shared_ptr<const THUAI6::Tricker> GetSelfInfo() const override;


void PrintStudent() const override; void PrintStudent() const override;

CAPI/API/include/Communication.h → CAPI/cpp/API/include/Communication.h View File

@@ -26,18 +26,25 @@ public:
} }
bool Move(int64_t time, double angle, int64_t playerID); bool Move(int64_t time, double angle, int64_t playerID);
bool PickProp(THUAI6::PropType prop, int64_t playerID); bool PickProp(THUAI6::PropType prop, int64_t playerID);
bool UseProp(int64_t playerID);
bool UseSkill(int64_t playerID);
bool UseProp(THUAI6::PropType prop, int64_t playerID);
bool UseSkill(int32_t skillID, int64_t playerID);
std::optional<std::pair<int64_t, std::string>> GetMessage(); std::optional<std::pair<int64_t, std::string>> GetMessage();
bool HaveMessage(); bool HaveMessage();
bool SendMessage(int64_t toID, std::string message, int64_t playerID); bool SendMessage(int64_t toID, std::string message, int64_t playerID);
bool OpenDoor(int64_t playerID);
bool CloseDoor(int64_t playerID);
bool SkipWindow(int64_t playerID);
bool StartOpenGate(int64_t playerID);
bool StartOpenChest(int64_t playerID);
bool EndAllAction(int64_t playerID);

bool Graduate(int64_t playerID); bool Graduate(int64_t playerID);


bool StartLearning(int64_t playerID); bool StartLearning(int64_t playerID);
bool StartHelpMate(int64_t playerID);
bool StartHealMate(int64_t playerID);
bool StartTreatMate(int64_t playerID);
bool StartRescueMate(int64_t playerID);


bool Trick(double angle, int64_t playerID);
bool Attack(double angle, int64_t playerID);


bool TryConnection(int64_t playerID); bool TryConnection(int64_t playerID);
protobuf::MessageToClient GetMessage2Client(); protobuf::MessageToClient GetMessage2Client();
@@ -47,6 +54,7 @@ public:


private: private:
std::unique_ptr<protobuf::AvailableService::Stub> THUAI6Stub; std::unique_ptr<protobuf::AvailableService::Stub> THUAI6Stub;
THUAI6::PlayerType playerType;
bool haveNewMessage = false; bool haveNewMessage = false;
protobuf::MessageToClient message2Client; protobuf::MessageToClient message2Client;
ConcurrentQueue<std::pair<int64_t, std::string>> messageQueue; ConcurrentQueue<std::pair<int64_t, std::string>> messageQueue;

CAPI/API/include/ConcurrentQueue.hpp → CAPI/cpp/API/include/ConcurrentQueue.hpp View File


CAPI/API/include/constants.h → CAPI/cpp/API/include/constants.h View File


CAPI/API/include/logic.h → CAPI/cpp/API/include/logic.h View File

@@ -102,8 +102,8 @@ private:
// 供IAPI使用的操作相关的部分 // 供IAPI使用的操作相关的部分
bool Move(int64_t time, double angle) override; bool Move(int64_t time, double angle) override;
bool PickProp(THUAI6::PropType prop) override; bool PickProp(THUAI6::PropType prop) override;
bool UseProp() override;
bool UseSkill() override;
bool UseProp(THUAI6::PropType prop) override;
bool UseSkill(int32_t skillID) override;


bool SendMessage(int64_t toID, std::string message) override; bool SendMessage(int64_t toID, std::string message) override;
bool HaveMessage() override; bool HaveMessage() override;
@@ -113,10 +113,10 @@ private:


bool StartLearning() override; bool StartLearning() override;


bool StartHelpMate() override;
bool StartHealMate() override;
bool StartTreatMate() override;
bool StartRescueMate() override;


bool Trick(double angle) override;
bool Attack(double angle) override;


bool WaitThread() override; bool WaitThread() override;



CAPI/API/include/state.h → CAPI/cpp/API/include/state.h View File

@@ -4,6 +4,7 @@


#include <vector> #include <vector>
#include <array> #include <array>
#include <map>


#include "structures.h" #include "structures.h"


@@ -24,7 +25,9 @@ struct State


std::vector<std::shared_ptr<THUAI6::BombedBullet>> bombedBullets; std::vector<std::shared_ptr<THUAI6::BombedBullet>> bombedBullets;


std::vector<std::vector<THUAI6::PlaceType>> gamemap;
std::shared_ptr<THUAI6::GameMap> gameMap;

std::shared_ptr<THUAI6::GameInfo> gameInfo;


std::vector<int64_t> guids; std::vector<int64_t> guids;
}; };

CAPI/API/include/structures.h → CAPI/cpp/API/include/structures.h View File

@@ -27,9 +27,11 @@ namespace THUAI6
Wall = 2, Wall = 2,
Grass = 3, Grass = 3,
ClassRoom = 4, ClassRoom = 4,
BlackRoom = 5,
Gate = 6,
HiddenGate = 7,
Gate = 5,
HiddenGate = 6,
Window = 7,
Door = 8,
Chest = 9,
}; };


// 形状标志 // 形状标志
@@ -108,9 +110,9 @@ namespace THUAI6
}; };


// 学生状态枚举 // 学生状态枚举
enum class StudentState : unsigned char
enum class PlayerState : unsigned char
{ {
NullStudentState = 0,
NullState = 0,
Idle = 1, Idle = 1,
Learning = 2, Learning = 2,
Addicted = 3, Addicted = 3,
@@ -121,6 +123,30 @@ namespace THUAI6
Stunned = 8, Stunned = 8,
Treating = 9, Treating = 9,
Rescuing = 10, Rescuing = 10,
Swinging = 11,
Attacking = 12,
Locking = 13,
Rummaging = 14,
Climbing = 15,
};

enum class MessageOfObj : unsigned char
{
NullMessageOfObj = 0,
StudentMessage = 1,
TrickerMessage = 2,
PropMessage = 3,
BulletMessage = 4,
BombedBulletMessage = 5,
};

enum class MessageOfMapObj : unsigned char
{
NullMessageOfMapObj = 0,
ClassroomMessage = 1,
DoorMessage = 2,
GateMessage = 3,
ChestMessage = 4,
}; };


// 玩家类 // 玩家类
@@ -138,26 +164,25 @@ namespace THUAI6
double timeUntilSkillAvailable; // 技能冷却时间 double timeUntilSkillAvailable; // 技能冷却时间


PlayerType playerType; // 玩家类型 PlayerType playerType; // 玩家类型
PropType prop; // 手上的道具类型
PlaceType place; // 所处格子的类型
std::vector<PropType> props;
PlaceType place; // 所处格子的类型

PlayerState playerState;
}; };


struct Student : public Player struct Student : public Player
{ {
StudentState state; // 学生状态
StudentType studentType;
int32_t determination; // 剩余毅力(本次Emo之前还能承受的伤害) int32_t determination; // 剩余毅力(本次Emo之前还能承受的伤害)
int32_t failNum; // 挂科数量 int32_t failNum; // 挂科数量
double failTime; // 挂科时间 double failTime; // 挂科时间
double emoTime; // EMO时间 double emoTime; // EMO时间


StudentType studentType; // 学生类型
std::vector<StudentBuffType> buff; // buff std::vector<StudentBuffType> buff; // buff
}; };


struct Tricker : public Player struct Tricker : public Player
{ {
bool movable; // 是否处在攻击后摇中

TrickerType trickerType; // 捣蛋鬼类型 TrickerType trickerType; // 捣蛋鬼类型
std::vector<TrickerBuffType> buff; // buff std::vector<TrickerBuffType> buff; // buff
}; };
@@ -196,6 +221,31 @@ namespace THUAI6
bool isMoving; bool isMoving;
}; };


struct GameMap
{
std::vector<std::vector<PlaceType>> gameMap;
std::map<std::pair<int32_t, int32_t>, int32_t> classRoomState;

std::map<std::pair<int32_t, int32_t>, int32_t> gateState;

std::map<std::pair<int32_t, int32_t>, bool> doorState;

std::map<std::pair<int32_t, int32_t>, int32_t> chestState;
};

struct GameInfo
{
int32_t gameTime;
int32_t subjectLeft;
int32_t studentGraduated;
int32_t studentQuited;
int32_t studentScore;
int32_t trickerScore;
bool gateOpened;
bool hiddenGateRefreshed;
bool hiddenGateOpened;
};

// 仅供DEBUG使用,名称可改动 // 仅供DEBUG使用,名称可改动
// 还没写完,后面待续 // 还没写完,后面待续


@@ -206,18 +256,23 @@ namespace THUAI6
{GameState::GameEnd, "GameEnd"}, {GameState::GameEnd, "GameEnd"},
}; };


inline std::map<StudentState, std::string> studentStateDict{
{StudentState::NullStudentState, "NullStudentState"},
{StudentState::Idle, "Idle"},
{StudentState::Learning, "Learning"},
{StudentState::Addicted, "Addicted"},
{StudentState::Quit, "Quit"},
{StudentState::Graduated, "Graduated"},
{StudentState::Treated, "Treated"},
{StudentState::Rescued, "Rescued"},
{StudentState::Stunned, "Stunned"},
{StudentState::Treating, "Treating"},
{StudentState::Rescuing, "Rescuing"},
inline std::map<PlayerState, std::string> playerStateDict{
{PlayerState::NullState, "NullState"},
{PlayerState::Idle, "Idle"},
{PlayerState::Learning, "Learning"},
{PlayerState::Addicted, "Addicted"},
{PlayerState::Quit, "Quit"},
{PlayerState::Graduated, "Graduated"},
{PlayerState::Treated, "Treated"},
{PlayerState::Rescued, "Rescued"},
{PlayerState::Stunned, "Stunned"},
{PlayerState::Treating, "Treating"},
{PlayerState::Rescuing, "Rescuing"},
{PlayerState::Swinging, "Swinging"},
{PlayerState::Attacking, "Attacking"},
{PlayerState::Locking, "Locking"},
{PlayerState::Rummaging, "Rummaging"},
{PlayerState::Climbing, "Climbing"},
}; };


inline std::map<PlayerType, std::string> playerTypeDict{ inline std::map<PlayerType, std::string> playerTypeDict{
@@ -234,6 +289,9 @@ namespace THUAI6
{PlaceType::ClassRoom, "ClassRoom"}, {PlaceType::ClassRoom, "ClassRoom"},
{PlaceType::Gate, "Gate"}, {PlaceType::Gate, "Gate"},
{PlaceType::HiddenGate, "HiddenGate"}, {PlaceType::HiddenGate, "HiddenGate"},
{PlaceType::Door, "Door"},
{PlaceType::Window, "Window"},
{PlaceType::Chest, "Chest"},
}; };


inline std::map<PropType, std::string> propTypeDict{ inline std::map<PropType, std::string> propTypeDict{
@@ -251,6 +309,23 @@ namespace THUAI6


}; };


inline std::map<MessageOfObj, std::string> messageOfObjDict{
{MessageOfObj::NullMessageOfObj, "NullMessageOfObj"},
{MessageOfObj::StudentMessage, "StudentMessage"},
{MessageOfObj::TrickerMessage, "TrickerMessage"},
{MessageOfObj::PropMessage, "PropMessage"},
{MessageOfObj::BulletMessage, "BulletMessage"},
{MessageOfObj::BombedBulletMessage, "BombedBulletMessage"},
};

inline std::map<MessageOfMapObj, std::string> messageOfMapObjDict{
{MessageOfMapObj::NullMessageOfMapObj, "NullMessageOfMapObj"},
{MessageOfMapObj::ClassroomMessage, "ClassroomMessage"},
{MessageOfMapObj::DoorMessage, "DoorMessage"},
{MessageOfMapObj::GateMessage, "GateMessage"},
{MessageOfMapObj::ChestMessage, "ChestMessage"},
};

} // namespace THUAI6 } // namespace THUAI6


#endif #endif

CAPI/API/include/utils.hpp → CAPI/cpp/API/include/utils.hpp View File

@@ -69,6 +69,8 @@ namespace Proto2THUAI6
{protobuf::PlaceType::CLASSROOM, THUAI6::PlaceType::ClassRoom}, {protobuf::PlaceType::CLASSROOM, THUAI6::PlaceType::ClassRoom},
{protobuf::PlaceType::GATE, THUAI6::PlaceType::Gate}, {protobuf::PlaceType::GATE, THUAI6::PlaceType::Gate},
{protobuf::PlaceType::HIDDEN_GATE, THUAI6::PlaceType::HiddenGate}, {protobuf::PlaceType::HIDDEN_GATE, THUAI6::PlaceType::HiddenGate},
{protobuf::PlaceType::WINDOW, THUAI6::PlaceType::Window},
{protobuf::PlaceType::DOOR, THUAI6::PlaceType::Door},
}; };


inline std::map<protobuf::ShapeType, THUAI6::ShapeType> shapeTypeDict{ inline std::map<protobuf::ShapeType, THUAI6::ShapeType> shapeTypeDict{
@@ -123,18 +125,18 @@ namespace Proto2THUAI6
{protobuf::TrickerBuffType::TBUFFTYPE4, THUAI6::TrickerBuffType::TrickerBuffType4}, {protobuf::TrickerBuffType::TBUFFTYPE4, THUAI6::TrickerBuffType::TrickerBuffType4},
}; };


inline std::map<protobuf::StudentState, THUAI6::StudentState> studentStateDict{
{protobuf::StudentState::NULL_STATUS, THUAI6::StudentState::NullStudentState},
{protobuf::StudentState::IDLE, THUAI6::StudentState::Idle},
{protobuf::StudentState::LEARNING, THUAI6::StudentState::Learning},
{protobuf::StudentState::ADDICTED, THUAI6::StudentState::Addicted},
{protobuf::StudentState::QUIT, THUAI6::StudentState::Quit},
{protobuf::StudentState::GRADUATED, THUAI6::StudentState::Graduated},
{protobuf::StudentState::RESCUED, THUAI6::StudentState::Rescued},
{protobuf::StudentState::TREATED, THUAI6::StudentState::Treated},
{protobuf::StudentState::STUNNED, THUAI6::StudentState::Stunned},
{protobuf::StudentState::RESCUING, THUAI6::StudentState::Rescuing},
{protobuf::StudentState::TREATING, THUAI6::StudentState::Treating},
inline std::map<protobuf::PlayerState, THUAI6::PlayerState> playerStateDict{
{protobuf::PlayerState::NULL_STATUS, THUAI6::PlayerState::NullState},
{protobuf::PlayerState::IDLE, THUAI6::PlayerState::Idle},
{protobuf::PlayerState::LEARNING, THUAI6::PlayerState::Learning},
{protobuf::PlayerState::ADDICTED, THUAI6::PlayerState::Addicted},
{protobuf::PlayerState::QUIT, THUAI6::PlayerState::Quit},
{protobuf::PlayerState::GRADUATED, THUAI6::PlayerState::Graduated},
{protobuf::PlayerState::RESCUED, THUAI6::PlayerState::Rescued},
{protobuf::PlayerState::TREATED, THUAI6::PlayerState::Treated},
{protobuf::PlayerState::STUNNED, THUAI6::PlayerState::Stunned},
{protobuf::PlayerState::RESCUING, THUAI6::PlayerState::Rescuing},
{protobuf::PlayerState::TREATING, THUAI6::PlayerState::Treating},
}; };


inline std::map<protobuf::GameState, THUAI6::GameState> gameStateDict{ inline std::map<protobuf::GameState, THUAI6::GameState> gameStateDict{
@@ -153,6 +155,23 @@ namespace Proto2THUAI6
{protobuf::BulletType::ATOM_BOMB, THUAI6::BulletType::AtomBomb}, {protobuf::BulletType::ATOM_BOMB, THUAI6::BulletType::AtomBomb},
}; };


inline std::map<protobuf::MessageOfObj::MessageOfObjCase, THUAI6::MessageOfObj> 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<protobuf::MessageOfMapObj::MessageOfMapObjCase, THUAI6::MessageOfMapObj> 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中的类转换为THUAI6的类 // 用于将Protobuf中的类转换为THUAI6的类
inline std::shared_ptr<THUAI6::Tricker> Protobuf2THUAI6Tricker(const protobuf::MessageOfTricker& trickerMsg) inline std::shared_ptr<THUAI6::Tricker> Protobuf2THUAI6Tricker(const protobuf::MessageOfTricker& trickerMsg)
{ {
@@ -163,10 +182,13 @@ namespace Proto2THUAI6
tricker->damage = trickerMsg.damage(); tricker->damage = trickerMsg.damage();
tricker->timeUntilSkillAvailable = trickerMsg.time_until_skill_available(); tricker->timeUntilSkillAvailable = trickerMsg.time_until_skill_available();
tricker->place = placeTypeDict[trickerMsg.place()]; tricker->place = placeTypeDict[trickerMsg.place()];
tricker->prop = propTypeDict[trickerMsg.prop()];
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->trickerType = trickerTypeDict[trickerMsg.tricker_type()];
tricker->guid = trickerMsg.guid(); tricker->guid = trickerMsg.guid();
tricker->movable = trickerMsg.movable();
tricker->playerID = trickerMsg.player_id(); tricker->playerID = trickerMsg.player_id();
tricker->viewRange = trickerMsg.view_range(); tricker->viewRange = trickerMsg.view_range();
tricker->radius = trickerMsg.radius(); tricker->radius = trickerMsg.radius();
@@ -191,9 +213,12 @@ namespace Proto2THUAI6
student->timeUntilSkillAvailable = studentMsg.time_until_skill_available(); student->timeUntilSkillAvailable = studentMsg.time_until_skill_available();
student->damage = studentMsg.damage(); student->damage = studentMsg.damage();
student->playerType = THUAI6::PlayerType::StudentPlayer; student->playerType = THUAI6::PlayerType::StudentPlayer;
student->prop = propTypeDict[studentMsg.prop()];
for (int i = 0; i < studentMsg.prop().size(); i++)
{
student->props.push_back(propTypeDict[studentMsg.prop(i)]);
}
student->place = placeTypeDict[studentMsg.place()]; student->place = placeTypeDict[studentMsg.place()];
student->state = studentStateDict[studentMsg.state()];
student->playerState = playerStateDict[studentMsg.state()];
student->determination = studentMsg.determination(); student->determination = studentMsg.determination();
student->failNum = studentMsg.fail_num(); student->failNum = studentMsg.fail_num();
student->failTime = studentMsg.fail_time(); student->failTime = studentMsg.fail_time();
@@ -221,9 +246,9 @@ namespace Proto2THUAI6
return prop; return prop;
} }


inline std::vector<std::vector<THUAI6::PlaceType>> Protobuf2THUAI6Map(const protobuf::MessageOfMap& mapMsg)
inline std::shared_ptr<THUAI6::GameMap> Protobuf2THUAI6Map(const protobuf::MessageOfMap& mapMsg)
{ {
std::vector<std::vector<THUAI6::PlaceType>> map;
auto map = std::make_shared<THUAI6::GameMap>();
for (int i = 0; i < mapMsg.row_size(); i++) for (int i = 0; i < mapMsg.row_size(); i++)
{ {
std::vector<THUAI6::PlaceType> row; std::vector<THUAI6::PlaceType> row;
@@ -231,11 +256,41 @@ namespace Proto2THUAI6
{ {
row.push_back(placeTypeDict[mapMsg.row(i).col(j)]); row.push_back(placeTypeDict[mapMsg.row(i).col(j)]);
} }
map.push_back(row);
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; return map;
} }


inline std::shared_ptr<THUAI6::GameInfo> Protobuf2THUAI6GameInfo(const protobuf::MessageOfAll& allMsg)
{
auto gameInfo = std::make_shared<THUAI6::GameInfo>();
gameInfo->gameTime = allMsg.game_time();
gameInfo->subjectLeft = allMsg.subject_left();
gameInfo->studentGraduated = allMsg.student_graduated();
gameInfo->studentQuited = allMsg.student_quited();
gameInfo->studentScore = allMsg.student_score();
gameInfo->trickerScore = allMsg.tricker_score();
gameInfo->gateOpened = allMsg.gate_opened();
gameInfo->hiddenGateOpened = allMsg.hidden_gate_opened();
gameInfo->hiddenGateRefreshed = allMsg.hidden_gate_refreshed();
return gameInfo;
}

inline std::shared_ptr<THUAI6::Bullet> Protobuf2THUAI6Bullet(const protobuf::MessageOfBullet& bulletMsg) inline std::shared_ptr<THUAI6::Bullet> Protobuf2THUAI6Bullet(const protobuf::MessageOfBullet& bulletMsg)
{ {
auto bullet = std::make_shared<THUAI6::Bullet>(); auto bullet = std::make_shared<THUAI6::Bullet>();
@@ -275,6 +330,8 @@ namespace THUAI62Proto
{THUAI6::PlaceType::ClassRoom, protobuf::PlaceType::CLASSROOM}, {THUAI6::PlaceType::ClassRoom, protobuf::PlaceType::CLASSROOM},
{THUAI6::PlaceType::Gate, protobuf::PlaceType::GATE}, {THUAI6::PlaceType::Gate, protobuf::PlaceType::GATE},
{THUAI6::PlaceType::HiddenGate, protobuf::PlaceType::HIDDEN_GATE}, {THUAI6::PlaceType::HiddenGate, protobuf::PlaceType::HIDDEN_GATE},
{THUAI6::PlaceType::Door, protobuf::PlaceType::DOOR},
{THUAI6::PlaceType::Window, protobuf::PlaceType::WINDOW},
}; };


inline std::map<THUAI6::ShapeType, protobuf::ShapeType> shapeTypeDict{ inline std::map<THUAI6::ShapeType, protobuf::ShapeType> shapeTypeDict{
@@ -346,45 +403,60 @@ namespace THUAI62Proto
return playerMsg; return playerMsg;
} }


inline protobuf::IDMsg THUAI62ProtobufID(int playerID)
inline protobuf::IDMsg THUAI62ProtobufID(int playerID, THUAI6::PlayerType playerType)
{ {
protobuf::IDMsg idMsg; protobuf::IDMsg idMsg;
idMsg.set_player_id(playerID); idMsg.set_player_id(playerID);
idMsg.set_player_type(playerTypeDict[playerType]);
return idMsg; return idMsg;
} }


inline protobuf::MoveMsg THUAI62ProtobufMove(int64_t time, double angle, int64_t id)
inline protobuf::MoveMsg THUAI62ProtobufMove(int64_t time, double angle, int64_t id, THUAI6::PlayerType playerType)
{ {
protobuf::MoveMsg moveMsg; protobuf::MoveMsg moveMsg;
moveMsg.set_time_in_milliseconds(time); moveMsg.set_time_in_milliseconds(time);
moveMsg.set_angle(angle); moveMsg.set_angle(angle);
moveMsg.set_player_id(id); moveMsg.set_player_id(id);
moveMsg.set_player_type(playerTypeDict[playerType]);
return moveMsg; return moveMsg;
} }


inline protobuf::PickMsg THUAI62ProtobufPick(THUAI6::PropType prop, int64_t id)
inline protobuf::PropMsg THUAI62ProtobufProp(THUAI6::PropType prop, int64_t id, THUAI6::PlayerType playerType)
{ {
protobuf::PickMsg pickMsg;
protobuf::PropMsg pickMsg;
pickMsg.set_prop_type(propTypeDict[prop]); pickMsg.set_prop_type(propTypeDict[prop]);
pickMsg.set_player_id(id); pickMsg.set_player_id(id);
pickMsg.set_player_type(playerTypeDict[playerType]);
return pickMsg; return pickMsg;
} }


inline protobuf::SendMsg THUAI62ProtobufSend(std::string msg, int64_t toID, int64_t id)
inline protobuf::SendMsg THUAI62ProtobufSend(std::string msg, int64_t toID, int64_t id, THUAI6::PlayerType playerType, THUAI6::PlayerType toType)
{ {
protobuf::SendMsg sendMsg; protobuf::SendMsg sendMsg;
sendMsg.set_message(msg); sendMsg.set_message(msg);
sendMsg.set_to_player_id(toID); sendMsg.set_to_player_id(toID);
sendMsg.set_player_id(id); sendMsg.set_player_id(id);
sendMsg.set_player_type(playerTypeDict[playerType]);
sendMsg.set_to_player_type(playerTypeDict[toType]);
return sendMsg; return sendMsg;
} }


inline protobuf::TrickMsg THUAI62ProtobufTrick(double angle, int64_t id)
inline protobuf::AttackMsg THUAI62ProtobufAttack(double angle, int64_t id, THUAI6::PlayerType playerType)
{
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)
{ {
protobuf::TrickMsg trickMsg;
trickMsg.set_angle(angle);
trickMsg.set_player_id(id);
return trickMsg;
protobuf::SkillMsg skillMsg;
skillMsg.set_skill_id(skillID);
skillMsg.set_player_id(id);
skillMsg.set_player_type(playerTypeDict[playerType]);
return skillMsg;
} }
} // namespace THUAI62Proto } // namespace THUAI62Proto



CAPI/API/src/AI.cpp → CAPI/cpp/API/src/AI.cpp View File


CAPI/API/src/API.cpp → CAPI/cpp/API/src/API.cpp View File

@@ -71,10 +71,10 @@ std::future<bool> StudentAPI::PickProp(THUAI6::PropType prop)
{ return logic.PickProp(prop); }); { return logic.PickProp(prop); });
} }


std::future<bool> StudentAPI::UseProp()
std::future<bool> StudentAPI::UseProp(THUAI6::PropType prop)
{ {
return std::async(std::launch::async, [&]()
{ return logic.UseProp(); });
return std::async(std::launch::async, [=]()
{ return logic.UseProp(prop); });
} }


std::future<bool> TrickerAPI::PickProp(THUAI6::PropType prop) std::future<bool> TrickerAPI::PickProp(THUAI6::PropType prop)
@@ -83,22 +83,22 @@ std::future<bool> TrickerAPI::PickProp(THUAI6::PropType prop)
{ return logic.PickProp(prop); }); { return logic.PickProp(prop); });
} }


std::future<bool> TrickerAPI::UseProp()
std::future<bool> TrickerAPI::UseProp(THUAI6::PropType prop)
{ {
return std::async(std::launch::async, [&]()
{ return logic.UseProp(); });
return std::async(std::launch::async, [=]()
{ return logic.UseProp(prop); });
} }


std::future<bool> StudentAPI::UseSkill()
std::future<bool> StudentAPI::UseSkill(int32_t skillID)
{ {
return std::async(std::launch::async, [&]()
{ return logic.UseSkill(); });
return std::async(std::launch::async, [=]()
{ return logic.UseSkill(skillID); });
} }


std::future<bool> TrickerAPI::UseSkill()
std::future<bool> TrickerAPI::UseSkill(int32_t skillID)
{ {
return std::async(std::launch::async, [&]()
{ return logic.UseSkill(); });
return std::async(std::launch::async, [=]()
{ return logic.UseSkill(skillID); });
} }


std::future<bool> StudentAPI::SendMessage(int64_t toID, std::string message) std::future<bool> StudentAPI::SendMessage(int64_t toID, std::string message)
@@ -223,16 +223,16 @@ std::future<bool> StudentAPI::StartLearning()
{ return logic.StartLearning(); }); { return logic.StartLearning(); });
} }


std::future<bool> StudentAPI::StartHelpMate()
std::future<bool> StudentAPI::StartTreatMate()
{ {
return std::async(std::launch::async, [&]() return std::async(std::launch::async, [&]()
{ return logic.StartHelpMate(); });
{ return logic.StartTreatMate(); });
} }


std::future<bool> StudentAPI::StartHealMate()
std::future<bool> StudentAPI::StartRescueMate()
{ {
return std::async(std::launch::async, [&]() return std::async(std::launch::async, [&]()
{ return logic.StartHealMate(); });
{ return logic.StartRescueMate(); });
} }


std::future<bool> StudentAPI::Graduate() std::future<bool> StudentAPI::Graduate()
@@ -246,10 +246,10 @@ std::shared_ptr<const THUAI6::Student> StudentAPI::GetSelfInfo() const
return logic.StudentGetSelfInfo(); return logic.StudentGetSelfInfo();
} }


std::future<bool> TrickerAPI::Trick(double angleInRadian)
std::future<bool> TrickerAPI::Attack(double angleInRadian)
{ {
return std::async(std::launch::async, [&]() return std::async(std::launch::async, [&]()
{ return logic.Trick(angleInRadian); });
{ return logic.Attack(angleInRadian); });
} }


std::shared_ptr<const THUAI6::Tricker> TrickerAPI::GetSelfInfo() const std::shared_ptr<const THUAI6::Tricker> TrickerAPI::GetSelfInfo() const

CAPI/API/src/Communication.cpp → CAPI/cpp/API/src/Communication.cpp View File

@@ -18,7 +18,7 @@ bool Communication::Move(int64_t time, double angle, int64_t playerID)
{ {
protobuf::MoveRes moveResult; protobuf::MoveRes moveResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufMove(time, angle, playerID);
auto request = THUAI62Proto::THUAI62ProtobufMove(time, angle, playerID, playerType);
std::cout << "Move request sent" << std::endl; std::cout << "Move request sent" << std::endl;
auto status = THUAI6Stub->Move(&context, request, &moveResult); auto status = THUAI6Stub->Move(&context, request, &moveResult);
if (status.ok()) if (status.ok())
@@ -31,7 +31,7 @@ bool Communication::PickProp(THUAI6::PropType prop, int64_t playerID)
{ {
protobuf::BoolRes pickPropResult; protobuf::BoolRes pickPropResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufPick(prop, playerID);
auto request = THUAI62Proto::THUAI62ProtobufProp(prop, playerID, playerType);
auto status = THUAI6Stub->PickProp(&context, request, &pickPropResult); auto status = THUAI6Stub->PickProp(&context, request, &pickPropResult);
if (status.ok()) if (status.ok())
return pickPropResult.act_success(); return pickPropResult.act_success();
@@ -39,11 +39,11 @@ bool Communication::PickProp(THUAI6::PropType prop, int64_t playerID)
return false; return false;
} }


bool Communication::UseProp(int64_t playerID)
bool Communication::UseProp(THUAI6::PropType prop, int64_t playerID)
{ {
protobuf::BoolRes usePropResult; protobuf::BoolRes usePropResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto request = THUAI62Proto::THUAI62ProtobufProp(prop, playerID, playerType);
auto status = THUAI6Stub->UseProp(&context, request, &usePropResult); auto status = THUAI6Stub->UseProp(&context, request, &usePropResult);
if (status.ok()) if (status.ok())
return usePropResult.act_success(); return usePropResult.act_success();
@@ -51,11 +51,11 @@ bool Communication::UseProp(int64_t playerID)
return false; return false;
} }


bool Communication::UseSkill(int64_t playerID)
bool Communication::UseSkill(int32_t skillID, int64_t playerID)
{ {
protobuf::BoolRes useSkillResult; protobuf::BoolRes useSkillResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto request = THUAI62Proto::THUAI62ProtobufSkill(skillID, playerID, playerType);
auto status = THUAI6Stub->UseSkill(&context, request, &useSkillResult); auto status = THUAI6Stub->UseSkill(&context, request, &useSkillResult);
if (status.ok()) if (status.ok())
return useSkillResult.act_success(); return useSkillResult.act_success();
@@ -67,7 +67,7 @@ bool Communication::SendMessage(int64_t toID, std::string message, int64_t playe
{ {
protobuf::BoolRes sendMessageResult; protobuf::BoolRes sendMessageResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufSend(message, toID, playerID);
auto request = THUAI62Proto::THUAI62ProtobufSend(message, toID, playerID, playerType, playerType);
auto status = THUAI6Stub->SendMessage(&context, request, &sendMessageResult); auto status = THUAI6Stub->SendMessage(&context, request, &sendMessageResult);
if (status.ok()) if (status.ok())
return sendMessageResult.act_success(); return sendMessageResult.act_success();
@@ -75,11 +75,83 @@ bool Communication::SendMessage(int64_t toID, std::string message, int64_t playe
return false; return false;
} }


bool Communication::OpenDoor(int64_t playerID)
{
protobuf::BoolRes openDoorResult;
ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->OpenDoor(&context, request, &openDoorResult);
if (status.ok())
return openDoorResult.act_success();
else
return false;
}

bool Communication::CloseDoor(int64_t playerID)
{
protobuf::BoolRes closeDoorResult;
ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->CloseDoor(&context, request, &closeDoorResult);
if (status.ok())
return closeDoorResult.act_success();
else
return false;
}

bool Communication::SkipWindow(int64_t playerID)
{
protobuf::BoolRes skipWindowResult;
ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->SkipWindow(&context, request, &skipWindowResult);
if (status.ok())
return skipWindowResult.act_success();
else
return false;
}

bool Communication::StartOpenGate(int64_t playerID)
{
protobuf::BoolRes startOpenGateResult;
ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->StartOpenGate(&context, request, &startOpenGateResult);
if (status.ok())
return startOpenGateResult.act_success();
else
return false;
}

bool Communication::StartOpenChest(int64_t playerID)
{
protobuf::BoolRes startOpenChestResult;
ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->StartOpenChest(&context, request, &startOpenChestResult);
if (status.ok())
return startOpenChestResult.act_success();
else
return false;
}

bool Communication::EndAllAction(int64_t playerID)
{
protobuf::BoolRes endAllActionResult;
ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->EndAllAction(&context, request, &endAllActionResult);
if (status.ok())
return endAllActionResult.act_success();
else
return false;
}

bool Communication::Graduate(int64_t playerID) bool Communication::Graduate(int64_t playerID)
{ {
protobuf::BoolRes graduateResult; protobuf::BoolRes graduateResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->Graduate(&context, request, &graduateResult); auto status = THUAI6Stub->Graduate(&context, request, &graduateResult);
if (status.ok()) if (status.ok())
return graduateResult.act_success(); return graduateResult.act_success();
@@ -91,7 +163,7 @@ bool Communication::StartLearning(int64_t playerID)
{ {
protobuf::BoolRes startLearningResult; protobuf::BoolRes startLearningResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->StartLearning(&context, request, &startLearningResult); auto status = THUAI6Stub->StartLearning(&context, request, &startLearningResult);
if (status.ok()) if (status.ok())
return startLearningResult.act_success(); return startLearningResult.act_success();
@@ -99,38 +171,38 @@ bool Communication::StartLearning(int64_t playerID)
return false; return false;
} }


bool Communication::StartHelpMate(int64_t playerID)
bool Communication::StartRescueMate(int64_t playerID)
{ {
protobuf::BoolRes saveStudentResult; protobuf::BoolRes saveStudentResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto status = THUAI6Stub->StartHelpMate(&context, request, &saveStudentResult);
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->StartRescueMate(&context, request, &saveStudentResult);
if (status.ok()) if (status.ok())
return saveStudentResult.act_success(); return saveStudentResult.act_success();
else else
return false; return false;
} }


bool Communication::StartHealMate(int64_t playerID)
bool Communication::StartTreatMate(int64_t playerID)
{ {
protobuf::BoolRes healStudentResult; protobuf::BoolRes healStudentResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto status = THUAI6Stub->StartHealMate(&context, request, &healStudentResult);
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->StartTreatMate(&context, request, &healStudentResult);
if (status.ok()) if (status.ok())
return healStudentResult.act_success(); return healStudentResult.act_success();
else else
return false; return false;
} }


bool Communication::Trick(double angle, int64_t playerID)
bool Communication::Attack(double angle, int64_t playerID)
{ {
protobuf::BoolRes trickResult;
protobuf::BoolRes attackResult;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufTrick(angle, playerID);
auto status = THUAI6Stub->Trick(&context, request, &trickResult);
auto request = THUAI62Proto::THUAI62ProtobufAttack(angle, playerID, playerType);
auto status = THUAI6Stub->Attack(&context, request, &attackResult);
if (status.ok()) if (status.ok())
return trickResult.act_success();
return attackResult.act_success();
else else
return false; return false;
} }
@@ -139,7 +211,7 @@ bool Communication::TryConnection(int64_t playerID)
{ {
protobuf::BoolRes reply; protobuf::BoolRes reply;
ClientContext context; ClientContext context;
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
auto status = THUAI6Stub->TryConnection(&context, request, &reply); auto status = THUAI6Stub->TryConnection(&context, request, &reply);
if (status.ok()) if (status.ok())
{ {
@@ -173,7 +245,7 @@ void Communication::ReadMessage(int64_t playerID)
{ {
auto tRead = [=]() auto tRead = [=]()
{ {
auto request = THUAI62Proto::THUAI62ProtobufID(playerID);
auto request = THUAI62Proto::THUAI62ProtobufID(playerID, playerType);
ClientContext context; ClientContext context;
protobuf::MsgRes messageReceived; protobuf::MsgRes messageReceived;
auto reader = THUAI6Stub->GetMessage(&context, request); auto reader = THUAI6Stub->GetMessage(&context, request);
@@ -185,11 +257,12 @@ void Communication::ReadMessage(int64_t playerID)
std::thread(tRead).detach(); 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 = [=]() auto tMessage = [=]()
{ {
protobuf::PlayerMsg playerMsg = THUAI62Proto::THUAI62ProtobufPlayer(playerID, playerType, studentType, trickerType);
protobuf::PlayerMsg playerMsg = THUAI62Proto::THUAI62ProtobufPlayer(playerID, playerType_, studentType, trickerType);
grpc::ClientContext context; grpc::ClientContext context;
auto MessageReader = THUAI6Stub->AddPlayer(&context, playerMsg); auto MessageReader = THUAI6Stub->AddPlayer(&context, playerMsg);



CAPI/API/src/DebugAPI.cpp → CAPI/cpp/API/src/DebugAPI.cpp View File

@@ -156,11 +156,11 @@ std::future<bool> StudentDebugAPI::PickProp(THUAI6::PropType prop)
return result; }); return result; });
} }


std::future<bool> StudentDebugAPI::UseProp()
std::future<bool> StudentDebugAPI::UseProp(THUAI6::PropType prop)
{ {
logger->info("UseProp: called at {}ms", Time::TimeSinceStart(startPoint));
logger->info("UseProp: prop={}, called at {}ms", THUAI6::propTypeDict[prop], Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [=]() return std::async(std::launch::async, [=]()
{ auto result = logic.UseProp();
{ auto result = logic.UseProp(prop);
if (!result) if (!result)
logger->warn("UseProp: failed at {}ms", Time::TimeSinceStart(startPoint)); logger->warn("UseProp: failed at {}ms", Time::TimeSinceStart(startPoint));
return result; }); return result; });
@@ -176,31 +176,31 @@ std::future<bool> TrickerDebugAPI::PickProp(THUAI6::PropType prop)
return result; }); return result; });
} }


std::future<bool> TrickerDebugAPI::UseProp()
std::future<bool> TrickerDebugAPI::UseProp(THUAI6::PropType prop)
{ {
logger->info("UseProp: called at {}ms", Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [this]()
{ auto result = logic.UseProp();
logger->info("UseProp: prop={}, called at {}ms", THUAI6::propTypeDict[prop], Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [=]()
{ auto result = logic.UseProp(prop);
if (!result) if (!result)
logger->warn("UseProp: failed at {}ms", Time::TimeSinceStart(startPoint)); logger->warn("UseProp: failed at {}ms", Time::TimeSinceStart(startPoint));
return result; }); return result; });
} }


std::future<bool> StudentDebugAPI::UseSkill()
std::future<bool> StudentDebugAPI::UseSkill(int32_t skillID)
{ {
logger->info("UseSkill: called at {}ms", Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [this]()
{ auto result = logic.UseSkill();
logger->info("UseSkill: skillID={}, called at {}ms", skillID, Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [=]()
{ auto result = logic.UseSkill(skillID);
if (!result) if (!result)
logger->warn("UseSkill: failed at {}ms", Time::TimeSinceStart(startPoint)); logger->warn("UseSkill: failed at {}ms", Time::TimeSinceStart(startPoint));
return result; }); return result; });
} }


std::future<bool> TrickerDebugAPI::UseSkill()
std::future<bool> TrickerDebugAPI::UseSkill(int32_t skillID)
{ {
logger->info("UseSkill: called at {}ms", Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [this]()
{ auto result = logic.UseSkill();
logger->info("UseSkill: skillID={}, called at {}ms", skillID, Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [=]()
{ auto result = logic.UseSkill(skillID);
if (!result) if (!result)
logger->warn("UseSkill: failed at {}ms", Time::TimeSinceStart(startPoint)); logger->warn("UseSkill: failed at {}ms", Time::TimeSinceStart(startPoint));
return result; }); return result; });
@@ -358,23 +358,23 @@ std::future<bool> StudentDebugAPI::StartLearning()
return result; }); return result; });
} }


std::future<bool> StudentDebugAPI::StartHelpMate()
std::future<bool> StudentDebugAPI::StartRescueMate()
{ {
logger->info("StartHelpMate: called at {}ms", Time::TimeSinceStart(startPoint));
logger->info("StartRescueMate: called at {}ms", Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [this]() return std::async(std::launch::async, [this]()
{ auto result = logic.StartHelpMate();
{ auto result = logic.StartRescueMate();
if (!result) if (!result)
logger->warn("StartHelpMate: failed at {}ms", Time::TimeSinceStart(startPoint));
logger->warn("StartRescueMate: failed at {}ms", Time::TimeSinceStart(startPoint));
return result; }); return result; });
} }


std::future<bool> StudentDebugAPI::StartHealMate()
std::future<bool> StudentDebugAPI::StartTreatMate()
{ {
logger->info("StartHealMate: called at {}ms", Time::TimeSinceStart(startPoint));
logger->info("StartTreatMate: called at {}ms", Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [this]() return std::async(std::launch::async, [this]()
{ auto result = logic.StartHealMate();
{ auto result = logic.StartTreatMate();
if (!result) if (!result)
logger->warn("StartHealMate: failed at {}ms", Time::TimeSinceStart(startPoint));
logger->warn("StartTreatMate: failed at {}ms", Time::TimeSinceStart(startPoint));
return result; }); return result; });
} }


@@ -393,13 +393,13 @@ std::shared_ptr<const THUAI6::Student> StudentDebugAPI::GetSelfInfo() const
return logic.StudentGetSelfInfo(); return logic.StudentGetSelfInfo();
} }


std::future<bool> TrickerDebugAPI::Trick(double angleInRadian)
std::future<bool> TrickerDebugAPI::Attack(double angleInRadian)
{ {
logger->info("Trick: angleInRadian = {}, called at {}ms", angleInRadian, Time::TimeSinceStart(startPoint));
logger->info("Attack: angleInRadian = {}, called at {}ms", angleInRadian, Time::TimeSinceStart(startPoint));
return std::async(std::launch::async, [=]() return std::async(std::launch::async, [=]()
{ auto result = logic.Trick(angleInRadian);
{ auto result = logic.Attack(angleInRadian);
if (!result) if (!result)
logger->warn("Trick: failed at {}ms", Time::TimeSinceStart(startPoint));
logger->warn("Attack: failed at {}ms", Time::TimeSinceStart(startPoint));
return result; }); return result; });
} }


@@ -414,12 +414,16 @@ void StudentDebugAPI::PrintStudent() const
{ {
logger->info("******Student Info******"); logger->info("******Student Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y);
logger->info("speed={}, view range={}, skill time={}, prop={}, place={}", student->speed, student->viewRange, student->timeUntilSkillAvailable, THUAI6::propTypeDict[student->prop], THUAI6::placeTypeDict[student->place]);
logger->info("state={}, determination={}, fail num={}, fail time={}, emo time={}", THUAI6::studentStateDict[student->state], student->determination, student->failNum, student->failTime, student->emoTime);
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);
std::string studentBuff = "buff="; std::string studentBuff = "buff=";
std::string studentProp = "prop=";
for (auto buff : student->buff) for (auto buff : student->buff)
studentBuff += THUAI6::studentBuffDict[buff] + ", "; studentBuff += THUAI6::studentBuffDict[buff] + ", ";
for (auto prop : student->props)
studentProp += THUAI6::propTypeDict[prop] + ", ";
logger->info(studentBuff); logger->info(studentBuff);
logger->info(studentProp);
logger->info("**********************"); logger->info("**********************");
} }
} }
@@ -430,12 +434,16 @@ void TrickerDebugAPI::PrintStudent() const
{ {
logger->info("******Student Info******"); logger->info("******Student Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y);
logger->info("speed={}, view range={}, skill time={}, prop={}, place={}", student->speed, student->viewRange, student->timeUntilSkillAvailable, THUAI6::propTypeDict[student->prop], THUAI6::placeTypeDict[student->place]);
logger->info("state={}, determination={}, fail num={}, fail time={}, emo time={}", THUAI6::studentStateDict[student->state], student->determination, student->failNum, student->failTime, student->emoTime);
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);
std::string studentBuff = "buff="; std::string studentBuff = "buff=";
std::string studentProp = "prop=";
for (auto buff : student->buff) for (auto buff : student->buff)
studentBuff += THUAI6::studentBuffDict[buff] + ", "; studentBuff += THUAI6::studentBuffDict[buff] + ", ";
for (auto prop : student->props)
studentProp += THUAI6::propTypeDict[prop] + ", ";
logger->info(studentBuff); logger->info(studentBuff);
logger->info(studentProp);
logger->info("**********************"); logger->info("**********************");
} }
} }
@@ -446,12 +454,16 @@ void StudentDebugAPI::PrintTricker() const
{ {
logger->info("******Tricker Info******"); logger->info("******Tricker Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y);
logger->info("speed={}, view range={}, skill time={}, prop={}, place={}", tricker->speed, tricker->viewRange, tricker->timeUntilSkillAvailable, THUAI6::propTypeDict[tricker->prop], THUAI6::placeTypeDict[tricker->place]);
logger->info("damage={}, movable={}", tricker->damage, tricker->movable);
logger->info("speed={}, view range={}, skill time={}, place={}", tricker->speed, tricker->viewRange, tricker->timeUntilSkillAvailable, THUAI6::placeTypeDict[tricker->place]);
logger->info("damage={}, state={}", tricker->damage, THUAI6::playerStateDict[tricker->playerState]);
std::string trickerBuff = "buff="; std::string trickerBuff = "buff=";
for (auto buff : tricker->buff) for (auto buff : tricker->buff)
trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; trickerBuff += THUAI6::trickerBuffDict[buff] + ", ";
logger->info(trickerBuff); logger->info(trickerBuff);
std::string trickerProp = "prop=";
for (auto prop : tricker->props)
trickerProp += THUAI6::propTypeDict[prop] + ", ";
logger->info(trickerProp);
logger->info("************************"); logger->info("************************");
} }
} }
@@ -462,12 +474,16 @@ void TrickerDebugAPI::PrintTricker() const
{ {
logger->info("******Tricker Info******"); logger->info("******Tricker Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y);
logger->info("speed={}, view range={}, skill time={}, prop={}, place={}", tricker->speed, tricker->viewRange, tricker->timeUntilSkillAvailable, THUAI6::propTypeDict[tricker->prop], THUAI6::placeTypeDict[tricker->place]);
logger->info("damage={}, movable={}", tricker->damage, tricker->movable);
logger->info("speed={}, view range={}, skill time={}, place={}", tricker->speed, tricker->viewRange, tricker->timeUntilSkillAvailable, THUAI6::placeTypeDict[tricker->place]);
logger->info("damage={}, state={}", tricker->damage, THUAI6::playerStateDict[tricker->playerState]);
std::string trickerBuff = "buff="; std::string trickerBuff = "buff=";
for (auto buff : tricker->buff) for (auto buff : tricker->buff)
trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; trickerBuff += THUAI6::trickerBuffDict[buff] + ", ";
logger->info(trickerBuff); logger->info(trickerBuff);
std::string trickerProp = "prop=";
for (auto prop : tricker->props)
trickerProp += THUAI6::propTypeDict[prop] + ", ";
logger->info(trickerProp);
logger->info("************************"); logger->info("************************");
} }
} }
@@ -497,12 +513,16 @@ void StudentDebugAPI::PrintSelfInfo() const
auto self = logic.StudentGetSelfInfo(); auto self = logic.StudentGetSelfInfo();
logger->info("******Self Info******"); logger->info("******Self Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y); logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y);
logger->info("speed={}, view range={}, skill time={}, prop={}, place={}", self->speed, self->viewRange, self->timeUntilSkillAvailable, THUAI6::propTypeDict[self->prop], THUAI6::placeTypeDict[self->place]);
logger->info("state={}, determination={}, fail num={}, fail time={}, emo time={}", THUAI6::studentStateDict[self->state], self->determination, self->failNum, self->failTime, self->emoTime);
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);
std::string studentBuff = "buff="; std::string studentBuff = "buff=";
for (auto buff : self->buff) for (auto buff : self->buff)
studentBuff += THUAI6::studentBuffDict[buff] + ", "; studentBuff += THUAI6::studentBuffDict[buff] + ", ";
logger->info(studentBuff); logger->info(studentBuff);
std::string studentProp = "prop=";
for (auto prop : self->props)
studentProp += THUAI6::propTypeDict[prop] + ", ";
logger->info(studentProp);
logger->info("*********************"); logger->info("*********************");
} }


@@ -511,12 +531,16 @@ void TrickerDebugAPI::PrintSelfInfo() const
auto self = logic.TrickerGetSelfInfo(); auto self = logic.TrickerGetSelfInfo();
logger->info("******Self Info******"); logger->info("******Self Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y); logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y);
logger->info("speed={}, view range={}, skill time={}, prop={}, place={}", self->speed, self->viewRange, self->timeUntilSkillAvailable, THUAI6::propTypeDict[self->prop], THUAI6::placeTypeDict[self->place]);
logger->info("damage={}, movable={}", self->damage, self->movable);
logger->info("speed={}, view range={}, skill time={}, place={}", self->speed, self->viewRange, self->timeUntilSkillAvailable, THUAI6::placeTypeDict[self->place]);
logger->info("damage={}, state={}", self->damage, THUAI6::playerStateDict[self->playerState]);
std::string trickerBuff = "buff="; std::string trickerBuff = "buff=";
for (auto buff : self->buff) for (auto buff : self->buff)
trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; trickerBuff += THUAI6::trickerBuffDict[buff] + ", ";
logger->info(trickerBuff); logger->info(trickerBuff);
std::string trickerProp = "prop=";
for (auto prop : self->props)
trickerProp += THUAI6::propTypeDict[prop] + ", ";
logger->info(trickerProp);
logger->info("*********************"); logger->info("*********************");
} }



CAPI/API/src/logic.cpp → CAPI/cpp/API/src/logic.cpp View File

@@ -65,14 +65,14 @@ std::vector<std::vector<THUAI6::PlaceType>> Logic::GetFullMap() const
{ {
std::unique_lock<std::mutex> lock(mtxState); std::unique_lock<std::mutex> lock(mtxState);
logger->debug("Called GetFullMap"); logger->debug("Called GetFullMap");
return currentState->gamemap;
return currentState->gameMap->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<std::mutex> lock(mtxState); std::unique_lock<std::mutex> lock(mtxState);
logger->debug("Called GetPlaceType"); logger->debug("Called GetPlaceType");
return currentState->gamemap[CellX][CellY];
return currentState->gameMap->gameMap[CellX][CellY];
} }


bool Logic::Move(int64_t time, double angle) bool Logic::Move(int64_t time, double angle)
@@ -87,16 +87,16 @@ bool Logic::PickProp(THUAI6::PropType prop)
return pComm->PickProp(prop, playerID); return pComm->PickProp(prop, playerID);
} }


bool Logic::UseProp()
bool Logic::UseProp(THUAI6::PropType prop)
{ {
logger->debug("Called UseProp"); logger->debug("Called UseProp");
return pComm->UseProp(playerID);
return pComm->UseProp(prop, playerID);
} }


bool Logic::UseSkill()
bool Logic::UseSkill(int32_t skill)
{ {
logger->debug("Called UseSkill"); logger->debug("Called UseSkill");
return pComm->UseSkill(playerID);
return pComm->UseSkill(skill, playerID);
} }


bool Logic::SendMessage(int64_t toID, std::string message) bool Logic::SendMessage(int64_t toID, std::string message)
@@ -129,22 +129,22 @@ bool Logic::StartLearning()
return pComm->StartLearning(playerID); return pComm->StartLearning(playerID);
} }


bool Logic::StartHelpMate()
bool Logic::StartTreatMate()
{ {
logger->debug("Called StartHelpMate");
return pComm->StartHelpMate(playerID);
logger->debug("Called StartTreatMate");
return pComm->StartTreatMate(playerID);
} }


bool Logic::StartHealMate()
bool Logic::StartRescueMate()
{ {
logger->debug("Called StartHealMate");
return pComm->StartHealMate(playerID);
logger->debug("Called StartRescueMate");
return pComm->StartRescueMate(playerID);
} }


bool Logic::Trick(double angle)
bool Logic::Attack(double angle)
{ {
logger->debug("Called Trick");
return pComm->Trick(angle, playerID);
logger->debug("Called Attack");
return pComm->Attack(angle, playerID);
} }


bool Logic::WaitThread() bool Logic::WaitThread()
@@ -171,12 +171,14 @@ void Logic::ProcessMessage()
case THUAI6::GameState::GameStart: case THUAI6::GameState::GameStart:
logger->info("Game Start!"); logger->info("Game Start!");


// 重新读取玩家的guid,guid确保人类在前屠夫在后
// 重新读取玩家的guid,保人类在前屠夫在后
playerGUIDs.clear(); playerGUIDs.clear();
for (auto student : clientMsg.student_message())
playerGUIDs.push_back(student.guid());
for (auto tricker : clientMsg.tricker_message())
playerGUIDs.push_back(tricker.guid());
for (const auto& obj : clientMsg.obj_message())
if (Proto2THUAI6::messageOfObjDict[obj.message_of_obj_case()] == THUAI6::MessageOfObj::StudentMessage)
playerGUIDs.push_back(obj.student_message().guid());
for (const auto& obj : clientMsg.obj_message())
if (Proto2THUAI6::messageOfObjDict[obj.message_of_obj_case()] == THUAI6::MessageOfObj::TrickerMessage)
playerGUIDs.push_back(obj.tricker_message().guid());
currentState->guids = playerGUIDs; currentState->guids = playerGUIDs;
bufferState->guids = playerGUIDs; bufferState->guids = playerGUIDs;


@@ -189,10 +191,12 @@ void Logic::ProcessMessage()
case THUAI6::GameState::GameRunning: case THUAI6::GameState::GameRunning:
// 重新读取玩家的guid,guid确保人类在前屠夫在后 // 重新读取玩家的guid,guid确保人类在前屠夫在后
playerGUIDs.clear(); playerGUIDs.clear();
for (auto student : clientMsg.student_message())
playerGUIDs.push_back(student.guid());
for (auto tricker : clientMsg.tricker_message())
playerGUIDs.push_back(tricker.guid());
for (const auto& obj : clientMsg.obj_message())
if (Proto2THUAI6::messageOfObjDict[obj.message_of_obj_case()] == THUAI6::MessageOfObj::StudentMessage)
playerGUIDs.push_back(obj.student_message().guid());
for (const auto& obj : clientMsg.obj_message())
if (Proto2THUAI6::messageOfObjDict[obj.message_of_obj_case()] == THUAI6::MessageOfObj::TrickerMessage)
playerGUIDs.push_back(obj.tricker_message().guid());
currentState->guids = playerGUIDs; currentState->guids = playerGUIDs;
bufferState->guids = playerGUIDs; bufferState->guids = playerGUIDs;


@@ -228,60 +232,66 @@ void Logic::LoadBuffer(protobuf::MessageToClient& message)


logger->debug("Buffer cleared!"); logger->debug("Buffer cleared!");
// 读取新的信息 // 读取新的信息
bufferState->gamemap = Proto2THUAI6::Protobuf2THUAI6Map(message.map_message());
bufferState->gameMap = Proto2THUAI6::Protobuf2THUAI6Map(message.map_message());
bufferState->gameInfo = Proto2THUAI6::Protobuf2THUAI6GameInfo(message.all_message());
if (playerType == THUAI6::PlayerType::StudentPlayer) if (playerType == THUAI6::PlayerType::StudentPlayer)
{ {
for (const auto& item : message.student_message())
{
if (item.player_id() == playerID)
{
bufferState->studentSelf = Proto2THUAI6::Protobuf2THUAI6Student(item);
}
bufferState->students.push_back(Proto2THUAI6::Protobuf2THUAI6Student(item));
logger->debug("Add Student!");
}
for (const auto& item : message.tricker_message())
{
if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.x(), item.y(), bufferState->studentSelf->place, Proto2THUAI6::placeTypeDict[item.place()], bufferState->gamemap))
for (const auto& item : message.obj_message())
if (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()] == THUAI6::MessageOfObj::StudentMessage)
{ {
bufferState->trickers.push_back(Proto2THUAI6::Protobuf2THUAI6Tricker(item));
logger->debug("Add Tricker!");
if (item.student_message().player_id() == playerID)
{
bufferState->studentSelf = Proto2THUAI6::Protobuf2THUAI6Student(item.student_message());
}
bufferState->students.push_back(Proto2THUAI6::Protobuf2THUAI6Student(item.student_message()));
logger->debug("Add Student!");
} }
}
for (const auto& item : message.obj_message())
if (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()] == THUAI6::MessageOfObj::TrickerMessage)
if (AssistFunction::HaveView(bufferState->studentSelf->viewRange, bufferState->studentSelf->x, bufferState->studentSelf->y, item.tricker_message().x(), item.tricker_message().y(), bufferState->studentSelf->place, Proto2THUAI6::placeTypeDict[item.tricker_message().place()], bufferState->gameMap->gameMap))
{
bufferState->trickers.push_back(Proto2THUAI6::Protobuf2THUAI6Tricker(item.tricker_message()));
logger->debug("Add Tricker!");
}
} }
else else
{ {
for (const auto& item : message.tricker_message())
for (const auto& item : message.obj_message())
{ {
if (item.player_id() == playerID)
if (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()] == THUAI6::MessageOfObj::TrickerMessage)
{ {
bufferState->trickerSelf = Proto2THUAI6::Protobuf2THUAI6Tricker(item);
if (item.tricker_message().player_id() == playerID)
{
bufferState->trickerSelf = Proto2THUAI6::Protobuf2THUAI6Tricker(item.tricker_message());
}
bufferState->trickers.push_back(Proto2THUAI6::Protobuf2THUAI6Tricker(item.tricker_message()));
logger->debug("Add Tricker!");
} }
bufferState->trickers.push_back(Proto2THUAI6::Protobuf2THUAI6Tricker(item));
logger->debug("Add Tricker!");
} }
for (const auto& item : message.student_message())
if (AssistFunction::HaveView(bufferState->trickerSelf->viewRange, bufferState->trickerSelf->x, bufferState->trickerSelf->y, item.x(), item.y(), bufferState->trickerSelf->place, Proto2THUAI6::placeTypeDict[item.place()], bufferState->gamemap))
{
bufferState->students.push_back(Proto2THUAI6::Protobuf2THUAI6Student(item));
logger->debug("Add Student!");
}
}
for (const auto& item : message.prop_message())
{
bufferState->props.push_back(Proto2THUAI6::Protobuf2THUAI6Prop(item));
logger->debug("Add Prop!");
}
for (const auto& item : message.bullet_message())
{
bufferState->bullets.push_back(Proto2THUAI6::Protobuf2THUAI6Bullet(item));
logger->debug("Add Bullet!");
}
for (const auto& item : message.bombed_bullet_message())
{
bufferState->bombedBullets.push_back(Proto2THUAI6::Protobuf2THUAI6BombedBullet(item));
logger->debug("Add BombedBullet!");
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))
{
bufferState->students.push_back(Proto2THUAI6::Protobuf2THUAI6Student(item.student_message()));
logger->debug("Add Student!");
}
} }
for (const auto& item : message.obj_message())
switch (Proto2THUAI6::messageOfObjDict[item.message_of_obj_case()])
{
case THUAI6::MessageOfObj::PropMessage:
bufferState->props.push_back(Proto2THUAI6::Protobuf2THUAI6Prop(item.prop_message()));
logger->debug("Add Prop!");
break;
case THUAI6::MessageOfObj::BulletMessage:
bufferState->bullets.push_back(Proto2THUAI6::Protobuf2THUAI6Bullet(item.bullet_message()));
logger->debug("Add Bullet!");
break;
case THUAI6::MessageOfObj::BombedBulletMessage:
bufferState->bombedBullets.push_back(Proto2THUAI6::Protobuf2THUAI6BombedBullet(item.bombed_bullet_message()));
logger->debug("Add BombedBullet!");
break;
}
if (asynchronous) if (asynchronous)
{ {
{ {

CAPI/API/src/main.cpp → CAPI/cpp/API/src/main.cpp View File


CAPI/CAPI.sln → CAPI/cpp/CAPI.sln View File


CAPI/CMakeLists.txt → CAPI/cpp/CMakeLists.txt View File


+ 1
- 0
CAPI/cpp/Develop Progress.md View File

@@ -0,0 +1 @@
更改规则后代码能够编译,但是有较多功能没有实现,例如新加的几个函数;同时,Debug模式的输出也有了较大差异,因此之后需要进行一定的重构。

CAPI/README.md → CAPI/cpp/README.md View File


CAPI/cpp/proto/Message2Clients.pb.cc
File diff suppressed because it is too large
View File


CAPI/cpp/proto/Message2Clients.pb.h
File diff suppressed because it is too large
View File


CAPI/cpp/proto/Message2Server.pb.cc
File diff suppressed because it is too large
View File


CAPI/cpp/proto/Message2Server.pb.h
File diff suppressed because it is too large
View File


CAPI/proto/MessageType.pb.cc → CAPI/cpp/proto/MessageType.pb.cc View File

@@ -33,37 +33,40 @@ const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARI
"\n\021MessageType.proto\022\010protobuf*{\n\nBulletT" "\n\021MessageType.proto\022\010protobuf*{\n\nBulletT"
"ype\022\024\n\020NULL_BULLET_TYPE\020\000\022\017\n\013LINE_BULLET" "ype\022\024\n\020NULL_BULLET_TYPE\020\000\022\017\n\013LINE_BULLET"
"\020\001\022\021\n\rCOMMON_BULLET\020\002\022\017\n\013FAST_BULLET\020\003\022\023" "\020\001\022\021\n\rCOMMON_BULLET\020\002\022\017\n\013FAST_BULLET\020\003\022\023"
"\n\017ORDINARY_BULLET\020\004\022\r\n\tATOM_BOMB\020\005*i\n\tPl"
"aceType\022\023\n\017NULL_PLACE_TYPE\020\000\022\010\n\004LAND\020\001\022\010"
"\n\004WALL\020\002\022\t\n\005GRASS\020\003\022\r\n\tCLASSROOM\020\004\022\010\n\004GA"
"TE\020\005\022\017\n\013HIDDEN_GATE\020\006*8\n\tShapeType\022\023\n\017NU"
"LL_SHAPE_TYPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*"
"N\n\010PropType\022\022\n\016NULL_PROP_TYPE\020\000\022\n\n\006PTYPE"
"1\020\001\022\n\n\006PTYPE2\020\002\022\n\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*"
"f\n\017StudentBuffType\022\023\n\017NULL_SBUFF_TYPE\020\000\022"
"\016\n\nSBUFFTYPE1\020\001\022\016\n\nSBUFFTYPE2\020\002\022\016\n\nSBUFF"
"TYPE3\020\003\022\016\n\nSBUFFTYPE4\020\004*\241\001\n\014StudentState"
"\022\017\n\013NULL_STATUS\020\000\022\010\n\004IDLE\020\001\022\014\n\010LEARNING\020"
"\002\022\014\n\010ADDICTED\020\003\022\010\n\004QUIT\020\004\022\r\n\tGRADUATED\020\005"
"\022\013\n\007TREATED\020\006\022\013\n\007RESCUED\020\007\022\013\n\007STUNNED\020\010\022"
"\014\n\010TREATING\020\t\022\014\n\010RESCUING\020\n*f\n\017TrickerBu"
"ffType\022\023\n\017NULL_TBUFF_TYPE\020\000\022\016\n\nTBUFFTYPE"
"1\020\001\022\016\n\nTBUFFTYPE2\020\002\022\016\n\nTBUFFTYPE3\020\003\022\016\n\nT"
"BUFFTYPE4\020\004*J\n\nPlayerType\022\024\n\020NULL_PLAYER"
"_TYPE\020\000\022\022\n\016STUDENT_PLAYER\020\001\022\022\n\016TRICKER_P"
"LAYER\020\002*l\n\013StudentType\022\025\n\021NULL_STUDENT_T"
"YPE\020\000\022\020\n\014STUDENTTYPE1\020\001\022\020\n\014STUDENTTYPE2\020"
"\002\022\020\n\014STUDENTTYPE3\020\003\022\020\n\014STUDENTTYPE4\020\004*l\n"
"\013TrickerType\022\025\n\021NULL_TRICKER_TYPE\020\000\022\020\n\014T"
"RICKERTYPE1\020\001\022\020\n\014TRICKERTYPE2\020\002\022\020\n\014TRICK"
"ERTYPE3\020\003\022\020\n\014TRICKERTYPE4\020\004*P\n\tGameState"
"\022\023\n\017NULL_GAME_STATE\020\000\022\016\n\nGAME_START\020\001\022\020\n"
"\014GAME_RUNNING\020\002\022\014\n\010GAME_END\020\003b\006proto3";
"\n\017ORDINARY_BULLET\020\004\022\r\n\tATOM_BOMB\020\005*\212\001\n\tP"
"laceType\022\023\n\017NULL_PLACE_TYPE\020\000\022\010\n\004LAND\020\001\022"
"\010\n\004WALL\020\002\022\t\n\005GRASS\020\003\022\r\n\tCLASSROOM\020\004\022\010\n\004G"
"ATE\020\005\022\017\n\013HIDDEN_GATE\020\006\022\n\n\006WINDOW\020\007\022\010\n\004DO"
"OR\020\010\022\t\n\005CHEST\020\t*8\n\tShapeType\022\023\n\017NULL_SHA"
"PE_TYPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*N\n\010Pro"
"pType\022\022\n\016NULL_PROP_TYPE\020\000\022\n\n\006PTYPE1\020\001\022\n\n"
"\006PTYPE2\020\002\022\n\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*f\n\017Stu"
"dentBuffType\022\023\n\017NULL_SBUFF_TYPE\020\000\022\016\n\nSBU"
"FFTYPE1\020\001\022\016\n\nSBUFFTYPE2\020\002\022\016\n\nSBUFFTYPE3\020"
"\003\022\016\n\nSBUFFTYPE4\020\004*\347\001\n\013PlayerState\022\017\n\013NUL"
"L_STATUS\020\000\022\010\n\004IDLE\020\001\022\014\n\010LEARNING\020\002\022\014\n\010AD"
"DICTED\020\003\022\010\n\004QUIT\020\004\022\r\n\tGRADUATED\020\005\022\013\n\007TRE"
"ATED\020\006\022\013\n\007RESCUED\020\007\022\013\n\007STUNNED\020\010\022\014\n\010TREA"
"TING\020\t\022\014\n\010RESCUING\020\n\022\014\n\010SWINGING\020\013\022\r\n\tAT"
"TACKING\020\014\022\013\n\007LOCKING\020\r\022\r\n\tRUMMAGING\020\016\022\014\n"
"\010CLIMBING\020\017*f\n\017TrickerBuffType\022\023\n\017NULL_T"
"BUFF_TYPE\020\000\022\016\n\nTBUFFTYPE1\020\001\022\016\n\nTBUFFTYPE"
"2\020\002\022\016\n\nTBUFFTYPE3\020\003\022\016\n\nTBUFFTYPE4\020\004*J\n\nP"
"layerType\022\024\n\020NULL_PLAYER_TYPE\020\000\022\022\n\016STUDE"
"NT_PLAYER\020\001\022\022\n\016TRICKER_PLAYER\020\002*l\n\013Stude"
"ntType\022\025\n\021NULL_STUDENT_TYPE\020\000\022\020\n\014STUDENT"
"TYPE1\020\001\022\020\n\014STUDENTTYPE2\020\002\022\020\n\014STUDENTTYPE"
"3\020\003\022\020\n\014STUDENTTYPE4\020\004*l\n\013TrickerType\022\025\n\021"
"NULL_TRICKER_TYPE\020\000\022\020\n\014TRICKERTYPE1\020\001\022\020\n"
"\014TRICKERTYPE2\020\002\022\020\n\014TRICKERTYPE3\020\003\022\020\n\014TRI"
"CKERTYPE4\020\004*P\n\tGameState\022\023\n\017NULL_GAME_ST"
"ATE\020\000\022\016\n\nGAME_START\020\001\022\020\n\014GAME_RUNNING\020\002\022"
"\014\n\010GAME_END\020\003b\006proto3";
static ::_pbi::once_flag descriptor_table_MessageType_2eproto_once; static ::_pbi::once_flag descriptor_table_MessageType_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_MessageType_2eproto = { const ::_pbi::DescriptorTable descriptor_table_MessageType_2eproto = {
false, false,
false, false,
1157,
1261,
descriptor_table_protodef_MessageType_2eproto, descriptor_table_protodef_MessageType_2eproto,
"MessageType.proto", "MessageType.proto",
&descriptor_table_MessageType_2eproto_once, &descriptor_table_MessageType_2eproto_once,
@@ -123,6 +126,9 @@ namespace protobuf
case 4: case 4:
case 5: case 5:
case 6: case 6:
case 7:
case 8:
case 9:
return true; return true;
default: default:
return false; return false;
@@ -187,12 +193,12 @@ namespace protobuf
} }
} }


const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentState_descriptor()
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlayerState_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[5]; return file_level_enum_descriptors_MessageType_2eproto[5];
} }
bool StudentState_IsValid(int value)
bool PlayerState_IsValid(int value)
{ {
switch (value) switch (value)
{ {
@@ -207,6 +213,11 @@ namespace protobuf
case 8: case 8:
case 9: case 9:
case 10: case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
return true; return true;
default: default:
return false; return false;

CAPI/proto/MessageType.pb.h → CAPI/cpp/proto/MessageType.pb.h View File

@@ -92,12 +92,15 @@ namespace protobuf
CLASSROOM = 4, CLASSROOM = 4,
GATE = 5, GATE = 5,
HIDDEN_GATE = 6, HIDDEN_GATE = 6,
WINDOW = 7,
DOOR = 8,
CHEST = 9,
PlaceType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), PlaceType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
PlaceType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() PlaceType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
}; };
bool PlaceType_IsValid(int value); bool PlaceType_IsValid(int value);
constexpr PlaceType PlaceType_MIN = NULL_PLACE_TYPE; constexpr PlaceType PlaceType_MIN = NULL_PLACE_TYPE;
constexpr PlaceType PlaceType_MAX = HIDDEN_GATE;
constexpr PlaceType PlaceType_MAX = CHEST;
constexpr int PlaceType_ARRAYSIZE = PlaceType_MAX + 1; constexpr int PlaceType_ARRAYSIZE = PlaceType_MAX + 1;


const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceType_descriptor(); const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceType_descriptor();
@@ -211,7 +214,7 @@ namespace protobuf
StudentBuffType_descriptor(), name, value StudentBuffType_descriptor(), name, value
); );
} }
enum StudentState : int
enum PlayerState : int
{ {
NULL_STATUS = 0, NULL_STATUS = 0,
IDLE = 1, IDLE = 1,
@@ -224,29 +227,34 @@ namespace protobuf
STUNNED = 8, STUNNED = 8,
TREATING = 9, TREATING = 9,
RESCUING = 10, RESCUING = 10,
StudentState_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
StudentState_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
SWINGING = 11,
ATTACKING = 12,
LOCKING = 13,
RUMMAGING = 14,
CLIMBING = 15,
PlayerState_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
PlayerState_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
}; };
bool StudentState_IsValid(int value);
constexpr StudentState StudentState_MIN = NULL_STATUS;
constexpr StudentState StudentState_MAX = RESCUING;
constexpr int StudentState_ARRAYSIZE = StudentState_MAX + 1;
bool PlayerState_IsValid(int value);
constexpr PlayerState PlayerState_MIN = NULL_STATUS;
constexpr PlayerState PlayerState_MAX = CLIMBING;
constexpr int PlayerState_ARRAYSIZE = PlayerState_MAX + 1;


const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentState_descriptor();
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlayerState_descriptor();
template<typename T> template<typename T>
inline const std::string& StudentState_Name(T enum_t_value)
inline const std::string& PlayerState_Name(T enum_t_value)
{ {
static_assert(::std::is_same<T, StudentState>::value || ::std::is_integral<T>::value, "Incorrect type passed to function StudentState_Name.");
static_assert(::std::is_same<T, PlayerState>::value || ::std::is_integral<T>::value, "Incorrect type passed to function PlayerState_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
StudentState_descriptor(), enum_t_value
PlayerState_descriptor(), enum_t_value
); );
} }
inline bool StudentState_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StudentState* value
inline bool PlayerState_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PlayerState* value
) )
{ {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<StudentState>(
StudentState_descriptor(), name, value
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<PlayerState>(
PlayerState_descriptor(), name, value
); );
} }
enum TrickerBuffType : int enum TrickerBuffType : int
@@ -472,13 +480,13 @@ inline const EnumDescriptor* GetEnumDescriptor<::protobuf::StudentBuffType>()
return ::protobuf::StudentBuffType_descriptor(); return ::protobuf::StudentBuffType_descriptor();
} }
template<> template<>
struct is_proto_enum<::protobuf::StudentState> : ::std::true_type
struct is_proto_enum<::protobuf::PlayerState> : ::std::true_type
{ {
}; };
template<> template<>
inline const EnumDescriptor* GetEnumDescriptor<::protobuf::StudentState>()
inline const EnumDescriptor* GetEnumDescriptor<::protobuf::PlayerState>()
{ {
return ::protobuf::StudentState_descriptor();
return ::protobuf::PlayerState_descriptor();
} }
template<> template<>
struct is_proto_enum<::protobuf::TrickerBuffType> : ::std::true_type struct is_proto_enum<::protobuf::TrickerBuffType> : ::std::true_type

CAPI/proto/Services.grpc.pb.cc → CAPI/cpp/proto/Services.grpc.pb.cc View File

@@ -32,10 +32,16 @@ namespace protobuf
"/protobuf.AvailableService/SendMessage", "/protobuf.AvailableService/SendMessage",
"/protobuf.AvailableService/GetMessage", "/protobuf.AvailableService/GetMessage",
"/protobuf.AvailableService/StartLearning", "/protobuf.AvailableService/StartLearning",
"/protobuf.AvailableService/StartHelpMate",
"/protobuf.AvailableService/StartHealMate",
"/protobuf.AvailableService/Trick",
"/protobuf.AvailableService/StartRescueMate",
"/protobuf.AvailableService/StartTreatMate",
"/protobuf.AvailableService/Attack",
"/protobuf.AvailableService/Graduate", "/protobuf.AvailableService/Graduate",
"/protobuf.AvailableService/OpenDoor",
"/protobuf.AvailableService/CloseDoor",
"/protobuf.AvailableService/SkipWindow",
"/protobuf.AvailableService/StartOpenGate",
"/protobuf.AvailableService/StartOpenChest",
"/protobuf.AvailableService/EndAllAction",
}; };


std::unique_ptr<AvailableService::Stub> AvailableService::NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) std::unique_ptr<AvailableService::Stub> AvailableService::NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
@@ -56,10 +62,16 @@ namespace protobuf
rpcmethod_SendMessage_(AvailableService_method_names[6], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_SendMessage_(AvailableService_method_names[6], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_GetMessage_(AvailableService_method_names[7], options.suffix_for_stats(), ::grpc::internal::RpcMethod::SERVER_STREAMING, channel), rpcmethod_GetMessage_(AvailableService_method_names[7], options.suffix_for_stats(), ::grpc::internal::RpcMethod::SERVER_STREAMING, channel),
rpcmethod_StartLearning_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_StartLearning_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_StartHelpMate_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_StartHealMate_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_Trick_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_Graduate_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
rpcmethod_StartRescueMate_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_StartTreatMate_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_Attack_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_Graduate_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_OpenDoor_(AvailableService_method_names[13], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_CloseDoor_(AvailableService_method_names[14], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
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)
{ {
} }


@@ -139,27 +151,27 @@ namespace protobuf
return result; return result;
} }


::grpc::Status AvailableService::Stub::PickProp(::grpc::ClientContext* context, const ::protobuf::PickMsg& request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Stub::PickProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::protobuf::BoolRes* response)
{ {
return ::grpc::internal::BlockingUnaryCall<::protobuf::PickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PickProp_, context, request, response);
return ::grpc::internal::BlockingUnaryCall<::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PickProp_, context, request, response);
} }


void AvailableService::Stub::async::PickProp(::grpc::ClientContext* context, const ::protobuf::PickMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
void AvailableService::Stub::async::PickProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{ {
::grpc::internal::CallbackUnaryCall<::protobuf::PickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PickProp_, context, request, response, std::move(f));
::grpc::internal::CallbackUnaryCall<::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PickProp_, context, request, response, std::move(f));
} }


void AvailableService::Stub::async::PickProp(::grpc::ClientContext* context, const ::protobuf::PickMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
void AvailableService::Stub::async::PickProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{ {
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PickProp_, context, request, response, reactor); ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PickProp_, context, request, response, reactor);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PickMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq)
{ {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::PickMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PickProp_, context, request);
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::PropMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PickProp_, context, request);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PickMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq)
{ {
auto* result = auto* result =
this->PrepareAsyncPickPropRaw(context, request, cq); this->PrepareAsyncPickPropRaw(context, request, cq);
@@ -167,27 +179,27 @@ namespace protobuf
return result; return result;
} }


::grpc::Status AvailableService::Stub::UseProp(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Stub::UseProp(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::protobuf::BoolRes* response)
{ {
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseProp_, context, request, response);
return ::grpc::internal::BlockingUnaryCall<::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseProp_, context, request, response);
} }


void AvailableService::Stub::async::UseProp(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
void AvailableService::Stub::async::UseProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{ {
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseProp_, context, request, response, std::move(f));
::grpc::internal::CallbackUnaryCall<::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseProp_, context, request, response, std::move(f));
} }


void AvailableService::Stub::async::UseProp(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
void AvailableService::Stub::async::UseProp(::grpc::ClientContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{ {
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseProp_, context, request, response, reactor); ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseProp_, context, request, response, reactor);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq)
{ {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseProp_, context, request);
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::PropMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseProp_, context, request);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::PropMsg& request, ::grpc::CompletionQueue* cq)
{ {
auto* result = auto* result =
this->PrepareAsyncUsePropRaw(context, request, cq); this->PrepareAsyncUsePropRaw(context, request, cq);
@@ -195,27 +207,27 @@ namespace protobuf
return result; return result;
} }


::grpc::Status AvailableService::Stub::UseSkill(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Stub::UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::protobuf::BoolRes* response)
{ {
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseSkill_, context, request, response);
return ::grpc::internal::BlockingUnaryCall<::protobuf::SkillMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseSkill_, context, request, response);
} }


void AvailableService::Stub::async::UseSkill(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
void AvailableService::Stub::async::UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{ {
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSkill_, context, request, response, std::move(f));
::grpc::internal::CallbackUnaryCall<::protobuf::SkillMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSkill_, context, request, response, std::move(f));
} }


void AvailableService::Stub::async::UseSkill(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
void AvailableService::Stub::async::UseSkill(::grpc::ClientContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{ {
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSkill_, context, request, response, reactor); ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSkill_, context, request, response, reactor);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq)
{ {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseSkill_, context, request);
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::SkillMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseSkill_, context, request);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::SkillMsg& request, ::grpc::CompletionQueue* cq)
{ {
auto* result = auto* result =
this->PrepareAsyncUseSkillRaw(context, request, cq); this->PrepareAsyncUseSkillRaw(context, request, cq);
@@ -299,86 +311,86 @@ namespace protobuf
return result; return result;
} }


::grpc::Status AvailableService::Stub::StartHelpMate(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Stub::StartRescueMate(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{ {
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartHelpMate_, context, request, response);
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartRescueMate_, context, request, response);
} }


void AvailableService::Stub::async::StartHelpMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
void AvailableService::Stub::async::StartRescueMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{ {
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartHelpMate_, context, request, response, std::move(f));
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartRescueMate_, context, request, response, std::move(f));
} }


void AvailableService::Stub::async::StartHelpMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
void AvailableService::Stub::async::StartRescueMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{ {
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartHelpMate_, context, request, response, reactor);
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartRescueMate_, context, request, response, reactor);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncStartHelpMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncStartRescueMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{ {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_StartHelpMate_, context, request);
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_StartRescueMate_, context, request);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncStartHelpMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncStartRescueMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{ {
auto* result = auto* result =
this->PrepareAsyncStartHelpMateRaw(context, request, cq);
this->PrepareAsyncStartRescueMateRaw(context, request, cq);
result->StartCall(); result->StartCall();
return result; return result;
} }


::grpc::Status AvailableService::Stub::StartHealMate(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Stub::StartTreatMate(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{ {
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartHealMate_, context, request, response);
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartTreatMate_, context, request, response);
} }


void AvailableService::Stub::async::StartHealMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
void AvailableService::Stub::async::StartTreatMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{ {
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartHealMate_, context, request, response, std::move(f));
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartTreatMate_, context, request, response, std::move(f));
} }


void AvailableService::Stub::async::StartHealMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
void AvailableService::Stub::async::StartTreatMate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{ {
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartHealMate_, context, request, response, reactor);
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartTreatMate_, context, request, response, reactor);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncStartHealMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncStartTreatMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{ {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_StartHealMate_, context, request);
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_StartTreatMate_, context, request);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncStartHealMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncStartTreatMateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{ {
auto* result = auto* result =
this->PrepareAsyncStartHealMateRaw(context, request, cq);
this->PrepareAsyncStartTreatMateRaw(context, request, cq);
result->StartCall(); result->StartCall();
return result; return result;
} }


::grpc::Status AvailableService::Stub::Trick(::grpc::ClientContext* context, const ::protobuf::TrickMsg& request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Stub::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response)
{ {
return ::grpc::internal::BlockingUnaryCall<::protobuf::TrickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Trick_, context, request, response);
return ::grpc::internal::BlockingUnaryCall<::protobuf::AttackMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Attack_, context, request, response);
} }


void AvailableService::Stub::async::Trick(::grpc::ClientContext* context, const ::protobuf::TrickMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
void AvailableService::Stub::async::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{ {
::grpc::internal::CallbackUnaryCall<::protobuf::TrickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Trick_, context, request, response, std::move(f));
::grpc::internal::CallbackUnaryCall<::protobuf::AttackMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Attack_, context, request, response, std::move(f));
} }


void AvailableService::Stub::async::Trick(::grpc::ClientContext* context, const ::protobuf::TrickMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
void AvailableService::Stub::async::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{ {
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Trick_, context, request, response, reactor);
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Attack_, context, request, response, reactor);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncTrickRaw(::grpc::ClientContext* context, const ::protobuf::TrickMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq)
{ {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::TrickMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Trick_, context, request);
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::AttackMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Attack_, context, request);
} }


::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncTrickRaw(::grpc::ClientContext* context, const ::protobuf::TrickMsg& request, ::grpc::CompletionQueue* cq)
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq)
{ {
auto* result = auto* result =
this->PrepareAsyncTrickRaw(context, request, cq);
this->PrepareAsyncAttackRaw(context, request, cq);
result->StartCall(); result->StartCall();
return result; return result;
} }
@@ -411,6 +423,174 @@ namespace protobuf
return result; return result;
} }


::grpc::Status AvailableService::Stub::OpenDoor(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_OpenDoor_, context, request, response);
}

void AvailableService::Stub::async::OpenDoor(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_OpenDoor_, context, request, response, std::move(f));
}

void AvailableService::Stub::async::OpenDoor(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_OpenDoor_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncOpenDoorRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_OpenDoor_, context, request);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncOpenDoorRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
auto* result =
this->PrepareAsyncOpenDoorRaw(context, request, cq);
result->StartCall();
return result;
}

::grpc::Status AvailableService::Stub::CloseDoor(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CloseDoor_, context, request, response);
}

void AvailableService::Stub::async::CloseDoor(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CloseDoor_, context, request, response, std::move(f));
}

void AvailableService::Stub::async::CloseDoor(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CloseDoor_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncCloseDoorRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CloseDoor_, context, request);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncCloseDoorRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
auto* result =
this->PrepareAsyncCloseDoorRaw(context, request, cq);
result->StartCall();
return result;
}

::grpc::Status AvailableService::Stub::SkipWindow(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SkipWindow_, context, request, response);
}

void AvailableService::Stub::async::SkipWindow(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SkipWindow_, context, request, response, std::move(f));
}

void AvailableService::Stub::async::SkipWindow(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SkipWindow_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncSkipWindowRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SkipWindow_, context, request);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncSkipWindowRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
auto* result =
this->PrepareAsyncSkipWindowRaw(context, request, cq);
result->StartCall();
return result;
}

::grpc::Status AvailableService::Stub::StartOpenGate(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartOpenGate_, context, request, response);
}

void AvailableService::Stub::async::StartOpenGate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartOpenGate_, context, request, response, std::move(f));
}

void AvailableService::Stub::async::StartOpenGate(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartOpenGate_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncStartOpenGateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_StartOpenGate_, context, request);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncStartOpenGateRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
auto* result =
this->PrepareAsyncStartOpenGateRaw(context, request, cq);
result->StartCall();
return result;
}

::grpc::Status AvailableService::Stub::StartOpenChest(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartOpenChest_, context, request, response);
}

void AvailableService::Stub::async::StartOpenChest(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartOpenChest_, context, request, response, std::move(f));
}

void AvailableService::Stub::async::StartOpenChest(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartOpenChest_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncStartOpenChestRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_StartOpenChest_, context, request);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncStartOpenChestRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
auto* result =
this->PrepareAsyncStartOpenChestRaw(context, request, cq);
result->StartCall();
return result;
}

::grpc::Status AvailableService::Stub::EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_EndAllAction_, context, request, response);
}

void AvailableService::Stub::async::EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EndAllAction_, context, request, response, std::move(f));
}

void AvailableService::Stub::async::EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EndAllAction_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_EndAllAction_, context, request);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
auto* result =
this->PrepareAsyncEndAllActionRaw(context, request, cq);
result->StartCall();
return result;
}

AvailableService::Service::Service() AvailableService::Service::Service()
{ {
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
@@ -458,10 +638,10 @@ namespace protobuf
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[3], AvailableService_method_names[3],
::grpc::internal::RpcMethod::NORMAL_RPC, ::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::PickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service, [](AvailableService::Service* service,
::grpc::ServerContext* ctx, ::grpc::ServerContext* ctx,
const ::protobuf::PickMsg* req,
const ::protobuf::PropMsg* req,
::protobuf::BoolRes* resp) ::protobuf::BoolRes* resp)
{ {
return service->PickProp(ctx, req, resp); return service->PickProp(ctx, req, resp);
@@ -472,10 +652,10 @@ namespace protobuf
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[4], AvailableService_method_names[4],
::grpc::internal::RpcMethod::NORMAL_RPC, ::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::PropMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service, [](AvailableService::Service* service,
::grpc::ServerContext* ctx, ::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
const ::protobuf::PropMsg* req,
::protobuf::BoolRes* resp) ::protobuf::BoolRes* resp)
{ {
return service->UseProp(ctx, req, resp); return service->UseProp(ctx, req, resp);
@@ -486,10 +666,10 @@ namespace protobuf
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[5], AvailableService_method_names[5],
::grpc::internal::RpcMethod::NORMAL_RPC, ::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::SkillMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service, [](AvailableService::Service* service,
::grpc::ServerContext* ctx, ::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
const ::protobuf::SkillMsg* req,
::protobuf::BoolRes* resp) ::protobuf::BoolRes* resp)
{ {
return service->UseSkill(ctx, req, resp); return service->UseSkill(ctx, req, resp);
@@ -548,7 +728,7 @@ namespace protobuf
const ::protobuf::IDMsg* req, const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp) ::protobuf::BoolRes* resp)
{ {
return service->StartHelpMate(ctx, req, resp);
return service->StartRescueMate(ctx, req, resp);
}, },
this this
) )
@@ -562,7 +742,7 @@ namespace protobuf
const ::protobuf::IDMsg* req, const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp) ::protobuf::BoolRes* resp)
{ {
return service->StartHealMate(ctx, req, resp);
return service->StartTreatMate(ctx, req, resp);
}, },
this this
) )
@@ -570,13 +750,13 @@ namespace protobuf
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[11], AvailableService_method_names[11],
::grpc::internal::RpcMethod::NORMAL_RPC, ::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::TrickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::AttackMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service, [](AvailableService::Service* service,
::grpc::ServerContext* ctx, ::grpc::ServerContext* ctx,
const ::protobuf::TrickMsg* req,
const ::protobuf::AttackMsg* req,
::protobuf::BoolRes* resp) ::protobuf::BoolRes* resp)
{ {
return service->Trick(ctx, req, resp);
return service->Attack(ctx, req, resp);
}, },
this this
) )
@@ -595,6 +775,90 @@ namespace protobuf
this this
) )
)); ));
AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[13],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service,
::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp)
{
return service->OpenDoor(ctx, req, resp);
},
this
)
));
AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[14],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service,
::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp)
{
return service->CloseDoor(ctx, req, resp);
},
this
)
));
AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[15],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service,
::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp)
{
return service->SkipWindow(ctx, req, resp);
},
this
)
));
AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[16],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service,
::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp)
{
return service->StartOpenGate(ctx, req, resp);
},
this
)
));
AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[17],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service,
::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp)
{
return service->StartOpenChest(ctx, req, resp);
},
this
)
));
AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[18],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service,
::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp)
{
return service->EndAllAction(ctx, req, resp);
},
this
)
));
} }


AvailableService::Service::~Service() AvailableService::Service::~Service()
@@ -625,7 +889,7 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::PickProp(::grpc::ServerContext* context, const ::protobuf::PickMsg* request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Service::PickProp(::grpc::ServerContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response)
{ {
(void)context; (void)context;
(void)request; (void)request;
@@ -633,7 +897,7 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::UseProp(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Service::UseProp(::grpc::ServerContext* context, const ::protobuf::PropMsg* request, ::protobuf::BoolRes* response)
{ {
(void)context; (void)context;
(void)request; (void)request;
@@ -641,7 +905,7 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::UseSkill(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Service::UseSkill(::grpc::ServerContext* context, const ::protobuf::SkillMsg* request, ::protobuf::BoolRes* response)
{ {
(void)context; (void)context;
(void)request; (void)request;
@@ -673,7 +937,7 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::StartHelpMate(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Service::StartRescueMate(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{ {
(void)context; (void)context;
(void)request; (void)request;
@@ -681,7 +945,7 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::StartHealMate(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Service::StartTreatMate(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{ {
(void)context; (void)context;
(void)request; (void)request;
@@ -689,7 +953,7 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::Trick(::grpc::ServerContext* context, const ::protobuf::TrickMsg* request, ::protobuf::BoolRes* response)
::grpc::Status AvailableService::Service::Attack(::grpc::ServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response)
{ {
(void)context; (void)context;
(void)request; (void)request;
@@ -705,4 +969,52 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::OpenDoor(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{
(void)context;
(void)request;
(void)response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status AvailableService::Service::CloseDoor(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{
(void)context;
(void)request;
(void)response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status AvailableService::Service::SkipWindow(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{
(void)context;
(void)request;
(void)response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status AvailableService::Service::StartOpenGate(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{
(void)context;
(void)request;
(void)response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status AvailableService::Service::StartOpenChest(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{
(void)context;
(void)request;
(void)response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status AvailableService::Service::EndAllAction(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{
(void)context;
(void)request;
(void)response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

} // namespace protobuf } // namespace protobuf

CAPI/cpp/proto/Services.grpc.pb.h
File diff suppressed because it is too large
View File


CAPI/proto/Services.pb.cc → CAPI/cpp/proto/Services.pb.cc View File

@@ -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) = const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\016Services.proto\022\010protobuf\032\025Message2Clie" "\n\016Services.proto\022\010protobuf\032\025Message2Clie"
"nts.proto\032\024Message2Server.proto2\262\007\n\020Avai"
"nts.proto\032\024Message2Server.proto2\350\007\n\020Avai"
"lableService\0223\n\rTryConnection\022\017.protobuf" "lableService\0223\n\rTryConnection\022\017.protobuf"
".IDMsg\032\021.protobuf.BoolRes\022=\n\tAddPlayer\022\023" ".IDMsg\032\021.protobuf.BoolRes\022=\n\tAddPlayer\022\023"
".protobuf.PlayerMsg\032\031.protobuf.MessageTo" ".protobuf.PlayerMsg\032\031.protobuf.MessageTo"
@@ -54,8 +54,10 @@ const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABL
".IDMsg\032\021.protobuf.BoolRes\0220\n\nSkipWindow\022" ".IDMsg\032\021.protobuf.BoolRes\0220\n\nSkipWindow\022"
"\017.protobuf.IDMsg\032\021.protobuf.BoolRes\0223\n\rS" "\017.protobuf.IDMsg\032\021.protobuf.BoolRes\0223\n\rS"
"tartOpenGate\022\017.protobuf.IDMsg\032\021.protobuf" "tartOpenGate\022\017.protobuf.IDMsg\032\021.protobuf"
".BoolRes\0222\n\014EndAllAction\022\017.protobuf.IDMs"
"g\032\021.protobuf.BoolResb\006proto3";
".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";
static const ::_pbi::DescriptorTable* const descriptor_table_Services_2eproto_deps[2] = { static const ::_pbi::DescriptorTable* const descriptor_table_Services_2eproto_deps[2] = {
&::descriptor_table_Message2Clients_2eproto, &::descriptor_table_Message2Clients_2eproto,
&::descriptor_table_Message2Server_2eproto, &::descriptor_table_Message2Server_2eproto,
@@ -64,7 +66,7 @@ static ::_pbi::once_flag descriptor_table_Services_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_Services_2eproto = { const ::_pbi::DescriptorTable descriptor_table_Services_2eproto = {
false, false,
false, false,
1028,
1082,
descriptor_table_protodef_Services_2eproto, descriptor_table_protodef_Services_2eproto,
"Services.proto", "Services.proto",
&descriptor_table_Services_2eproto_once, &descriptor_table_Services_2eproto_once,

CAPI/proto/Services.pb.h → CAPI/cpp/proto/Services.pb.h View File


CAPI/spdlog/include/spdlog/async.h → CAPI/cpp/spdlog/include/spdlog/async.h View File


CAPI/spdlog/include/spdlog/async_logger-inl.h → CAPI/cpp/spdlog/include/spdlog/async_logger-inl.h View File


CAPI/spdlog/include/spdlog/async_logger.h → CAPI/cpp/spdlog/include/spdlog/async_logger.h View File


CAPI/spdlog/include/spdlog/cfg/argv.h → CAPI/cpp/spdlog/include/spdlog/cfg/argv.h View File


CAPI/spdlog/include/spdlog/cfg/env.h → CAPI/cpp/spdlog/include/spdlog/cfg/env.h View File


CAPI/spdlog/include/spdlog/cfg/helpers-inl.h → CAPI/cpp/spdlog/include/spdlog/cfg/helpers-inl.h View File


CAPI/spdlog/include/spdlog/cfg/helpers.h → CAPI/cpp/spdlog/include/spdlog/cfg/helpers.h View File


CAPI/spdlog/include/spdlog/common-inl.h → CAPI/cpp/spdlog/include/spdlog/common-inl.h View File


CAPI/spdlog/include/spdlog/common.h → CAPI/cpp/spdlog/include/spdlog/common.h View File


CAPI/spdlog/include/spdlog/details/backtracer-inl.h → CAPI/cpp/spdlog/include/spdlog/details/backtracer-inl.h View File


CAPI/spdlog/include/spdlog/details/backtracer.h → CAPI/cpp/spdlog/include/spdlog/details/backtracer.h View File


CAPI/spdlog/include/spdlog/details/circular_q.h → CAPI/cpp/spdlog/include/spdlog/details/circular_q.h View File


CAPI/spdlog/include/spdlog/details/console_globals.h → CAPI/cpp/spdlog/include/spdlog/details/console_globals.h View File


CAPI/spdlog/include/spdlog/details/file_helper-inl.h → CAPI/cpp/spdlog/include/spdlog/details/file_helper-inl.h View File


CAPI/spdlog/include/spdlog/details/file_helper.h → CAPI/cpp/spdlog/include/spdlog/details/file_helper.h View File


CAPI/spdlog/include/spdlog/details/fmt_helper.h → CAPI/cpp/spdlog/include/spdlog/details/fmt_helper.h View File


CAPI/spdlog/include/spdlog/details/log_msg-inl.h → CAPI/cpp/spdlog/include/spdlog/details/log_msg-inl.h View File


CAPI/spdlog/include/spdlog/details/log_msg.h → CAPI/cpp/spdlog/include/spdlog/details/log_msg.h View File


CAPI/spdlog/include/spdlog/details/log_msg_buffer-inl.h → CAPI/cpp/spdlog/include/spdlog/details/log_msg_buffer-inl.h View File


CAPI/spdlog/include/spdlog/details/log_msg_buffer.h → CAPI/cpp/spdlog/include/spdlog/details/log_msg_buffer.h View File


CAPI/spdlog/include/spdlog/details/mpmc_blocking_q.h → CAPI/cpp/spdlog/include/spdlog/details/mpmc_blocking_q.h View File


CAPI/spdlog/include/spdlog/details/null_mutex.h → CAPI/cpp/spdlog/include/spdlog/details/null_mutex.h View File


CAPI/spdlog/include/spdlog/details/os-inl.h → CAPI/cpp/spdlog/include/spdlog/details/os-inl.h View File


CAPI/spdlog/include/spdlog/details/os.h → CAPI/cpp/spdlog/include/spdlog/details/os.h View File


CAPI/spdlog/include/spdlog/details/periodic_worker-inl.h → CAPI/cpp/spdlog/include/spdlog/details/periodic_worker-inl.h View File


CAPI/spdlog/include/spdlog/details/periodic_worker.h → CAPI/cpp/spdlog/include/spdlog/details/periodic_worker.h View File


CAPI/spdlog/include/spdlog/details/registry-inl.h → CAPI/cpp/spdlog/include/spdlog/details/registry-inl.h View File


CAPI/spdlog/include/spdlog/details/registry.h → CAPI/cpp/spdlog/include/spdlog/details/registry.h View File


CAPI/spdlog/include/spdlog/details/synchronous_factory.h → CAPI/cpp/spdlog/include/spdlog/details/synchronous_factory.h View File


CAPI/spdlog/include/spdlog/details/tcp_client-windows.h → CAPI/cpp/spdlog/include/spdlog/details/tcp_client-windows.h View File


CAPI/spdlog/include/spdlog/details/tcp_client.h → CAPI/cpp/spdlog/include/spdlog/details/tcp_client.h View File


CAPI/spdlog/include/spdlog/details/thread_pool-inl.h → CAPI/cpp/spdlog/include/spdlog/details/thread_pool-inl.h View File


CAPI/spdlog/include/spdlog/details/thread_pool.h → CAPI/cpp/spdlog/include/spdlog/details/thread_pool.h View File


CAPI/spdlog/include/spdlog/details/udp_client-windows.h → CAPI/cpp/spdlog/include/spdlog/details/udp_client-windows.h View File


CAPI/spdlog/include/spdlog/details/udp_client.h → CAPI/cpp/spdlog/include/spdlog/details/udp_client.h View File


CAPI/spdlog/include/spdlog/details/windows_include.h → CAPI/cpp/spdlog/include/spdlog/details/windows_include.h View File


CAPI/spdlog/include/spdlog/fmt/bin_to_hex.h → CAPI/cpp/spdlog/include/spdlog/fmt/bin_to_hex.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/args.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/args.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/chrono.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/chrono.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/color.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/color.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/compile.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/compile.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/core.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/core.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/fmt.license.rst → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/fmt.license.rst View File


CAPI/spdlog/include/spdlog/fmt/bundled/format-inl.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/format-inl.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/format.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/format.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/locale.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/locale.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/os.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/os.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/ostream.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/ostream.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/printf.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/printf.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/ranges.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/ranges.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/std.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/std.h View File


CAPI/spdlog/include/spdlog/fmt/bundled/xchar.h → CAPI/cpp/spdlog/include/spdlog/fmt/bundled/xchar.h View File


CAPI/spdlog/include/spdlog/fmt/chrono.h → CAPI/cpp/spdlog/include/spdlog/fmt/chrono.h View File


CAPI/spdlog/include/spdlog/fmt/compile.h → CAPI/cpp/spdlog/include/spdlog/fmt/compile.h View File


CAPI/spdlog/include/spdlog/fmt/fmt.h → CAPI/cpp/spdlog/include/spdlog/fmt/fmt.h View File


CAPI/spdlog/include/spdlog/fmt/ostr.h → CAPI/cpp/spdlog/include/spdlog/fmt/ostr.h View File


CAPI/spdlog/include/spdlog/fmt/ranges.h → CAPI/cpp/spdlog/include/spdlog/fmt/ranges.h View File


CAPI/spdlog/include/spdlog/fmt/std.h → CAPI/cpp/spdlog/include/spdlog/fmt/std.h View File


CAPI/spdlog/include/spdlog/fmt/xchar.h → CAPI/cpp/spdlog/include/spdlog/fmt/xchar.h View File


CAPI/spdlog/include/spdlog/formatter.h → CAPI/cpp/spdlog/include/spdlog/formatter.h View File


CAPI/spdlog/include/spdlog/fwd.h → CAPI/cpp/spdlog/include/spdlog/fwd.h View File


CAPI/spdlog/include/spdlog/logger-inl.h → CAPI/cpp/spdlog/include/spdlog/logger-inl.h View File


CAPI/spdlog/include/spdlog/logger.h → CAPI/cpp/spdlog/include/spdlog/logger.h View File


CAPI/spdlog/include/spdlog/pattern_formatter-inl.h → CAPI/cpp/spdlog/include/spdlog/pattern_formatter-inl.h View File


CAPI/spdlog/include/spdlog/pattern_formatter.h → CAPI/cpp/spdlog/include/spdlog/pattern_formatter.h View File


CAPI/spdlog/include/spdlog/sinks/android_sink.h → CAPI/cpp/spdlog/include/spdlog/sinks/android_sink.h View File


CAPI/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h → CAPI/cpp/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save