diff --git a/api/actions/getplace.php b/api/actions/getplace.php index 0febfa6..b712172 100644 --- a/api/actions/getplace.php +++ b/api/actions/getplace.php @@ -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]); \ No newline at end of file +exitWithJson(["status" => "OK", "place" => $data]);