|
|
|
@ -19,8 +19,15 @@ if ($database->has("locations", ["osmid" => $VARS["id"]])) {
|
|
|
|
|
foreach ($gameprops as $key => $value) {
|
|
|
|
|
$data[$key] = $value;
|
|
|
|
|
}
|
|
|
|
|
$artifacts = $database->select("artifacts", ["[>]locations" => "locationid"], ["currentlife", "maxlife", "itemid"]);
|
|
|
|
|
$artifacts = $database->select("artifacts", [
|
|
|
|
|
"[>]locations" => "locationid",
|
|
|
|
|
"[>]items" => "itemid"
|
|
|
|
|
], [
|
|
|
|
|
"artifacts.currentlife", "artifacts.maxlife", "artifacts.itemid", "items.icon", "items.color"
|
|
|
|
|
], [
|
|
|
|
|
"locations.osmid" => $VARS["id"]
|
|
|
|
|
]);
|
|
|
|
|
$data["artifacts"] = $artifacts;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exitWithJson(["status" => "OK", "place" => $data]);
|
|
|
|
|
exitWithJson(["status" => "OK", "place" => $data]);
|
|
|
|
|