Skip to content

Commit

Permalink
Merge pull request #336 from wraythex/update-protos-17
Browse files Browse the repository at this point in the history
Update protos 17
  • Loading branch information
wraythex authored Jun 9, 2024
2 parents c20846c + eeee2fa commit da9902a
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 46 deletions.
10 changes: 5 additions & 5 deletions rocketmad/pogo_protos_pb2.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions scripts/protos/vdisplayproto.proto
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ message PokemonDisplayProto {
HOLIDAY_2023 = 73;
JAN_2024 = 74;
SPRING_2024 = 75;
SUMMER_2024 = 77;
ANNIVERSARY_2024 = 78;
}

enum Form {
Expand Down
19 changes: 17 additions & 2 deletions static/data/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@
"name": "Beast Ball"
},
"7": {
"name": "Wild Ball"
},
"87": {
"name": "Mega Energy",
"questBundles": [5, 10, 15, 20, 25, 50, 70]
},
"8": {
"88": {
"name": "Candy",
"questBundles": [3, 20]
},
"9": {
"89": {
"name": "Experience",
"questBundles": [700]
},
Expand Down Expand Up @@ -206,6 +209,9 @@
"1107": {
"name": "Unova Stone"
},
"1150": {
"name": "Evolution Stone A"
},
"1201": {
"name": "Fast TM"
},
Expand All @@ -218,6 +224,9 @@
"1204": {
"name": "Elite Charged TM"
},
"1250": {
"name": "Reroll Other Special Attack A"
},
"1301": {
"name": "Rare Candy",
"questBundles": [1, 2, 3]
Expand Down Expand Up @@ -264,6 +273,9 @@
"1408": {
"name": "Remote Raid Pass"
},
"1409": {
"name": "S Raid Pass"
},
"1501": {
"name": "Mysterious Component"
},
Expand All @@ -282,6 +294,9 @@
"1506": {
"name": "Item MP"
},
"1507": {
"name": "Item MP Replenish"
},
"1600": {
"name": "Global Event Ticket"
},
Expand Down
4 changes: 4 additions & 0 deletions static/data/moves.json
Original file line number Diff line number Diff line change
Expand Up @@ -1374,5 +1374,9 @@
"405": {
"name": "Moongeist Beam",
"type": "Ghost"
},
"408": {
"name": "High Jump Kick",
"type": "Fighting"
}
}
File renamed without changes
File renamed without changes
File renamed without changes
52 changes: 26 additions & 26 deletions static/js/map/map.pokestop.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function isPokestopMeetsQuestFilters(pokestop) {
if (settings.filterQuests) {
switch (pokestop.quest.reward_type) {
case 1: {
const id = '9_' + pokestop.quest.stardust
const id = '89_' + pokestop.quest.stardust
return !settings.excludedQuestItems.has(id)
}
case 2: {
Expand All @@ -33,15 +33,15 @@ function isPokestopMeetsQuestFilters(pokestop) {
return !settings.excludedQuestItems.has(id)
}
case 4: {
const id = '8_' + pokestop.quest.item_amount
const id = '88_' + pokestop.quest.item_amount
return !settings.excludedQuestItems.has(id)
}
case 7: {
return !settings.excludedQuestPokemon.has(pokestop.quest.pokemon_id) &&
(settings.questFormFilter === 'Any' || settings.questFormFilter === getFormName(pokestop.quest.pokemon_id, pokestop.quest.form_id))
}
case 12: {
const id = '7_' + pokestop.quest.item_amount
const id = '87_' + pokestop.quest.item_amount
return !settings.excludedQuestItems.has(id)
}
}
Expand Down Expand Up @@ -119,7 +119,7 @@ function updatePokestopMarker(pokestop, marker, isNotifPokestop) {
shadowAnchor = [30, 30]
switch (quest.reward_type) {
case 1:
shadowImage = getItemImageUrl(9)
shadowImage = getItemImageUrl(89)
shadowSize = [30, 30]
break
case 2:
Expand All @@ -131,15 +131,15 @@ function updatePokestopMarker(pokestop, marker, isNotifPokestop) {
shadowSize = [30, 30]
break
case 4:
shadowImage = getItemImageUrl(8)
shadowImage = getItemImageUrl(88)
shadowSize = [30, 30]
break
case 7:
shadowImage = getPokemonMapIconUrl({ pokemon_id: quest.pokemon_id, form: quest.form_id, costume: quest.costume_id }, serverSettings.generateImages)
shadowSize = [35, 35]
break
case 12:
shadowImage = getItemImageUrl(7)
shadowImage = getItemImageUrl(87)
shadowSize = [30, 30]
}
}
Expand Down Expand Up @@ -208,11 +208,11 @@ function pokestopLabel(pokestop) {

switch (quest.reward_type) {
case 1:
rewardImageUrl = getItemImageUrl(9)
rewardText = quest.stardust + ' ' + getItemName(9)
excludeFunction = `excludeQuestItem(9,${quest.stardust})`
notifFunction = `toggleQuestItemNotif(9,${quest.stardust})`
isNotifQuest = settings.notifQuestItems.has('9_' + quest.stardust)
rewardImageUrl = getItemImageUrl(89)
rewardText = quest.stardust + ' ' + getItemName(89)
excludeFunction = `excludeQuestItem(89,${quest.stardust})`
notifFunction = `toggleQuestItemNotif(89,${quest.stardust})`
isNotifQuest = settings.notifQuestItems.has('89_' + quest.stardust)
break
case 2:
rewardImageUrl = getItemImageUrl(quest.item_id)
Expand All @@ -229,11 +229,11 @@ function pokestopLabel(pokestop) {
isNotifQuest = settings.notifQuestItems.has('99_' + quest.stardust)
break
case 4:
rewardImageUrl = getItemImageUrl(8)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(8)}`
excludeFunction = `excludeQuestItem(8,${quest.item_amount})`
notifFunction = `toggleQuestItemNotif(8,${quest.item_amount})`
isNotifQuest = settings.notifQuestItems.has('8_' + quest.item_amount)
rewardImageUrl = getItemImageUrl(88)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(88)}`
excludeFunction = `excludeQuestItem(88,${quest.item_amount})`
notifFunction = `toggleQuestItemNotif(88,${quest.item_amount})`
isNotifQuest = settings.notifQuestItems.has('88_' + quest.item_amount)
break
case 7:
rewardImageUrl = getPokemonRawIconUrl({ pokemon_id: quest.pokemon_id, form: quest.form_id, costume: quest.costume_id }, serverSettings.generateImages)
Expand All @@ -244,11 +244,11 @@ function pokestopLabel(pokestop) {
isNotifQuest = settings.notifQuestPokemon.has(quest.pokemon_id)
break
case 12:
rewardImageUrl = getItemImageUrl(7)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(7)}`
excludeFunction = `excludeQuestItem(7,${quest.item_amount})`
notifFunction = `toggleQuestItemNotif(7,${quest.item_amount})`
isNotifQuest = settings.notifQuestItems.has('7_' + quest.item_amount)
rewardImageUrl = getItemImageUrl(87)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(87)}`
excludeFunction = `excludeQuestItem(87,${quest.item_amount})`
notifFunction = `toggleQuestItemNotif(87,${quest.item_amount})`
isNotifQuest = settings.notifQuestItems.has('87_' + quest.item_amount)
}

const notifText = isNotifQuest ? i18n('Don\'t notify') : i18n('Notify')
Expand Down Expand Up @@ -623,7 +623,7 @@ function getPokestopNotificationInfo(pokestop) {
if (settings.questNotifs && isPokestopMeetsQuestFilters(pokestop)) {
switch (pokestop.quest.reward_type) {
case 1: {
const itemId = '9_' + pokestop.quest.stardust
const itemId = '89_' + pokestop.quest.stardust
if (settings.notifQuestItems.has(itemId)) {
questNotif = true
}
Expand All @@ -644,7 +644,7 @@ function getPokestopNotificationInfo(pokestop) {
break
}
case 4:
const itemId = '8_' + pokestop.quest.item_amount
const itemId = '88_' + pokestop.quest.item_amount
if (settings.notifQuestItems.has(itemId)) {
questNotif = true
}
Expand All @@ -655,7 +655,7 @@ function getPokestopNotificationInfo(pokestop) {
break
}
case 12: {
const itemId = '7_' + pokestop.quest.item_amount
const itemId = '87_' + pokestop.quest.item_amount
if (settings.notifQuestItems.has(itemId)) {
questNotif = true
}
Expand Down Expand Up @@ -704,7 +704,7 @@ function sendPokestopNotification(pokestop, questNotif, invasionNotif, lureNotif
if (questNotif) {
switch (pokestop.quest.reward_type) {
case 1:
notifTitle += `${i18n('Quest')}: ${pokestop.quest.stardust} ${getItemName(9)}`
notifTitle += `${i18n('Quest')}: ${pokestop.quest.stardust} ${getItemName(89)}`
break
case 2:
notifTitle += `${i18n('Quest')}: ${pokestop.quest.item_amount} ${getItemName(pokestop.quest.item_id)}(s)`
Expand All @@ -716,7 +716,7 @@ function sendPokestopNotification(pokestop, questNotif, invasionNotif, lureNotif
notifTitle += `${i18n('Quest')}: ${getPokemonNameWithForm(pokestop.quest.pokemon_id, pokestop.quest.form_id)}`
break
case 12:
notifTitle += `${i18n('Quest')}: ${pokestop.quest.item_amount} ${getPokemonName(pokestop.quest.pokemon_id)} ${getItemName(7)}`
notifTitle += `${i18n('Quest')}: ${pokestop.quest.item_amount} ${getPokemonName(pokestop.quest.pokemon_id)} ${getItemName(87)}`
}
notifText += `\n${i18n('Quest task')}: ${pokestop.quest.task}`
}
Expand Down
2 changes: 1 addition & 1 deletion static/js/map/map.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,7 @@ function initItemFilters() {
})

const questItemIds = new Set()
const includeInFilter = [6, 1, 2, 3, 701, 703, 705, 706, 708, 709, 101, 102, 103, 104, 201, 202, 1301, 1201, 1202, 501, 502, 503, 504, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 7, 8, 1501, 99, 9]
const includeInFilter = [6, 1, 2, 3, 701, 703, 705, 706, 708, 709, 101, 102, 103, 104, 201, 202, 1301, 1201, 1202, 501, 502, 503, 504, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 87, 88, 1501, 99, 89]

for (const id of includeInFilter) {
for (const bundle of getQuestBundles(id)) {
Expand Down
24 changes: 12 additions & 12 deletions static/js/quest.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ $(function () {
let rewardText = ''
switch (quest.reward_type) {
case 1:
rewardImageUrl = getItemImageUrl(9)
rewardText = quest.stardust + ' ' + getItemName(9)
rewardImageUrl = getItemImageUrl(89)
rewardText = quest.stardust + ' ' + getItemName(89)
break
case 2:
rewardImageUrl = getItemImageUrl(quest.item_id)
Expand All @@ -149,16 +149,16 @@ $(function () {
rewardText = quest.stardust + ' ' + getItemName(99)
break
case 4:
rewardImageUrl = getItemImageUrl(8)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(8)}`
rewardImageUrl = getItemImageUrl(88)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(88)}`
break
case 7:
rewardImageUrl = getPokemonRawIconUrl({ pokemon_id: quest.pokemon_id, form: quest.form_id, costume: quest.costume_id }, serverSettings.generateImages)
rewardText = `${getPokemonNameWithForm(quest.pokemon_id, quest.form_id)} <a href='https://pokemongo.gamepress.gg/pokemon/${quest.pokemon_id}' target='_blank' title='${i18n('View on GamePress')}'>#${quest.pokemon_id}</a>`
break
case 12:
rewardImageUrl = getItemImageUrl(7)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(7)}`
rewardImageUrl = getItemImageUrl(87)
rewardText = `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(87)}`
}

return `
Expand All @@ -174,33 +174,33 @@ $(function () {
} else if (type === 'sort') {
switch (quest.reward_type) {
case 1:
return getItemName(9) + ' ' + quest.stardust
return getItemName(89) + ' ' + quest.stardust
case 2:
return getItemName(quest.item_id) + ' ' + quest.item_amount
case 3:
return getItemName(99) + ' ' + quest.stardust
case 4:
return `${getItemName(8)} ${getPokemonName(quest.pokemon_id)} ${quest.item_amount}`
return `${getItemName(88)} ${getPokemonName(quest.pokemon_id)} ${quest.item_amount}`
case 7:
return getPokemonNameWithForm(quest.pokemon_id, quest.form_id)
case 12:
return `${getItemName(7)} ${getPokemonName(quest.pokemon_id)} ${quest.item_amount}`
return `${getItemName(87)} ${getPokemonName(quest.pokemon_id)} ${quest.item_amount}`
}
}

switch (quest.reward_type) {
case 1:
return quest.stardust + ' ' + getItemName(9)
return quest.stardust + ' ' + getItemName(89)
case 2:
return quest.item_amount + ' ' + getItemName(quest.item_id)
case 3:
return quest.stardust + ' ' + getItemName(99)
case 4:
return `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(8)}`
return `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(88)}`
case 7:
return getPokemonNameWithForm(quest.pokemon_id, quest.form_id)
case 12:
return `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(7)}`
return `${quest.item_amount} ${getPokemonName(quest.pokemon_id)} ${getItemName(87)}`
}
}
}
Expand Down

0 comments on commit da9902a

Please sign in to comment.