cheat: nemesisAlwaysCorrect
fix where previous guess would conflict the cheat
This commit is contained in:
		
							parent
							
								
									16d6af1420
								
							
						
					
					
						commit
						7e13bcf8a9
					
				@ -82,6 +82,8 @@ export const nemesisController: RequestHandler = async (req, res) => {
 | 
			
		||||
        const inventory = await getInventory(account._id.toString(), "Nemesis");
 | 
			
		||||
        const body = getJSONfromString<INemesisPrespawnCheckRequest>(String(req.body));
 | 
			
		||||
        const passcode = getNemesisPasscode(inventory.Nemesis!);
 | 
			
		||||
        const alwaysCorrectCheat = (await getInventory(account._id.toString(), "nemesisAlwaysCorrect"))
 | 
			
		||||
            .nemesisAlwaysCorrect;
 | 
			
		||||
        let guessResult = 0;
 | 
			
		||||
        if (inventory.Nemesis!.Faction == "FC_INFESTATION") {
 | 
			
		||||
            for (let i = 0; i != 3; ++i) {
 | 
			
		||||
@ -92,7 +94,7 @@ export const nemesisController: RequestHandler = async (req, res) => {
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            for (let i = 0; i != 3; ++i) {
 | 
			
		||||
                if (body.guess[i] == passcode[i] || body.guess[i] == GUESS_WILDCARD) {
 | 
			
		||||
                if (body.guess[i] == passcode[i] || body.guess[i] == GUESS_WILDCARD || alwaysCorrectCheat) {
 | 
			
		||||
                    ++guessResult;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user