TYPESCRIPT
This commit is contained in:
parent
cf3607470f
commit
82bfe05827
@ -23,51 +23,51 @@ export default class GameModule extends Module {
|
||||
if (maxConsecutiveWins < body.stResult!.stConsecutiveWins!) {
|
||||
maxConsecutiveWins = body.stResult!.stConsecutiveWins!;
|
||||
}
|
||||
let divcount = body.stResult!.stClearDivCount;
|
||||
let divcount = body.stResult?.stClearDivCount;
|
||||
let saveEx: any = {};
|
||||
if (divcount !== null && divcount !== undefined) {
|
||||
saveEx.stClearDivCount = divcount;
|
||||
} else {
|
||||
saveEx.stClearDivCount = car!.stClearDivCount;
|
||||
}
|
||||
if (body.stResult!.stClearBits !== null && body.stResult!.stClearBits !== undefined) {
|
||||
saveEx.stClearBits = body.stResult!.stClearBits!;
|
||||
if (body.stResult?.stClearBits !== null && body.stResult?.stClearBits !== undefined) {
|
||||
saveEx.stClearBits = body.stResult?.stClearBits!;
|
||||
} else {
|
||||
saveEx.stClearBits = car!.stClearBits;
|
||||
}
|
||||
if (body.stResult!.stPlayCount !== null && body.stResult!.stPlayCount !== undefined) {
|
||||
saveEx.stPlayCount = body.stResult!.stPlayCount!;
|
||||
if (body.stResult?.stPlayCount !== null && body.stResult?.stPlayCount !== undefined) {
|
||||
saveEx.stPlayCount = body.stResult?.stPlayCount!;
|
||||
} else {
|
||||
saveEx.stPlayCount = car!.stPlayCount;
|
||||
}
|
||||
if (body.stResult!.stClearCount !== null && body.stResult!.stClearCount !== undefined) {
|
||||
saveEx.stClearCount = body.stResult!.stClearCount!;
|
||||
if (body.stResult?.stClearCount !== null && body.stResult?.stClearCount !== undefined) {
|
||||
saveEx.stClearCount = body.stResult?.stClearCount!;
|
||||
} else {
|
||||
saveEx.stClearCount = car!.stClearCount;
|
||||
}
|
||||
if (body.stResult!.stLoseBits !== null && body.stResult!.stLoseBits !== undefined) {
|
||||
if (body.stResult?.stLoseBits !== null && body.stResult?.stLoseBits !== undefined) {
|
||||
let actualLoseBits = BigInt(0);
|
||||
if (body.stResult!.stLoseBits! instanceof Long) {
|
||||
actualLoseBits = actualLoseBits | BigInt(body.stResult!.stLoseBits.high);
|
||||
if (body.stResult?.stLoseBits! instanceof Long) {
|
||||
actualLoseBits = actualLoseBits | BigInt(body.stResult?.stLoseBits.high);
|
||||
actualLoseBits = actualLoseBits << BigInt(32);
|
||||
actualLoseBits = actualLoseBits | BigInt(body.stResult!.stLoseBits.low);
|
||||
actualLoseBits = actualLoseBits | BigInt(body.stResult?.stLoseBits.low);
|
||||
saveEx.stLoseBits = actualLoseBits;
|
||||
}
|
||||
} else {
|
||||
saveEx.stLoseBits = car!.stLoseBits;
|
||||
}
|
||||
if (body.stResult!.stConsecutiveWins !== null && body.stResult!.stConsecutiveWins !== undefined) {
|
||||
saveEx.stConsecutiveWins = body.stResult!.stConsecutiveWins!;
|
||||
if (body.stResult?.stConsecutiveWins !== null && body.stResult?.stConsecutiveWins !== undefined) {
|
||||
saveEx.stConsecutiveWins = body.stResult?.stConsecutiveWins!;
|
||||
} else {
|
||||
saveEx.stConsecutiveWins = car!.stConsecutiveWins;
|
||||
}
|
||||
if (body.stResult!.tuningPoint !== null && body.stResult!.tuningPoint !== undefined) {
|
||||
saveEx.tuningPoints = body.stResult!.tuningPoint!;
|
||||
if (body.stResult?.tuningPoint !== null && body.stResult?.tuningPoint !== undefined) {
|
||||
saveEx.tuningPoints = body.stResult?.tuningPoint!;
|
||||
} else {
|
||||
saveEx.tuningPoints = car!.tuningPoints;
|
||||
}
|
||||
if (body.stResult!.stCompleted_100Episodes !== null && body.stResult!.stCompleted_100Episodes !== undefined) {
|
||||
saveEx.stCompleted100Episodes = body.stResult!.stCompleted_100Episodes!;
|
||||
if (body.stResult?.stCompleted_100Episodes !== null && body.stResult?.stCompleted_100Episodes !== undefined) {
|
||||
saveEx.stCompleted100Episodes = body.stResult?.stCompleted_100Episodes!;
|
||||
} else {
|
||||
saveEx.stCompleted100Episodes = car!.stCompleted100Episodes;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user