Add error handler so that calls aren't made when zone isn't booted

This commit is contained in:
Akkadius 2019-03-19 16:34:12 -05:00
parent cbfd02b9ff
commit 81e511df13

View File

@ -654,6 +654,11 @@ void EQEmuApiZoneDataService::get(Json::Value &response, const std::vector<std::
{
std::string method = args[0];
if (!zone->IsLoaded()) {
response["error"] = "Zone must be loaded to invoke calls";
return;
}
if (method == "get_npc_list_detail") {
callGetNpcListDetail(response);
}