🐞 fix(天晶): 洗练随机顺序问题
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { getRandEelm, } from '../pubUtils/util';
|
import { getRandEelm, sortArrRandom, } from '../pubUtils/util';
|
||||||
import { EPlace, Stone } from "../db/Hero";
|
import { EPlace, Stone } from "../db/Hero";
|
||||||
import { gameData, getArtifactWithQuality, getDicArtifactLvByPlanId, getDicArtifactQualityByStage, getJewelConditionByLvAndSeId, getNextArtifact, getNextArtifactQuality, getRandEffectByGroupAndLevel } from "../pubUtils/data";
|
import { gameData, getArtifactWithQuality, getDicArtifactLvByPlanId, getDicArtifactQualityByStage, getJewelConditionByLvAndSeId, getNextArtifact, getNextArtifactQuality, getRandEffectByGroupAndLevel } from "../pubUtils/data";
|
||||||
import { JewelType, RandSe } from '../db/Jewel';
|
import { JewelType, RandSe } from '../db/Jewel';
|
||||||
@@ -43,6 +43,7 @@ export function getRandSeResult(id: number, randSe: RandSe[], originSe: RandSe[]
|
|||||||
randomResult.push(...allRandom);
|
randomResult.push(...allRandom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let arr = sortArrRandom(randomResult);
|
||||||
// console.log('##### getRandSeResult', startId, effectCount)
|
// console.log('##### getRandSeResult', startId, effectCount)
|
||||||
|
|
||||||
for (let i = startId; i < effectCount; i++) {
|
for (let i = startId; i < effectCount; i++) {
|
||||||
@@ -50,10 +51,10 @@ export function getRandSeResult(id: number, randSe: RandSe[], originSe: RandSe[]
|
|||||||
if(randSe[i] && randSe[i].locked) {
|
if(randSe[i] && randSe[i].locked) {
|
||||||
newRandSe.push(randSe[i]);
|
newRandSe.push(randSe[i]);
|
||||||
} else {
|
} else {
|
||||||
newRandSe.push(getJewelRandSe(randSe[i].id, randomResult[i]));
|
newRandSe.push(getJewelRandSe(randSe[i].id, arr[i]));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newRandSe.push(getJewelRandSe(i + 1, randomResult[i]));
|
newRandSe.push(getJewelRandSe(i + 1, arr[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(newRandSe.length < randSe.length) {
|
if(newRandSe.length < randSe.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user