feat:npc添加皮肤

This commit is contained in:
xichaoyin 2024-01-11 14:19:51 +08:00
parent 13de3624dc
commit a8051b9767
2 changed files with 5 additions and 3 deletions

View File

@ -800,6 +800,8 @@ type gc_npc = k_v<{
'ghname': string
/**npc名称 */
'npcname': string
/**怪物皮肤*/
'skin': number[]
}>;
type gc_openCond = k_v<{

View File

@ -121,7 +121,7 @@ export function createNpc(npcId: string | number, fixData: Partial<ResLogin['gud
isNpc: true
},
roles: Object.fromEntries(dataArr.map((d, i) => [i + 1, function () {
d['skin'] = (npcConf.skin?.[i] || '');
let { id, atk, def, mindps, maxdps, hp, speed, ...ops } = G.gc.armyattr[d.countId];
let buff = HeroShared.getHeroBasicAttr({ heroId: d.heroId, lv: d.lv });