Merge pull request #4915 from gisikw/free_100_key_to_the_kennels

Make Key to the Kennels free for Triad Bingoers.
This commit is contained in:
Alys 2015-04-04 10:48:15 +10:00
commit 8033b129ff
5 changed files with 20 additions and 14 deletions

View file

@ -6212,7 +6212,7 @@ api.wrap = function(user, main) {
message: i18n.t('notEnoughGems', req.language)
}) : void 0;
} else {
user.balance--;
user.balance -= 1;
for (pet in content.pets) {
user.items.pets[pet] = 0;
}
@ -6246,14 +6246,16 @@ api.wrap = function(user, main) {
},
releaseBoth: function(req, cb) {
var animal, giveTriadBingo;
if (user.balance < 1.5) {
if (user.balance < 1.5 && !user.achievements.triadBingo) {
return typeof cb === "function" ? cb({
code: 401,
message: i18n.t('notEnoughGems', req.language)
}) : void 0;
} else {
giveTriadBingo = true;
user.balance -= 1.5;
if (!user.achievements.triadBingo) {
user.balance -= 1.5;
}
user.items.currentMount = "";
user.items.currentPet = "";
for (animal in content.pets) {

View file

@ -56,6 +56,7 @@
"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.)",
"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 (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",
"petKeyMounts": "Release My Mounts",
"petKeyBoth": "Release Both",

View file

@ -675,7 +675,7 @@ api.wrap = (user, main=true) ->
# Generate pet display name variable
potionText = if content.hatchingPotions[potion] then content.hatchingPotions[potion].text() else potion
eggText = if content.eggs[egg] then content.eggs[egg].text() else egg
petDisplayName = i18n.t('petName', {
petDisplayName = i18n.t('petName', {
potion: potionText
egg: eggText
})
@ -755,7 +755,7 @@ api.wrap = (user, main=true) ->
if user.balance < 1
return cb? {code:401,message: i18n.t('notEnoughGems', req.language)}
else
user.balance--
user.balance -= 1
for pet of content.pets
user.items.pets[pet] = 0
if not user.achievements.beastMasterCount
@ -778,11 +778,12 @@ api.wrap = (user, main=true) ->
cb? null, user
releaseBoth: (req, cb) ->
if user.balance < 1.5
if user.balance < 1.5 and not user.achievements.triadBingo
return cb? {code:401,message: i18n.t('notEnoughGems', req.language)}
else
giveTriadBingo = true
user.balance -= 1.5
if not user.achievements.triadBingo
user.balance -= 1.5
user.items.currentMount = ""
user.items.currentPet = ""
for animal of content.pets

View file

@ -244,7 +244,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
span.Pet_Currency_Gem1x.inline-gems
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')
p
p(ng-show='petCount < 90 || mountCount < 90 || !user.achievements.triadBingo')
| 4&nbsp;
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}')

View file

@ -1,4 +1,4 @@
script(type='text/ng-template', id='modals/dropsEnabled.html')
script(type='text/ng-template', id='modals/dropsEnabled.html')
.modal-header
h4=env.t('dropsEnabled')
.modal-body
@ -16,7 +16,7 @@ script(type='text/ng-template', id='modals/dropsEnabled.html')
script(type='text/ng-template', id='modals/pet-key.html')
.modal-header
// Checks if user has 90 pets and 90 mounts. If so, displays "Beast Master/Mount Master".
// Checks if user has 90 pets and 90 mounts. If so, displays "Beast Master/Mount Master".
// Else if user has 90 pets, displays "Beast Master". Else, displays "Mount Master"
- var masterTitle='{{petCount >= 90 && mountCount >= 90 ? env.t("beastMountMasterName") : petCount >= 90 ? env.t("beastMasterName") : env.t("mountMasterName")}}'
h4=env.t('petKeyBegin', {title: masterTitle})
@ -28,7 +28,8 @@ script(type='text/ng-template', id='modals/pet-key.html')
br
p=env.t('petKeyInfo2')
br
p=env.t('petKeyInfo3')
p(ng-if='user.achievements.triadBingo')=env.t('petKeyInfo4')
p(ng-if='!user.achievements.triadBingo')=env.t('petKeyInfo3')
.modal-footer
button.btn.btn-default(ng-click='$close()')=env.t('petKeyNeverMind')
span(ng-if='user.balance < 1')
@ -44,8 +45,9 @@ script(type='text/ng-template', id='modals/pet-key.html')
=env.t('petKeyMounts')
| : 4&nbsp;
span.Pet_Currency_Gem1x.inline-gems
span(ng-if='user.balance >= 1.5 && petCount >= 90 && mountCount >= 90', ng-controller='SettingsCtrl')
span(ng-if='(user.balance >= 1.5 || user.achievements.triadBingo) && petCount >= 90 && mountCount >= 90', ng-controller='SettingsCtrl')
a.btn.btn-danger(ng-click='$close(); releaseBoth()')
=env.t('petKeyBoth')
| : 6&nbsp;
span.Pet_Currency_Gem1x.inline-gems
span(ng-if='!user.achievements.triadBingo')
| : 6&nbsp;
span.Pet_Currency_Gem1x.inline-gems