🐞 fix(宝物): 分解宝物参数错误
This commit is contained in:
@@ -1698,7 +1698,7 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
case "role.artifactHandler.compose":
|
||||
{
|
||||
if(!checkSeqId(msg.seqId)) return false;
|
||||
if(!checkNumberArray(msg.material)) return false;
|
||||
if(!checkSeqId(...msg.material)) return false;
|
||||
if(!checkArrayCanEmpty(msg.generalItems)) return false;
|
||||
for(let { id, count } of msg.generalItems) {
|
||||
if(!checkNaturalNumbers(id, count)) return false;
|
||||
@@ -2202,5 +2202,8 @@ function checkMailType(mailType: any) {
|
||||
}
|
||||
|
||||
function checkSeqId(...seqIds: (number|string)[]) {
|
||||
return checkNaturalNumbers(...<number[]>seqIds)||checkNaturalStrings(...<string[]>seqIds);
|
||||
for(let seqId of seqIds) {
|
||||
if(!checkNaturalNumbers(<number>seqId) && !checkNaturalStrings(<string>seqId)) return false
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user