装备替换
This commit is contained in:
@@ -226,11 +226,6 @@ export default class Hero extends BaseModel {
|
||||
let result: HeroType = await HeroModel.findOneAndUpdate({roleId, hid}, {$set:heroUpdate}, {new: true}).select(select).lean(lean);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async getHeroEquip(roleId: string, hid: number, lean = true) {
|
||||
let result: HeroType = await HeroModel.findOne({ roleId, hid }).populate('ePlace.equip').lean(lean);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async unloadHeroAndEquip(roleId: string, hid: number, id: number, lean = true) {
|
||||
const hero: HeroType = await HeroModel.findOneAndUpdate(
|
||||
|
||||
@@ -465,8 +465,10 @@ export function calEquipSeids(hero: HeroType) {
|
||||
for (let { equip } of ePlace) {
|
||||
if (equip) {
|
||||
let e = <EquipType>equip;
|
||||
for (let { seid, rand } of e.randSe) {
|
||||
seids.push(seid, rand);
|
||||
if (!!e.randSe) {
|
||||
for (let { seid, rand } of e.randSe) {
|
||||
seids.push(seid, rand);
|
||||
}
|
||||
}
|
||||
if (e.suitId > 0) {
|
||||
if (suits.has(e.suitId)) {
|
||||
|
||||
Reference in New Issue
Block a user