Changed all party.quest.key instances in quest invite modal to user.party.quest.key and changed invite modal check

This commit is contained in:
hairlessbear
2015-05-27 18:49:35 -04:00
parent 966f9d2aca
commit dc8647d6ae
2 changed files with 11 additions and 12 deletions

View File

@@ -148,9 +148,8 @@ habitrpg.controller('NotificationCtrl',
});
// Quest invitation modal
$rootScope.$watch('user.party.quest.RSVPNeeded == true', function(after, before){
$rootScope.$watch('user.party.quest.RSVPNeeded', function(after, before){
if (after != true) return;
$rootScope.party.$get();
$rootScope.openModal('questInvitation');
});

View File

@@ -67,23 +67,23 @@ script(type='text/ng-template', id='modals/buyQuest.html')
script(type='text/ng-template', id='modals/questInvitation.html')
.modal-header
h4=env.t('questInvitation')
| {{::Content.quests[party.quest.key].text()}}
| {{::Content.quests[user.party.quest.key].text()}}
.modal-body
.pull-right-sm.text-center
.col-centered(class='quest_{{::Content.quests[party.quest.key].key}}')
div(ng-if='::Content.quests[party.quest.key].boss')
h4 {{::Content.quests[party.quest.key].boss.name()}}
.col-centered(class='quest_{{::Content.quests[user.party.quest.key].key}}')
div(ng-if='::Content.quests[user.party.quest.key].boss')
h4 {{::Content.quests[user.party.quest.key].boss.name()}}
p
strong=env.t('bossHP') + ': '
| {{::Content.quests[party.quest.key].boss.hp}}
| {{::Content.quests[user.party.quest.key].boss.hp}}
p
strong=env.t('bossStrength') + ': '
| {{::Content.quests[party.quest.key].boss.str}}
div(ng-if='::Content.quests[party.quest.key].collect')
p(ng-repeat='(k,v) in ::Content.quests[party.quest.key].collect')
| {{::Content.quests[user.party.quest.key].boss.str}}
div(ng-if='::Content.quests[user.party.quest.key].collect')
p(ng-repeat='(k,v) in ::Content.quests[user.party.quest.key].collect')
strong=env.t('collect') + ': '
| {{::Content.quests[party.quest.key].collect[k].count}} {{::Content.quests[party.quest.key].collect[k].text()}}
div(ng-bind-html='::Content.quests[party.quest.key].notes()')
| {{::Content.quests[user.party.quest.key].collect[k].count}} {{::Content.quests[user.party.quest.key].collect[k].text()}}
div(ng-bind-html='::Content.quests[user.party.quest.key].notes()')
quest-rewards(key='{{::user.party.quest.key}}', header=env.t('rewards'))
.modal-footer
button.btn.btn-default(ng-click='questHold = true; $close()')=env.t('askLater')