Client sept 12 (#9032)

* Removed load all members from challengs

* Fixed chalenge member modal loading

* Fixed party setting

* Fixed chat showing

* Fixed armoire drops

* Ignored lint issue

* Fixed buying old armoir items

* Fixed hatching

* Fixed pending damage
This commit is contained in:
Keith Holliday
2017-09-12 12:56:06 -05:00
committed by GitHub
parent 0c6540e6d8
commit e29c393629
9 changed files with 36 additions and 12 deletions
@@ -286,7 +286,7 @@ export default {
methods: {
canViewFlag (message) {
if (message.uuid === this.user._id) return true;
if (message.flagCount === 0) return true;
if (!message.flagCount || message.flagCount === 0) return true;
return this.user.contributor.admin;
},
async loadProfileCache (screenPosition) {
+4 -3
View File
@@ -109,7 +109,8 @@
span.float-left
| {{parseFloat(group.quest.progress.hp).toFixed(2)}} / {{parseFloat(questData.boss.hp).toFixed(2)}}
.col-6
span.float-right {{group.quest.progress.up || 0}} pending damage
// @TODO: Why do we not sync quset progress on the group doc? Each user could have different progress
span.float-right {{user.party.quest.progress.up || 0}} pending damage
.row.rage-bar-row(v-if='questData.boss.rage')
.col-12
.grey-progress-bar
@@ -684,8 +685,8 @@ export default {
let group = await this.$store.dispatch('guilds:getGroup', {groupId: this.searchId});
if (this.isParty) {
this.$store.party = group;
this.group = this.$store.party;
this.$store.state.party.data = group;
this.group = this.$store.state.party.data;
this.checkForAchievements();
return;
}
@@ -185,10 +185,13 @@ export default {
userIdToMessage: '',
};
},
mounted () {
this.getMembers();
},
computed: {
...mapState({user: 'user.data'}),
isLeader () {
if (!this.group.leader) return false;
if (!this.group || !this.group.leader) return false;
return this.user._id === this.group.leader || this.user._id === this.group.leader._id;
},
groupIsSubscribed () {
@@ -245,7 +248,7 @@ export default {
}
if (this.$store.state.memberModalOptions.viewingMembers.length > 0) {
this.members = this.$store.state.viewingMembers;
this.members = this.$store.state.memberModalOptions.viewingMembers;
}
},
async clickMember (uid, forceShow) {
@@ -218,7 +218,7 @@ export default {
const response = await this.$store.dispatch('guilds:inviteToQuest', {groupId: this.group._id, key});
const quest = response.data.data;
this.$store.party.quest = quest;
this.$store.party.data.quest = quest;
this.$root.$emit('hide::modal', 'start-quest-modal');
},
},
@@ -1,5 +1,5 @@
<template lang="pug">
b-modal#modify-inventory(title="Modify Inventory", size='lg', :hide-footer="true")
b-modal#modify-inventory(v-if='user.profile', title="Modify Inventory", size='lg', :hide-footer="true")
.modal-header
h4 Modify Inventory for {{user.profile.name}}
.modal-body
+2 -2
View File
@@ -5,9 +5,9 @@ export default function createAnimal (egg, potion, type, content, userItems) {
key: animalKey,
class: type === 'pet' ? `Pet Pet-${animalKey}` : `Mount_Icon_${animalKey}`,
eggKey: egg.key,
eggName: egg.text(),
eggName: egg.text,
potionKey: potion.key,
potionName: potion.text(),
potionName: potion.text,
name: content[`${type}Info`][animalKey].text(),
isOwned () {
return userItems[`${type}s`][animalKey] > 0;
+1 -1
View File
@@ -26,7 +26,7 @@ export async function getGroupInvites (store, payload) {
}
export async function getChallengeMembers (store, payload) {
let url = `${apiV3Prefix}/challenges/${payload.challengeId}/members?includeAllMembers=true&includeAllPublicFields=true`;
let url = `${apiV3Prefix}/challenges/${payload.challengeId}/members?includeAllPublicFields=true`;
let response = await axios.get(url);
return response.data.data;
}
+15 -1
View File
@@ -6,6 +6,7 @@ import buyMysterySetOp from 'common/script/ops/buyMysterySet';
import hourglassPurchaseOp from 'common/script/ops/hourglassPurchase';
import sellOp from 'common/script/ops/sell';
import unlockOp from 'common/script/ops/unlock';
import buyArmoire from 'common/script/ops/buyArmoire';
export function buyItem (store, params) {
const user = store.state.user.data;
@@ -72,7 +73,20 @@ export function genericPurchase (store, params) {
case 'mystery_set':
return purchaseMysterySet(store, params);
case 'potion':
case 'armoire':
case 'armoire': // eslint-disable-line
let buyResult = buyArmoire(store.state.user.data);
// @TODO: We might need to abstract notifications to library rather than mixin
if (buyResult[1]) {
store.state.notificationStore.push({
title: '',
text: buyResult[1],
type: 'drop',
timeout: true,
});
}
return;
case 'marketGear':
return buyItem(store, params);
case 'background':
+6
View File
@@ -92,6 +92,12 @@ shops.checkMarketGearLocked = function checkMarketGearLocked (user, items) {
if (!gear.locked && !availableGear.includes(gear.path)) {
gear.locked = true;
}
// @TODO: I'm not sure what the logic for locking is supposed to be
// But, I am pretty sure if we pin an armoire item, it needs to be unlocked
if (gear.klass === 'armoire') {
gear.locked = false;
}
}
};