装备:天晶属性随机
This commit is contained in:
@@ -421,11 +421,11 @@ export function getJewelRandSe(id: number, seid: number) {
|
|||||||
let planPool = gameData.randomEffectPoolPlan.get(dicRandom.planId);
|
let planPool = gameData.randomEffectPoolPlan.get(dicRandom.planId);
|
||||||
if(planPool && planPool.length > 0) {
|
if(planPool && planPool.length > 0) {
|
||||||
let result = getRandEelmWithWeight(planPool);
|
let result = getRandEelmWithWeight(planPool);
|
||||||
if(result) rand = result.dic.num;
|
if(result) rand = Math.round(result.dic.num * 100)/100;
|
||||||
} else {
|
} else {
|
||||||
let randResult = getRandValueByMinMax(dicRandom.Min, dicRandom.Max, getDecimalCnt(dicRandom.gap));
|
let randResult = getRandValueByMinMax(dicRandom.Min, dicRandom.Max, getDecimalCnt(dicRandom.gap));
|
||||||
let n = Math.floor((randResult - dicRandom.Min)/dicRandom.gap);
|
let n = Math.floor((randResult - dicRandom.Min)/dicRandom.gap);
|
||||||
rand = dicRandom.Min + n * dicRandom.gap;
|
rand = Math.round(dicRandom.Min + n * dicRandom.gap * 100)/100;
|
||||||
}
|
}
|
||||||
return new RandSe(id, dicRandom.id, rand);
|
return new RandSe(id, dicRandom.id, rand);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user