mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-25 06:05:54 +00:00
fix: parse any rarity Blighted map
This commit is contained in:
@@ -52,7 +52,8 @@ const dict = {
|
||||
'You will find Einhar and complete his mission.': 'You will find Einhar and complete his mission.',
|
||||
'You will find Niko and complete his mission.': 'You will find Niko and complete his mission.',
|
||||
'You will find Jun and complete her mission.': 'You will find Jun and complete her mission.',
|
||||
'You will find Zana and complete her mission.': 'You will find Zana and complete her mission.'
|
||||
'You will find Zana and complete her mission.': 'You will find Zana and complete her mission.',
|
||||
'Blighted {0}': 'Blighted {0}'
|
||||
}
|
||||
|
||||
export default dict
|
||||
|
||||
@@ -54,7 +54,8 @@ const dict: TranslationDict = {
|
||||
'You will find Einhar and complete his mission.': 'Ты встретишь Эйнара и выполнишь его задание.',
|
||||
'You will find Niko and complete his mission.': 'Ты встретишь Нико и выполнишь его задание.',
|
||||
'You will find Jun and complete her mission.': 'Ты встретишь Джун и выполнишь её задание.',
|
||||
'You will find Zana and complete her mission.': 'Ты встретишь Зану и выполнишь её задание.'
|
||||
'You will find Zana and complete her mission.': 'Ты встретишь Зану и выполнишь её задание.',
|
||||
'Blighted {0}': 'Заражённая {0}'
|
||||
}
|
||||
|
||||
export default dict
|
||||
|
||||
+10
-6
@@ -139,13 +139,17 @@ function parseMap (section: string[], item: ParsedItem) {
|
||||
if (section[0].startsWith(_$[C.TAG_MAP_TIER])) {
|
||||
item.props.mapTier = Number(section[0].substr(_$[C.TAG_MAP_TIER].length))
|
||||
|
||||
if (item.rarity === ItemRarity.Normal) {
|
||||
if (_$[C.MAP_BLIGHTED].test(item.name)) {
|
||||
const name = _$[C.MAP_BLIGHTED].exec(item.name)![1]
|
||||
item.name = ITEM_NAME_REF_BY_TRANSLATED.get(name) || name
|
||||
item.category = ItemCategory.Map
|
||||
item.props.mapBlighted = true
|
||||
let name = item.baseType || item.name
|
||||
if (_$[C.MAP_BLIGHTED].test(name)) {
|
||||
name = _$[C.MAP_BLIGHTED].exec(name)![1]
|
||||
name = ITEM_NAME_REF_BY_TRANSLATED.get(name) || name
|
||||
if (item.baseType) {
|
||||
item.baseType = name
|
||||
} else {
|
||||
item.name = name
|
||||
}
|
||||
item.category = ItemCategory.Map
|
||||
item.props.mapBlighted = true
|
||||
}
|
||||
|
||||
return SECTION_PARSED
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import { BASE_TYPES, TRANSLATED_ITEM_NAME_BY_REF } from '@/assets/data'
|
||||
import { BASE_TYPES, TRANSLATED_ITEM_NAME_BY_REF, CLIENT_STRINGS } from '@/assets/data'
|
||||
import { ItemCategory } from './meta'
|
||||
|
||||
let baseTypes: Set<string>
|
||||
|
||||
export function magicBasetype (name: string) {
|
||||
if (!baseTypes) {
|
||||
baseTypes = new Set(
|
||||
Array.from(BASE_TYPES.keys()).map(b => TRANSLATED_ITEM_NAME_BY_REF.get(b)!)
|
||||
)
|
||||
baseTypes = new Set<string>()
|
||||
for (let [name, info] of BASE_TYPES.entries()) {
|
||||
name = TRANSLATED_ITEM_NAME_BY_REF.get(name)!
|
||||
baseTypes.add(name)
|
||||
if (info.category === ItemCategory.Map) {
|
||||
baseTypes.add(
|
||||
CLIENT_STRINGS['Blighted {0}'].replace('{0}', name)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const words = name.split(' ')
|
||||
|
||||
Reference in New Issue
Block a user