mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
优化%XX伤害
This commit is contained in:
parent
9b7e609f6a
commit
800bc15007
10 changed files with 325 additions and 129 deletions
|
|
@ -101,10 +101,23 @@ export const nameToShortName3 = propName => {
|
|||
/**
|
||||
* 属性名转id
|
||||
* @param {string} propName 属性名
|
||||
* @returns {string}
|
||||
*/
|
||||
export const nameToId = (propName) => {
|
||||
for (const id in propertyData) {
|
||||
if (propertyData[id]?.[1] === propName) return Number(id);
|
||||
};
|
||||
return null;
|
||||
return '';
|
||||
};
|
||||
|
||||
/**
|
||||
* 中文属性名转英文属性名
|
||||
* @param {string} propNameZH 属性名
|
||||
* @returns {string}
|
||||
*/
|
||||
export const nameZHToNameEN = (propNameZH) => {
|
||||
for (const id in propertyData) {
|
||||
if (propertyData[id]?.[1] === propNameZH) return propertyData[id][0];
|
||||
};
|
||||
return '';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue