活动:大富翁修改部分逻辑
This commit is contained in:
@@ -91,6 +91,18 @@ export class ActivityMonopolyHandler {
|
||||
landData.level = newLevel;
|
||||
}
|
||||
|
||||
//取钱
|
||||
if (landData.record.length > 0) {
|
||||
let records = landData.record.filter(obj => { return obj.type == BANK_TYPE.OUT });
|
||||
if (records.length < landData.takeOutMax) {
|
||||
let resource = landData.record[0].resource;
|
||||
let rewardArray = stringToRewardParam(resource)
|
||||
bankReward = await addReward(roleId, roleName, sid, serverId, funcs, rewardArray);
|
||||
let recordResult = await ActivityMonopolyLandModel.addRecord(serverId, activityId, roleId, newPosition, BANK_TYPE.OUT, resource);
|
||||
landData.record = recordResult.record;
|
||||
}
|
||||
}
|
||||
} else if (landData && ((landData.landType == LAND_TYPE.BANK_COIN) || (landData.landType == LAND_TYPE.BANK_GOLD))) {
|
||||
//取钱
|
||||
if (landData.record.length > 0) {
|
||||
let records = landData.record.filter(obj => { return obj.type == BANK_TYPE.OUT });
|
||||
@@ -104,7 +116,8 @@ export class ActivityMonopolyHandler {
|
||||
}
|
||||
}
|
||||
await ActivityMonopolyLandModel.updateStopCount(serverId, activityId, roleId, newPosition);
|
||||
return resResult(STATUS.SUCCESS, { landReward, bankReward, landData, moveStep, newPosition, roundIndex: playerData.roundIndex + 1 });
|
||||
landData.stopCount += 1;
|
||||
return resResult(STATUS.SUCCESS, { landReward, bankReward, landData, moveStep, newPosition, roundIndex: playerData.roundIndex + 1, });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user