mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
rebase: 优化代码,移动模型
This commit is contained in:
parent
47e76adf80
commit
52b9a5b1b3
10 changed files with 653 additions and 459 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { getMapData } from '../../utils/file.js';
|
||||
const propertyData = getMapData('Property2Name');
|
||||
const prop_id = {
|
||||
111: 'hpmax',
|
||||
121: 'attack',
|
||||
|
|
@ -39,3 +41,27 @@ export function idToClassName(_id) {
|
|||
if (!propIcon) return null;
|
||||
return propIcon;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取属性标识
|
||||
* @param {string} _id 属性id
|
||||
* @returns {string | null}
|
||||
*/
|
||||
export const idToSignName = _id => {
|
||||
const id = _id.toString();
|
||||
const result = propertyData[id];
|
||||
if (!result) return null;
|
||||
return result[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取属性名称
|
||||
* @param {string} _id 属性id
|
||||
* @returns {string | null}
|
||||
*/
|
||||
export const idToName = _id => {
|
||||
const id = _id.toString();
|
||||
const result = propertyData[id];
|
||||
if (!result) return null;
|
||||
return result[1];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue