Adjusted Key to the Kennel logic so only *release both* is free with Triad Bingo achievement

This commit is contained in:
Kevin Gisi
2015-03-26 18:30:50 -04:00
parent 334393d33b
commit ca87a46b04
5 changed files with 18 additions and 27 deletions

View File

@@ -6172,15 +6172,13 @@ api.wrap = function(user, main) {
}, },
releasePets: function(req, cb) { releasePets: function(req, cb) {
var pet; var pet;
if (user.balance < 1 && !user.achievements.triadBingo) { if (user.balance < 1) {
return typeof cb === "function" ? cb({ return typeof cb === "function" ? cb({
code: 401, code: 401,
message: i18n.t('notEnoughGems', req.language) message: i18n.t('notEnoughGems', req.language)
}) : void 0; }) : void 0;
} else { } else {
if (!user.achievements.triadBingo) {
user.balance -= 1; user.balance -= 1;
}
for (pet in content.pets) { for (pet in content.pets) {
user.items.pets[pet] = 0; user.items.pets[pet] = 0;
} }
@@ -6194,15 +6192,13 @@ api.wrap = function(user, main) {
}, },
releaseMounts: function(req, cb) { releaseMounts: function(req, cb) {
var mount; var mount;
if (user.balance < 1 && !user.achievements.triadBingo) { if (user.balance < 1) {
return typeof cb === "function" ? cb({ return typeof cb === "function" ? cb({
code: 401, code: 401,
message: i18n.t('notEnoughGems', req.language) message: i18n.t('notEnoughGems', req.language)
}) : void 0; }) : void 0;
} else { } else {
if (!user.achievements.triadBingo) {
user.balance -= 1; user.balance -= 1;
}
user.items.currentMount = ""; user.items.currentMount = "";
for (mount in content.pets) { for (mount in content.pets) {
user.items.mounts[mount] = null; user.items.mounts[mount] = null;

View File

@@ -56,7 +56,7 @@
"petKeyInfo": "Miss the thrill of collecting pets? Now you can let them go, and have those drops be meaningful again!", "petKeyInfo": "Miss the thrill of collecting pets? Now you can let them go, and have those drops be meaningful again!",
"petKeyInfo2": "Use the Key to the Kennels to reset your non-quest collectible pets and/or mounts to zero. (Quest-only and Rare pets and mounts are not affected.)", "petKeyInfo2": "Use the Key to the Kennels to reset your non-quest collectible pets and/or mounts to zero. (Quest-only and Rare pets and mounts are not affected.)",
"petKeyInfo3": "There are three Keys to the Kennels: Release Pets Only (4 Gems), Release Mounts Only (4 Gems), or Release Both Pets and Mounts (6 Gems). Using a Key lets you stack the Beast Master and Mount Master achievements. The Triad Bingo achievement will only stack if you use the \"Release Both Pets and Mounts\" key and have collected all 90 pets a second time. Show the world just how much of collection master you are! But choose wisely, because once you use a Key and open the kennel or stable doors, you won't be able to get them back without collecting them all again...", "petKeyInfo3": "There are three Keys to the Kennels: Release Pets Only (4 Gems), Release Mounts Only (4 Gems), or Release Both Pets and Mounts (6 Gems). Using a Key lets you stack the Beast Master and Mount Master achievements. The Triad Bingo achievement will only stack if you use the \"Release Both Pets and Mounts\" key and have collected all 90 pets a second time. Show the world just how much of collection master you are! But choose wisely, because once you use a Key and open the kennel or stable doors, you won't be able to get them back without collecting them all again...",
"petKeyInfo4": "There are three Keys to the Kennels: Release Pets Only, Release Mounts Only, or Release Both Pets and Mounts. Using a Key lets you stack the Beast Master and Mount Master achievements. The Triad Bingo achievement will only stack if you use the \"Release Both Pets and Mounts\" key and have collected all 90 pets a second time. Show the world just how much of collection master you are! But choose wisely, because once you use a Key and open the kennel or stable doors, you won't be able to get them back without collecting them all again...", "petKeyInfo4": "There are three Keys to the Kennels: Release Pets Only (4 Gems), Release Mounts Only (4 Gems), or Release Both Pets and Mounts. Using a Key lets you stack the Beast Master and Mount Master achievements. The Triad Bingo achievement will only stack if you use the \"Release Both Pets and Mounts\" key and have collected all 90 pets a second time. Show the world just how much of collection master you are! But choose wisely, because once you use a Key and open the kennel or stable doors, you won't be able to get them back without collecting them all again...",
"petKeyPets": "Release My Pets", "petKeyPets": "Release My Pets",
"petKeyMounts": "Release My Mounts", "petKeyMounts": "Release My Mounts",
"petKeyBoth": "Release Both", "petKeyBoth": "Release Both",

View File

@@ -752,10 +752,9 @@ api.wrap = (user, main=true) ->
ga?.event('purchase', key).send() ga?.event('purchase', key).send()
releasePets: (req, cb) -> releasePets: (req, cb) ->
if user.balance < 1 and not user.achievements.triadBingo if user.balance < 1
return cb? {code:401,message: i18n.t('notEnoughGems', req.language)} return cb? {code:401,message: i18n.t('notEnoughGems', req.language)}
else else
if not user.achievements.triadBingo
user.balance -= 1 user.balance -= 1
for pet of content.pets for pet of content.pets
user.items.pets[pet] = 0 user.items.pets[pet] = 0
@@ -766,10 +765,9 @@ api.wrap = (user, main=true) ->
cb? null, user cb? null, user
releaseMounts: (req, cb) -> releaseMounts: (req, cb) ->
if user.balance < 1 and not user.achievements.triadBingo if user.balance < 1
return cb? {code:401,message: i18n.t('notEnoughGems', req.language)} return cb? {code:401,message: i18n.t('notEnoughGems', req.language)}
else else
if not user.achievements.triadBingo
user.balance -= 1 user.balance -= 1
user.items.currentMount = "" user.items.currentMount = ""
for mount of content.pets for mount of content.pets

View File

@@ -238,7 +238,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
span.Pet_Currency_Gem1x.inline-gems span.Pet_Currency_Gem1x.inline-gems
div(ng-show='petCount >= 90 || mountCount >= 90') div(ng-show='petCount >= 90 || mountCount >= 90')
button.customize-option(popover=env.t('petKeyPop'), popover-title=env.t('petKeyName'), popover-trigger='mouseenter', popover-placement='top', popover-append-to-body='true', ng-click='openModal("pet-key", {size:"lg"})', class='pet_key') button.customize-option(popover=env.t('petKeyPop'), popover-title=env.t('petKeyName'), popover-trigger='mouseenter', popover-placement='top', popover-append-to-body='true', ng-click='openModal("pet-key", {size:"lg"})', class='pet_key')
p(ng-show='!user.achievements.triadBingo') p(ng-show='petCount < 90 || mountCount < 90 || !user.achievements.triadBingo')
| 4&nbsp; | 4&nbsp;
span.Pet_Currency_Gem1x.inline-gems span.Pet_Currency_Gem1x.inline-gems
div(ng-if='user.purchased.plan.customerId', ng-class='::{transparent:(Shared.planGemLimits.convCap + User.user.purchased.plan.consecutive.gemCapExtra - User.user.purchased.plan.gemsBought) < 1}') div(ng-if='user.purchased.plan.customerId', ng-class='::{transparent:(Shared.planGemLimits.convCap + User.user.purchased.plan.consecutive.gemCapExtra - User.user.purchased.plan.gemsBought) < 1}')

View File

@@ -21,7 +21,6 @@ script(type='text/ng-template', id='modals/pet-key.html')
- var masterTitle='{{petCount >= 90 && mountCount >= 90 ? env.t("beastMountMasterName") : petCount >= 90 ? env.t("beastMasterName") : env.t("mountMasterName")}}' - var masterTitle='{{petCount >= 90 && mountCount >= 90 ? env.t("beastMountMasterName") : petCount >= 90 ? env.t("beastMasterName") : env.t("mountMasterName")}}'
h4=env.t('petKeyBegin', {title: masterTitle}) h4=env.t('petKeyBegin', {title: masterTitle})
.modal-body .modal-body
div(ng-if='!user.achievements.triadBingo')
+gemButton +gemButton
figure figure
.npc_matt .npc_matt
@@ -33,19 +32,17 @@ script(type='text/ng-template', id='modals/pet-key.html')
p(ng-if='!user.achievements.triadBingo')=env.t('petKeyInfo3') p(ng-if='!user.achievements.triadBingo')=env.t('petKeyInfo3')
.modal-footer .modal-footer
button.btn.btn-default(ng-click='$close()')=env.t('petKeyNeverMind') button.btn.btn-default(ng-click='$close()')=env.t('petKeyNeverMind')
span(ng-if='user.balance < 1 && !user.achievements.triadBingo') span(ng-if='user.balance < 1')
a.btn.btn-success(ng-click='openModal("buyGems")')=env.t('buyMoreGems') a.btn.btn-success(ng-click='openModal("buyGems")')=env.t('buyMoreGems')
span.gem-cost=env.t('notEnoughGems') span.gem-cost=env.t('notEnoughGems')
span(ng-if='(user.balance >= 1 || user.achievements.triadBingo) && petCount >= 90', ng-controller='SettingsCtrl') span(ng-if='user.balance >= 1 && petCount >= 90', ng-controller='SettingsCtrl')
a.btn.btn-danger(ng-click='$close(); releasePets()') a.btn.btn-danger(ng-click='$close(); releasePets()')
=env.t('petKeyPets') =env.t('petKeyPets')
span(ng-if='!user.achievements.triadBingo')
| : 4&nbsp; | : 4&nbsp;
span.Pet_Currency_Gem1x.inline-gems span.Pet_Currency_Gem1x.inline-gems
span(ng-if='(user.balance >= 1 || user.achievements.triadBingo) && mountCount >= 90', ng-controller='SettingsCtrl') span(ng-if='user.balance >= 1 && mountCount >= 90', ng-controller='SettingsCtrl')
a.btn.btn-danger(ng-click='$close(); releaseMounts()') a.btn.btn-danger(ng-click='$close(); releaseMounts()')
=env.t('petKeyMounts') =env.t('petKeyMounts')
span(ng-if='!user.achievements.triadBingo')
| : 4&nbsp; | : 4&nbsp;
span.Pet_Currency_Gem1x.inline-gems span.Pet_Currency_Gem1x.inline-gems
span(ng-if='(user.balance >= 1.5 || user.achievements.triadBingo) && petCount >= 90 && mountCount >= 90', ng-controller='SettingsCtrl') span(ng-if='(user.balance >= 1.5 || user.achievements.triadBingo) && petCount >= 90 && mountCount >= 90', ng-controller='SettingsCtrl')