Send artifact data with getplace
This commit is contained in:
parent
4cea9d1098
commit
0d1d76a86e
@ -19,8 +19,15 @@ if ($database->has("locations", ["osmid" => $VARS["id"]])) {
|
|||||||
foreach ($gameprops as $key => $value) {
|
foreach ($gameprops as $key => $value) {
|
||||||
$data[$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;
|
$data["artifacts"] = $artifacts;
|
||||||
}
|
}
|
||||||
|
|
||||||
exitWithJson(["status" => "OK", "place" => $data]);
|
exitWithJson(["status" => "OK", "place" => $data]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user