Add api get_opcode_list

This commit is contained in:
Akkadius 2019-03-20 03:19:47 -05:00
parent 7a50ad4c11
commit c23f0eaefb

View File

@ -719,6 +719,16 @@ void callGetPacketStatistics(Json::Value &response)
}
}
void callGetOpcodeList(Json::Value &response)
{
for (auto i = 0; i < _maxEmuOpcode; ++i) {
Json::Value row = OpcodeNames[i];
response.append(row);
}
}
void EQEmuApiZoneDataService::get(Json::Value &response, const std::vector<std::string> &args)
{
std::string method = args[0];
@ -734,6 +744,9 @@ void EQEmuApiZoneDataService::get(Json::Value &response, const std::vector<std::
if (method == "get_packet_statistics") {
callGetPacketStatistics(response);
}
if (method == "get_opcode_list") {
callGetOpcodeList(response);
}
/**
* List detail