军团活动:修复粮草先行重启问题,诸侯混战宣战问题

This commit is contained in:
luying
2022-09-08 20:02:43 +08:00
parent a5241c9089
commit 0f2d247ee4
10 changed files with 152 additions and 6 deletions

View File

@@ -55,6 +55,10 @@ export class WoodenHorseMember {
setReceived(hasReceiveInitItems: boolean) {
this.hasReceiveInitItems = hasReceiveInitItems;
}
updateSid(sid: string) {
this.sid = sid;
}
}
// 木牛流马
@@ -267,6 +271,13 @@ export class WoodenHorse {
}
}
public updateMemberSid(roleId: string, sid: string) {
let index = this.members.findIndex(cur => cur.roleId == roleId);
if(index != -1) {
this.members[index].updateSid(sid);
}
}
public setRemainItem(id: number, remain: number, max: number) {
this.remainItems.set(id, { total: remain, max });
}