🐞 fix(宝物): 修复宝物材料判断错误
This commit is contained in:
@@ -148,7 +148,7 @@ export class ArtifactHandler {
|
||||
remainCnt--;
|
||||
}
|
||||
// 通用道具
|
||||
if(dicNextArtifact.materialGroup == 0) { // 可使用材料代替,不是必须同名的那种
|
||||
if(dicNextArtifact.materialGroup == 0 && remainCnt > 0) { // 可使用材料代替,不是必须同名的那种
|
||||
let dicMaterialArtifactQuality = gameData.artifactQualityById.get(dicNextArtifact.previousId);
|
||||
if(!dicMaterialArtifactQuality) return resResult(STATUS.DIC_DATA_NOT_FOUND);
|
||||
for(let { id, count } of dicMaterialArtifactQuality.generalItem) {
|
||||
|
||||
@@ -1329,7 +1329,7 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
{
|
||||
if(!checkNaturalNumbers(msg.seqId)) return false;
|
||||
if(!checkNumberArray(msg.material)) return false;
|
||||
if(!checkNaturalArray(msg.generalItems)) return false;
|
||||
if(!checkArrayCanEmpty(msg.generalItems)) return false;
|
||||
for(let { id, count } of msg.generalItems) {
|
||||
if(!checkNaturalNumbers(id, count)) return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user