From 800231cf6481351032d4e5143edd54f5e7e3a179 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 31 Jan 2014 13:45:18 -0700 Subject: [PATCH 1/8] feat(quests): allow html in quest notes --- public/js/filters/filters.js | 5 +++++ src/controllers/groups.js | 4 +++- views/options/inventory/inventory.jade | 4 ++-- views/options/social/group.jade | 5 +++-- views/shared/modals/quests.jade | 6 +++--- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/public/js/filters/filters.js b/public/js/filters/filters.js index 9d2255d9e2..f2ba025772 100644 --- a/public/js/filters/filters.js +++ b/public/js/filters/filters.js @@ -8,4 +8,9 @@ angular.module('habitrpg') return function (gp) { return Math.floor((gp - Math.floor(gp))*100); } + }) + .filter('htmlDecode',function(){ + return function(html){ + return $('
').html(html).text(); + } }) \ No newline at end of file diff --git a/src/controllers/groups.js b/src/controllers/groups.js index 53d0a6f040..cafd53dff7 100644 --- a/src/controllers/groups.js +++ b/src/controllers/groups.js @@ -539,7 +539,9 @@ api.questAccept = function(req, res) { // If ?key=xxx is provided, we're starting a new quest and inviting the party. Otherwise, we're a party member accepting the invitation if (key) { - if (!shared.content.quests[key]) return res.json(404,{err:'Quest ' + key + ' not found'}); + var quest = shared.content.quests[key]; + if (!quest) return res.json(404,{err:'Quest ' + key + ' not found'}); + if (quest.lvl && user.stats.lvl < quest.lvl) return res.json(400, {err: "You must be level "+quest.lvl+" to being this quest."}); if (group.quest.key) return res.json(400, {err: 'Party already on a quest (and only have one quest at a time)'}); if (!user.items.quests[key]) return res.json(401, {err: "You don't own that quest scroll"}); group.quest.key = key; diff --git a/views/options/inventory/inventory.jade b/views/options/inventory/inventory.jade index 66bc97c7f1..6a4d85a2e4 100644 --- a/views/options/inventory/inventory.jade +++ b/views/options/inventory/inventory.jade @@ -47,7 +47,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html') p.muted(ng-show='questCount < 1')=env.t('noScrolls') p.muted!=env.t('scrollsText1') + ' ' + env.t('scrollsText2') + '' div(ng-repeat='(quest_key,points) in ownedItems(user.items.quests)', ng-init='quest = Content.quests[quest_key]') - button.customize-option(popover="{{quest.previous && !user.achievements.quests[quest.previous] ? env.t('scrollsPre') : quest.notes}}", popover-title='{{quest.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='showQuest(quest_key)', class='inventory_quest_scroll', ng-class='{locked: quest.previous && !user.achievements.quests[quest.previous]}') + button.customize-option(popover="{{quest.previous && !user.achievements.quests[quest.previous] ? env.t('scrollsPre') : quest.notes | htmlDecode}}", popover-title='{{quest.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='showQuest(quest_key)', class='inventory_quest_scroll', ng-class='{locked: quest.previous && !user.achievements.quests[quest.previous]}') .badge.badge-info.stack-count {{points}} li.customize-menu @@ -110,7 +110,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html') menu.pets-menu(label=env.t('quests')) p.muted!=env.t('scrollsText1') + ' ' + env.t('scrollsText2') + '' div(ng-repeat='quest in Content.quests') - button.customize-option(popover="{{quest.previous && !user.achievements.quests[quest.previous] ? env.t('scrollsPre') : quest.notes}}", popover-title='{{quest.text}}', popover-trigger='mouseenter', popover-placement='left', ng-click='buyQuest(quest.key)', class='inventory_quest_scroll', ng-class='{locked: quest.previous && !user.achievements.quests[quest.previous]}') + button.customize-option(popover="{{quest.previous && !user.achievements.quests[quest.previous] ? env.t('scrollsPre') : quest.notes | htmlDecode}}", popover-title='{{quest.text}}', popover-trigger='mouseenter', popover-placement='left', ng-click='buyQuest(quest.key)', class='inventory_quest_scroll', ng-class='{locked: quest.previous && !user.achievements.quests[quest.previous]}') p | {{quest.value}} span.Pet_Currency_Gem1x.inline-gems diff --git a/views/options/social/group.jade b/views/options/social/group.jade index ca7359a5f2..3235cea7a9 100644 --- a/views/options/social/group.jade +++ b/views/options/social/group.jade @@ -47,11 +47,12 @@ a.pull-right.gem-wallet(popover-trigger='mouseenter', popover-title=env.t('guild table.table.table-striped tr(ng-repeat='(k,v) in group.quest.progress.collect', class='quest_collected_{{v >= Content.quests[group.quest.key].collect[k].count}}') td - div(class='quest_{{group.quest.key}}_{{k}}') {{Content.quests[group.quest.key].collect[k].text}} + div.pull-left(class='quest_{{group.quest.key}}_{{k}}') + | {{Content.quests[group.quest.key].collect[k].text}} td {{v}} / {{Content.quests[group.quest.key].collect[k].count}} - p {{Content.quests[group.quest.key].notes}} + div(ng-bind-html='Content.quests[group.quest.key].notes') hr h5=env.t('participants') table.table.table-striped diff --git a/views/shared/modals/quests.jade b/views/shared/modals/quests.jade index 2849d230f2..2950fab26e 100644 --- a/views/shared/modals/quests.jade +++ b/views/shared/modals/quests.jade @@ -26,7 +26,7 @@ div(modal='modals.showQuest', ng-controller='InventoryCtrl') h3 {{selectedQuest.text}} .modal-body .pull-right(class='quest_{{selectedQuest.key}}') - p {{selectedQuest.notes}} + div(ng-bind-html='selectedQuest.notes') quest-rewards(key='{{selectedQuest.key}}') hr div(style='clear:left;clear:right') @@ -41,7 +41,7 @@ div(modal='modals.buyQuest', ng-controller='InventoryCtrl') h3 {{selectedQuest.text}} .modal-body .pull-right(class='quest_{{selectedQuest.key}}') - p {{selectedQuest.notes}} + div(ng-bind-html='selectedQuest.notes') quest-rewards(key='{{selectedQuest.key}}') .modal-footer button.btn.btn-large.cancel(ng-click='closeQuest()')=env.t('neverMind') @@ -52,7 +52,7 @@ div(modal='party.quest.key && !party.quest.active && !questHold && party.quest.m h3=env.t('questInvitation') | {{Content.quests[party.quest.key].text}} .modal-body - p {{Content.quests[party.quest.key].notes}} + div(ng-bind-html='Content.quests[party.quest.key].notes') quest-rewards(key='{{party.quest.key}}') .modal-footer button.btn.btn-default.btn-small.btn-cancel(ng-click='questHold = true')=env.t('askLater') From 54064debf3c95390b5507acd826f9db3339b9f09 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 31 Jan 2014 14:58:25 -0700 Subject: [PATCH 2/8] feat(quests): allow dropping scrolls in quests --- src/controllers/groups.js | 2 +- src/models/group.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/groups.js b/src/controllers/groups.js index cafd53dff7..cfdaa2d179 100644 --- a/src/controllers/groups.js +++ b/src/controllers/groups.js @@ -543,7 +543,7 @@ api.questAccept = function(req, res) { if (!quest) return res.json(404,{err:'Quest ' + key + ' not found'}); if (quest.lvl && user.stats.lvl < quest.lvl) return res.json(400, {err: "You must be level "+quest.lvl+" to being this quest."}); if (group.quest.key) return res.json(400, {err: 'Party already on a quest (and only have one quest at a time)'}); - if (!user.items.quests[key]) return res.json(401, {err: "You don't own that quest scroll"}); + if (!user.items.quests[key]) return res.json(400, {err: "You don't own that quest scroll"}); group.quest.key = key; group.quest.members = {}; // Invite everyone. true means "accepted", false="rejected", undefined="pending". Once we click "start quest" diff --git a/src/models/group.js b/src/models/group.js index 4d1e8b3ed4..fa901dad8f 100644 --- a/src/models/group.js +++ b/src/models/group.js @@ -148,6 +148,7 @@ GroupSchema.methods.finishQuest = function(quest, cb) { case 'eggs': case 'food': case 'hatchingPotions': + case 'quests': updates['$inc']['items.'+item.type+'.'+dropK] = _.where(quest.drop.items,{type:item.type,key:item.key}).length; break; case 'pets': From e3e539958410150257ccea25439d4486fce81f88 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 31 Jan 2014 14:58:59 -0700 Subject: [PATCH 3/8] test(quests): change quest tests from gryphon => vice1 --- test/api.mocha.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/test/api.mocha.js b/test/api.mocha.js index 6c66b612e5..d0f9ca511e 100644 --- a/test/api.mocha.js +++ b/test/api.mocha.js @@ -288,7 +288,8 @@ describe('API', function () { request.post(baseURL+'/user/batch-update') .send([ {op:'score',params:{direction:'up',id:user.dailys[0].id}}, - {op:'score',params:{direction:'up',id:user.dailys[1].id}} + {op:'score',params:{direction:'up',id:user.dailys[1].id}}, + {op:'update',body:{'stats.lvl':50}} ]) .end(function(res){ user = res.body; @@ -344,21 +345,21 @@ describe('API', function () { // Start the quest async.waterfall([ function (cb) { - request.post(baseURL + "/groups/" + group._id + "/questAccept?key=gryphon") + request.post(baseURL + "/groups/" + group._id + "/questAccept?key=vice1") .end(function (res) { - expectCode(res, 401); - User.findByIdAndUpdate(_id, {$set: {'items.quests.gryphon':1}}, cb); + expectCode(res, 400); + User.findByIdAndUpdate(_id, {$set: {'items.quests.vice1':1}}, cb); }); }, function (_user,cb) { - request.post(baseURL + "/groups/" + group._id + "/questAccept?key=gryphon") + request.post(baseURL + "/groups/" + group._id + "/questAccept?key=vice1") .end(function (res) { expectCode(res, 200); Group.findById(group._id, cb); }); }, function (_group,cb) { - expect(_group.quest.key).to.be('gryphon'); + expect(_group.quest.key).to.be('vice1'); expect(_group.quest.active).to.be(false); request.post(baseURL + "/groups/" + group._id + "/questAccept") @@ -435,7 +436,7 @@ describe('API', function () { request.post(baseURL+'/user/batch-update') .end(function(){ request.get(baseURL+'/groups/party').end(function(res){ - expect(res.body.quest.progress.hp).to.be.below(shared.content.quests.gryphon.boss.hp); + expect(res.body.quest.progress.hp).to.be.below(shared.content.quests.vice1.boss.hp); var _party = res.body.members; expect(_.find(_party,{_id:party[0]._id}).stats.hp).to.be.below(50); expect(_.find(_party,{_id:party[1]._id}).stats.hp).to.be.below(50); @@ -445,7 +446,7 @@ describe('API', function () { // Kill the boss function(cb){ - expect(user.items.eggs['Gryphon']).to.not.be.ok(); + expect(user.items.quests.vice2).to.not.be.ok(); Group.findByIdAndUpdate(group._id,{$set:{'quest.progress.hp':0}},cb); }, function(_group,cb){ @@ -465,12 +466,12 @@ describe('API', function () { }, function(_group,cb){ expect(_.isEmpty(_group.quest)).to.be(true); - expect(user.items.eggs['Gryphon']).to.be(2); - expect(_.find(_group.members,{_id:party[0]._id}).items.eggs['Gryphon']).to.be(2); - expect(_.find(_group.members,{_id:party[1]._id}).items.eggs['Gryphon']).to.be(2); - expect(_.find(_group.members,{_id:party[2]._id}).items.eggs['Gryphon']).to.not.be.ok(); - expect(user.stats.exp).to.be.above(shared.content.quests.gryphon.drop.exp); - expect(user.stats.gp).to.be.above(shared.content.quests.gryphon.drop.gp); + expect(user.items.quests.vice2).to.be(1); + expect(_.find(_group.members,{_id:party[0]._id}).items.quests.vice2).to.be(1); + expect(_.find(_group.members,{_id:party[1]._id}).items.quests.vice2).to.be(1); + expect(_.find(_group.members,{_id:party[2]._id}).items.quests.vice2).to.not.be.ok(); + expect(user.stats.exp).to.be.above(shared.content.quests.vice1.drop.exp); + expect(user.stats.gp).to.be.above(shared.content.quests.vice1.drop.gp); cb(); } ],done); From ada926de9a670d9046ae8df777343504ae792794 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 31 Jan 2014 15:03:41 -0700 Subject: [PATCH 4/8] test(quests): change quest testing from vice1 => vice3 (ps, I'm doing this to test drop types separately, preferable if we can us all 3 tests - this & previous commits) --- test/api.mocha.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/test/api.mocha.js b/test/api.mocha.js index d0f9ca511e..9b69fd461e 100644 --- a/test/api.mocha.js +++ b/test/api.mocha.js @@ -345,21 +345,21 @@ describe('API', function () { // Start the quest async.waterfall([ function (cb) { - request.post(baseURL + "/groups/" + group._id + "/questAccept?key=vice1") + request.post(baseURL + "/groups/" + group._id + "/questAccept?key=vice3") .end(function (res) { expectCode(res, 400); - User.findByIdAndUpdate(_id, {$set: {'items.quests.vice1':1}}, cb); + User.findByIdAndUpdate(_id, {$set: {'items.quests.vice3':1}}, cb); }); }, function (_user,cb) { - request.post(baseURL + "/groups/" + group._id + "/questAccept?key=vice1") + request.post(baseURL + "/groups/" + group._id + "/questAccept?key=vice3") .end(function (res) { expectCode(res, 200); Group.findById(group._id, cb); }); }, function (_group,cb) { - expect(_group.quest.key).to.be('vice1'); + expect(_group.quest.key).to.be('vice3'); expect(_group.quest.active).to.be(false); request.post(baseURL + "/groups/" + group._id + "/questAccept") @@ -436,7 +436,7 @@ describe('API', function () { request.post(baseURL+'/user/batch-update') .end(function(){ request.get(baseURL+'/groups/party').end(function(res){ - expect(res.body.quest.progress.hp).to.be.below(shared.content.quests.vice1.boss.hp); + expect(res.body.quest.progress.hp).to.be.below(shared.content.quests.vice3.boss.hp); var _party = res.body.members; expect(_.find(_party,{_id:party[0]._id}).stats.hp).to.be.below(50); expect(_.find(_party,{_id:party[1]._id}).stats.hp).to.be.below(50); @@ -446,7 +446,7 @@ describe('API', function () { // Kill the boss function(cb){ - expect(user.items.quests.vice2).to.not.be.ok(); + expect(user.items.gear.owned.weapon_special_2).to.not.be.ok(); Group.findByIdAndUpdate(group._id,{$set:{'quest.progress.hp':0}},cb); }, function(_group,cb){ @@ -466,12 +466,14 @@ describe('API', function () { }, function(_group,cb){ expect(_.isEmpty(_group.quest)).to.be(true); - expect(user.items.quests.vice2).to.be(1); - expect(_.find(_group.members,{_id:party[0]._id}).items.quests.vice2).to.be(1); - expect(_.find(_group.members,{_id:party[1]._id}).items.quests.vice2).to.be(1); - expect(_.find(_group.members,{_id:party[2]._id}).items.quests.vice2).to.not.be.ok(); - expect(user.stats.exp).to.be.above(shared.content.quests.vice1.drop.exp); - expect(user.stats.gp).to.be.above(shared.content.quests.vice1.drop.gp); + expect(user.items.gear.owned.weapon_special_2).to.be(true); + expect(user.items.eggs.Dragon).to.be(2); + expect(user.items.hatchingPotions.Shade).to.be(2); + expect(_.find(_group.members,{_id:party[0]._id}).items.gear.owned.weapon_special_2).to.be(true); + expect(_.find(_group.members,{_id:party[1]._id}).items.gear.owned.weapon_special_2).to.be(true); + expect(_.find(_group.members,{_id:party[2]._id}).items.gear.owned.weapon_special_2).to.not.be.ok(); + expect(user.stats.exp).to.be.above(shared.content.quests.vice3.drop.exp); + expect(user.stats.gp).to.be.above(shared.content.quests.vice3.drop.gp); cb(); } ],done); From b29231056b206c6faae0ab40c8499f98edfc489d Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 31 Jan 2014 15:36:47 -0700 Subject: [PATCH 5/8] chore(bailey): vice notif --- views/shared/modals/new-stuff.jade | 56 +++++++++++++++++------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/views/shared/modals/new-stuff.jade b/views/shared/modals/new-stuff.jade index 7349015eb1..c01b048260 100644 --- a/views/shared/modals/new-stuff.jade +++ b/views/shared/modals/new-stuff.jade @@ -25,34 +25,40 @@ div(modal='modals.newStuff') h3.popover-title a(target='_blank', href='https://twitter.com/Mihakuu') Bailey .popover-content + h5 Vice + p You awaken after the Winter Wonderland festivities and birthday celebrations with a smile. It's been a snowy, cheerful couple months, and the NPCs have finally returned to their normal attire. But today something is very wrong. Shadowy whisps cover the ground of Habitica, the sky has darkened. At the tavern you hear @DanielTheBard struming dark tales on his lute, and @Baconsaur peering into a mug, grumbling about his mounts swallowed in the shadows. They speak of the same thing: Vice, a dark an terrible foe. This new boss arc is a 3-part quest that requires level 30 to begin. Bring your strongest party members, and don't miss your dailies - there's a powerful weapon at the end! + p + small.muted by @baconsaur & @DanielTheBard + p + small.muted 02/01/2014 - table.table.table-striped - tr - td - h5 Happy Birthday, HabitRPG! - p The fair land of Habitica is two years old on January 31st! The NPCs are celebrating in style, and it looks like some of the staff is, too! Won't you join in? - tr - td - h5 Absurd Party Robtes - p As part of the festivities, Absurd Party Robes are available free of charge in the Item Store! Swath yourself in those silly garbs and don your matching hats to celebrate this momentous day. - tr - td - h5 Delicious Cake - p What would a birthday be without birthday cake in a myriad of flavors? Of course, pets are very picky, but luckily Lemoness and her team of bakers have plenty of slices to go around. Mmm, delicious! - tr - td - h5 Last Day of Winter Wonderland Event - p Also, just a reminder - January 31st is the final day of the Winter Wonderland event, so it's your last day to get the Limited Edition Winter Hair Colors, the Winter Outfits, the snowballs, and the Trapper Santa and Find the Cub quest scrolls. Remember that mid-progress Trapper Santa and Find the Cub quests will not abort, nor will you lose your scrolls - they will simply be removed from Alexander's marketplace. We hope that you've had a wonderful winter! - tr - td - h5 Birthday Bash Badge - p Finally, to commemorate the fun, all party participants receive a birthday badge! Polish it frequently and wear it fondly. + hr + h5 01/30/2014 + table.table.table-striped + tr + td + h5 Happy Birthday, HabitRPG! + p The fair land of Habitica is two years old on January 31st! The NPCs are celebrating in style, and it looks like some of the staff is, too! Won't you join in? + tr + td + h5 Absurd Party Robtes + p As part of the festivities, Absurd Party Robes are available free of charge in the Item Store! Swath yourself in those silly garbs and don your matching hats to celebrate this momentous day. + tr + td + h5 Delicious Cake + p What would a birthday be without birthday cake in a myriad of flavors? Of course, pets are very picky, but luckily Lemoness and her team of bakers have plenty of slices to go around. Mmm, delicious! + tr + td + h5 Last Day of Winter Wonderland Event + p Also, just a reminder - January 31st is the final day of the Winter Wonderland event, so it's your last day to get the Limited Edition Winter Hair Colors, the Winter Outfits, the snowballs, and the Trapper Santa and Find the Cub quest scrolls. Remember that mid-progress Trapper Santa and Find the Cub quests will not abort, nor will you lose your scrolls - they will simply be removed from Alexander's marketplace. We hope that you've had a wonderful winter! + tr + td + h5 Birthday Bash Badge + p Finally, to commemorate the fun, all party participants receive a birthday badge! Polish it frequently and wear it fondly. - p Thanks so much for being a part of the HabitRPG community. We love you guys, and we can't wait to have you at our sides in the upcoming year! Stay productive, Habiteers, and have an awesome day. + p Thanks so much for being a part of the HabitRPG community. We love you guys, and we can't wait to have you at our sides in the upcoming year! Stay productive, Habiteers, and have an awesome day. - p.muted By @lemoness - - small.muted 01/30/2014 + p.muted By @lemoness hr h5 01/28/2014 From a9d7add1e3ce0379ecf19454ae09168760f3ab1c Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 31 Jan 2014 22:03:52 -0700 Subject: [PATCH 6/8] chore(bailey): baconsaur update --- views/shared/modals/new-stuff.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/shared/modals/new-stuff.jade b/views/shared/modals/new-stuff.jade index c01b048260..f6601c3bb6 100644 --- a/views/shared/modals/new-stuff.jade +++ b/views/shared/modals/new-stuff.jade @@ -26,7 +26,7 @@ div(modal='modals.newStuff') a(target='_blank', href='https://twitter.com/Mihakuu') Bailey .popover-content h5 Vice - p You awaken after the Winter Wonderland festivities and birthday celebrations with a smile. It's been a snowy, cheerful couple months, and the NPCs have finally returned to their normal attire. But today something is very wrong. Shadowy whisps cover the ground of Habitica, the sky has darkened. At the tavern you hear @DanielTheBard struming dark tales on his lute, and @Baconsaur peering into a mug, grumbling about his mounts swallowed in the shadows. They speak of the same thing: Vice, a dark an terrible foe. This new boss arc is a 3-part quest that requires level 30 to begin. Bring your strongest party members, and don't miss your dailies - there's a powerful weapon at the end! + p You awaken after the Winter Wonderland festivities and birthday celebrations with a smile. It's been a snowy, cheerful couple months, and the NPCs have finally returned to their normal attire. But today something is very wrong. Shadowy whisps cover the ground of Habitica, the sky has darkened. At the tavern you hear @DanielTheBard struming dark tales on his lute, and @Baconsaur peering into a mug, grumbling about her mounts swallowed in the shadows. They speak of the same thing: Vice, a dark an terrible foe. This new boss arc is a 3-part quest that requires level 30 to begin. Bring your strongest party members, and don't miss your dailies - there's a powerful weapon at the end! p small.muted by @baconsaur & @DanielTheBard p From 2d97577708cc6d6db206c34195b33ed63aa1ee44 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Sat, 1 Feb 2014 07:01:40 -0600 Subject: [PATCH 7/8] Textual tweaks for spellcasting Makes the notification for casting a spell on the party consistent with the message generated in party chat. --- public/js/controllers/rootCtrl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/controllers/rootCtrl.js b/public/js/controllers/rootCtrl.js index 869b47cf2c..e37a4a9662 100644 --- a/public/js/controllers/rootCtrl.js +++ b/public/js/controllers/rootCtrl.js @@ -191,9 +191,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ .success(function(){ var msg = "You cast " + spell.text; switch (type) { - case 'task': msg += ' on ' + target.text;break; - case 'user': msg += ' on ' + target.profile.name;break; - case 'party': msg += ' on the Party';break; + case 'task': msg += ' on ' + target.text + '.';break; + case 'user': msg += ' on ' + target.profile.name + '.';break; + case 'party': msg += ' for the Party.';break; } Notification.text(msg); }); From 52f8f0d5b0fdf4271fcb5f7d497ad3bf544c24e8 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sat, 1 Feb 2014 07:43:01 -0800 Subject: [PATCH 8/8] feat(winter): remove winter scrolls & snowballs --- views/options/inventory/inventory.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/options/inventory/inventory.jade b/views/options/inventory/inventory.jade index 6a4d85a2e4..641b48e7b1 100644 --- a/views/options/inventory/inventory.jade +++ b/views/options/inventory/inventory.jade @@ -109,7 +109,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html') li.customize-menu menu.pets-menu(label=env.t('quests')) p.muted!=env.t('scrollsText1') + ' ' + env.t('scrollsText2') + '' - div(ng-repeat='quest in Content.quests') + div(ng-repeat='quest in Content.quests', ng-if='quest.canBuy') button.customize-option(popover="{{quest.previous && !user.achievements.quests[quest.previous] ? env.t('scrollsPre') : quest.notes | htmlDecode}}", popover-title='{{quest.text}}', popover-trigger='mouseenter', popover-placement='left', ng-click='buyQuest(quest.key)', class='inventory_quest_scroll', ng-class='{locked: quest.previous && !user.achievements.quests[quest.previous]}') p | {{quest.value}} @@ -127,7 +127,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html') p | 4 span.Pet_Currency_Gem1x.inline-gems - div + //-div button.customize-option(popover='{{Content.spells.special.snowball.notes}}', popover-title='{{Content.spells.special.snowball.text}}', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("special", Content.spells.special.snowball)', class='inventory_special_snowball') p | {{Content.spells.special.snowball.value}}