拍卖:优化

This commit is contained in:
luying
2021-10-27 16:39:55 +08:00
parent b03802136b
commit 0dde8fd09a
9 changed files with 146 additions and 68 deletions

View File

@@ -597,13 +597,13 @@ export function getGuildAuctionRewards(aid: number, rank: number) {
export function getAuctionRewardByPoolId(poolId: number) {
let pools = gameData.auctionPool.get(poolId);
let rewards: { goods: RewardInter, basePrice: number, maxPrice: number }[] = [];
let rewards: { goods: RewardInter, basePrice: number, maxPrice: number, sort: number }[] = [];
for(let { count, basicPool } of pools) {
let { rewardBasicPool, basePrice, maxPrice } = basicPool
let { rewardBasicPool, basePrice, maxPrice, sort } = basicPool
for(let i = 0; i < count; i++) {
let result = getRandEelmWithWeight(rewardBasicPool);
if(result && result.dic) {
rewards.push({ goods: pick(result.dic, ['id', 'count']), basePrice, maxPrice });
rewards.push({ goods: pick(result.dic, ['id', 'count']), basePrice, maxPrice, sort });
}
}
}