军团活动:粮草先行debug
This commit is contained in:
@@ -129,9 +129,11 @@ export class RaceActivityObject {
|
||||
return woodenHorse;
|
||||
}
|
||||
|
||||
public async useItem(serverId: number, fromRoleId: string, sid: string, fromGuild: string, toGuild: string, id: number, count: number) {
|
||||
let rec = this.handleItems(fromRoleId, sid, [{id, count: -1 * count}]);
|
||||
if(!rec) return false;
|
||||
public async useItem(serverId: number, fromRoleId: string, sid: string, fromGuild: string, toGuild: string, id: number, count: number, debug = false) {
|
||||
if(!debug) {
|
||||
let rec = this.handleItems(fromRoleId, sid, [{id, count: -1 * count}]);
|
||||
if(!rec) return false;
|
||||
}
|
||||
let event = new Event(id, fromGuild, toGuild, count);
|
||||
if(!this.events.has(toGuild)) {
|
||||
this.events.set(toGuild, [event]);
|
||||
|
||||
Reference in New Issue
Block a user