240827
This commit is contained in:
@@ -83,7 +83,7 @@ function getMedal(clear) {
|
||||
function getAppealCard(appeal) {
|
||||
|
||||
var result = appeal_db["appeal_card_data"]["card"].filter(object => object["@id"] == appeal);
|
||||
return "static/asset/ap_card/" + ((result.length > 0) ? result[0]["info"]["texture"] : 'ap_06_0001') + ".jpg"
|
||||
return "static/asset/ap_card/" + ((result.length > 0) ? result[0]["info"]["texture"] : 'ap_06_0001') + ".png"
|
||||
}
|
||||
|
||||
function getSongLevel(musicid, type) {
|
||||
|
||||
@@ -55,7 +55,10 @@ async function loadItems(itemSet, gene_edition, items_crew, items_stamp, items_s
|
||||
let geneItems = await getGeneratorEditionItems(gene_edition, itemSet)
|
||||
let itemCounts = countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys, items_sysbg)
|
||||
if(gene_edition === 'premium') {
|
||||
if(itemCounts[0] >= itemCounts[1]) $('#pregene-roll').attr('disabled', 'disabled')
|
||||
if(itemCounts[0] >= itemCounts[1]) {
|
||||
$('#pregene-roll').attr('disabled', 'disabled')
|
||||
checkSetReward(geneItems)
|
||||
}
|
||||
else $('#pregene-roll').removeAttr('disabled')
|
||||
} else if(gene_edition === 'valkyrie') {
|
||||
$('#valgene-roll').attr('disabled', 'disabled')
|
||||
@@ -126,6 +129,24 @@ function redirectAfterRoll() {
|
||||
location.search = urlParams;
|
||||
}
|
||||
|
||||
function checkSetReward(geneItems) {
|
||||
let refid = document.getElementsByName("refid")[0].value
|
||||
if ('reward' in geneItems) {
|
||||
emit('preGeneReward', {
|
||||
reward: geneItems.reward,
|
||||
refid: refid
|
||||
}).then(
|
||||
function(response) {
|
||||
if(response.data.received) {
|
||||
$('.modal-card-head').append('<p class="modal-card-title">Got reward for completing set - ' + response.data.reward[4] + '</p>')
|
||||
$('.modal-card-body').append('<img style="width: 400px; padding: 10px;" src="static/asset/valgene_item/item_' + response.data.reward[3] + '_' + response.data.reward[1] + '.png">')
|
||||
$('.modal-card-foot').append('<button onclick=redirectAfterRoll(); class="button is-primary">Close</button>')
|
||||
$('.modal').addClass('is-active')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(async function() {
|
||||
if(document.getElementById("data-pass-unlock-all").innerText === 'true') {
|
||||
$('.card-content').text("The \"Unlock All Valkyrie and Premium Items\" option is enabled. You wouldn't need this.")
|
||||
|
||||
Reference in New Issue
Block a user