[WIP] Play Sounds in the new Client (#9012)

* move audioThemes to content - add audio settings

* copy audioFiles to website/static/audio - playSounds on $emit()

* Play Sounds for Rewards, Purchasing Items / Quests

* remove shop http-api calls

* play reward sound when buying gem

* fix lint / always show mysterybox
This commit is contained in:
negue
2017-09-02 20:24:53 +02:00
committed by GitHub
parent 0424d214c5
commit d051bdf2c9
197 changed files with 92 additions and 71 deletions

View File

@@ -291,7 +291,7 @@ export default {
let specialArray = itemsByType.special;
if (this.user.purchased.plan.mysteryItems.length) {
if (this.user.purchased.plan.customerId) {
specialArray.push({
key: 'mysteryItem',
class: `inventory_present inventory_present_${moment().format('MM')}`,
@@ -390,11 +390,16 @@ export default {
if (item.key === 'timeTravelers') {
this.$router.push({name: 'time'});
} else if (item.key === 'mysteryItem') {
if (item.quantity === 0)
return;
let result = await this.$store.dispatch('user:openMysteryItem');
let openedItem = result.data.data;
let text = this.content.gear.flat[openedItem.key].text();
this.drop(this.$t('messageDropMysteryItem', {dropText: text}), openedItem);
item.quantity--;
this.$forceUpdate();
} else {
this.selectedSpell = item;
}