mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
feature:%XX伤害
This commit is contained in:
parent
83ca22c3b8
commit
9b7e609f6a
35 changed files with 1849 additions and 114 deletions
|
|
@ -65,16 +65,39 @@ export const idToName = id => {
|
|||
};
|
||||
|
||||
/**
|
||||
* 获取属性二字简称
|
||||
* 获取属性2字简称
|
||||
* @param {string | number} id 属性id
|
||||
* @returns {string | null}
|
||||
* @returns {string}
|
||||
*/
|
||||
export const idToShortName = id => {
|
||||
export const idToShortName2 = id => {
|
||||
const result = propertyData[id];
|
||||
if (!result) return null;
|
||||
if (!result) return '';
|
||||
return result[2];
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取属性2~3字简称
|
||||
* @param {string | number} id 属性id
|
||||
* @returns {string}
|
||||
*/
|
||||
export const idToShortName3 = id => {
|
||||
const result = propertyData[id];
|
||||
if (!result) return '';
|
||||
return result[3];
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取属性2~3字简称
|
||||
* @param {string | number} id 属性id
|
||||
* @returns {string}
|
||||
*/
|
||||
export const nameToShortName3 = propName => {
|
||||
for (const id in propertyData) {
|
||||
if (propertyData[id]?.[1] === propName) return propertyData[id][3];
|
||||
};
|
||||
return propName;
|
||||
};
|
||||
|
||||
/**
|
||||
* 属性名转id
|
||||
* @param {string} propName 属性名
|
||||
|
|
@ -82,6 +105,6 @@ export const idToShortName = id => {
|
|||
export const nameToId = (propName) => {
|
||||
for (const id in propertyData) {
|
||||
if (propertyData[id]?.[1] === propName) return Number(id);
|
||||
}
|
||||
};
|
||||
return null;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue