|
|
@ -142,6 +142,11 @@ function updatePlaceStats(id, successCallback, errorCallback) {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$("#magic-action-label").text("Attack");
|
|
|
|
$("#magic-action-label").text("Attack");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#place-artifact-list").html("");
|
|
|
|
|
|
|
|
place.artifacts.forEach(function (artifact) {
|
|
|
|
|
|
|
|
$("#place-artifact-list").append("<span id=\"artifact-icon-" + artifact.id + "\" data-artifact=\"" + artifact.id + "\" data-energy=\"" + artifact.energy + "\" data-maxenergy=\"" + artifact.maxenergy + "\" class=\"place-artifact-icon " + artifact.icon + " fa-2x margin-right text-color-" + artifact.color + "\"></span>");
|
|
|
|
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$("#place-info").addClass("color-white");
|
|
|
|
$("#place-info").addClass("color-white");
|
|
|
|
$("#place-image").attr("src", "img/place/white.png");
|
|
|
|
$("#place-image").attr("src", "img/place/white.png");
|
|
|
@ -170,6 +175,7 @@ $("#magic-action-button").click(function () {
|
|
|
|
password: localStorage.getItem("password"),
|
|
|
|
password: localStorage.getItem("password"),
|
|
|
|
id: $("#place-popup").data("placeid")
|
|
|
|
id: $("#place-popup").data("placeid")
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
updatePlaceStats($("#place-popup").data("placeid"));
|
|
|
|
app.toast.show({
|
|
|
|
app.toast.show({
|
|
|
|
text: '<i class="fas fa-check"></i> ' + resp.msg,
|
|
|
|
text: '<i class="fas fa-check"></i> ' + resp.msg,
|
|
|
|
position: "bottom",
|
|
|
|
position: "bottom",
|
|
|
|