forked from OpenWF/SpaceNinjaServer
		
	feat: noDailyStandingLimits cheat (#791)
This commit is contained in:
		
							parent
							
								
									d8845bc478
								
							
						
					
					
						commit
						1a8e0f33b9
					
				@ -28,5 +28,6 @@
 | 
				
			|||||||
  "unlockDoubleCapacityPotatoesEverywhere": true,
 | 
					  "unlockDoubleCapacityPotatoesEverywhere": true,
 | 
				
			||||||
  "unlockExilusEverywhere": true,
 | 
					  "unlockExilusEverywhere": true,
 | 
				
			||||||
  "unlockArcanesEverywhere": true,
 | 
					  "unlockArcanesEverywhere": true,
 | 
				
			||||||
 | 
					  "noDailyStandingLimits": true,
 | 
				
			||||||
  "spoofMasteryRank": -1
 | 
					  "spoofMasteryRank": -1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -15,6 +15,7 @@ import {
 | 
				
			|||||||
    ExportVirtuals
 | 
					    ExportVirtuals
 | 
				
			||||||
} from "warframe-public-export-plus";
 | 
					} from "warframe-public-export-plus";
 | 
				
			||||||
import { handleSubsumeCompletion } from "./infestedFoundryController";
 | 
					import { handleSubsumeCompletion } from "./infestedFoundryController";
 | 
				
			||||||
 | 
					import { allDailyAffiliationKeys } from "@/src/services/inventoryService";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const inventoryController: RequestHandler = async (request, response) => {
 | 
					export const inventoryController: RequestHandler = async (request, response) => {
 | 
				
			||||||
    const account = await getAccountForRequest(request);
 | 
					    const account = await getAccountForRequest(request);
 | 
				
			||||||
@ -32,20 +33,9 @@ export const inventoryController: RequestHandler = async (request, response) =>
 | 
				
			|||||||
        account.LastLoginDay = today;
 | 
					        account.LastLoginDay = today;
 | 
				
			||||||
        await account.save();
 | 
					        await account.save();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        inventory.DailyAffiliation = 16000 + inventory.PlayerLevel * 500;
 | 
					        for (const key of allDailyAffiliationKeys) {
 | 
				
			||||||
        inventory.DailyAffiliationPvp = 16000 + inventory.PlayerLevel * 500;
 | 
					            inventory[key] = 16000 + inventory.PlayerLevel * 500;
 | 
				
			||||||
        inventory.DailyAffiliationLibrary = 16000 + inventory.PlayerLevel * 500;
 | 
					        }
 | 
				
			||||||
        inventory.DailyAffiliationCetus = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationQuills = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationSolaris = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationVentkids = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationVox = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationEntrati = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationNecraloid = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationZariman = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationKahl = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationCavia = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyAffiliationHex = 16000 + inventory.PlayerLevel * 500;
 | 
					 | 
				
			||||||
        inventory.DailyFocus = 250000 + inventory.PlayerLevel * 5000;
 | 
					        inventory.DailyFocus = 250000 + inventory.PlayerLevel * 5000;
 | 
				
			||||||
        await inventory.save();
 | 
					        await inventory.save();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -244,6 +234,12 @@ export const inventoryController: RequestHandler = async (request, response) =>
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (config.noDailyStandingLimits) {
 | 
				
			||||||
 | 
					        for (const key of allDailyAffiliationKeys) {
 | 
				
			||||||
 | 
					            inventoryResponse[key] = 999_999;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Fix for #380
 | 
					    // Fix for #380
 | 
				
			||||||
    inventoryResponse.NextRefill = { $date: { $numberLong: "9999999999999" } };
 | 
					    inventoryResponse.NextRefill = { $date: { $numberLong: "9999999999999" } };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -54,6 +54,7 @@ interface IConfig {
 | 
				
			|||||||
    unlockDoubleCapacityPotatoesEverywhere?: boolean;
 | 
					    unlockDoubleCapacityPotatoesEverywhere?: boolean;
 | 
				
			||||||
    unlockExilusEverywhere?: boolean;
 | 
					    unlockExilusEverywhere?: boolean;
 | 
				
			||||||
    unlockArcanesEverywhere?: boolean;
 | 
					    unlockArcanesEverywhere?: boolean;
 | 
				
			||||||
 | 
					    noDailyStandingLimits?: boolean;
 | 
				
			||||||
    spoofMasteryRank?: number;
 | 
					    spoofMasteryRank?: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -514,8 +514,12 @@ const standingLimitBinToInventoryKey: Record<
 | 
				
			|||||||
    STANDING_LIMIT_BIN_HEX: "DailyAffiliationHex"
 | 
					    STANDING_LIMIT_BIN_HEX: "DailyAffiliationHex"
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const allDailyAffiliationKeys: (keyof IDailyAffiliations)[] = Object.entries(standingLimitBinToInventoryKey).map(
 | 
				
			||||||
 | 
					    arr => arr[1]
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getStandingLimit = (inventory: IDailyAffiliations, bin: TStandingLimitBin): number => {
 | 
					export const getStandingLimit = (inventory: IDailyAffiliations, bin: TStandingLimitBin): number => {
 | 
				
			||||||
    if (bin == "STANDING_LIMIT_BIN_NONE") {
 | 
					    if (bin == "STANDING_LIMIT_BIN_NONE" || config.noDailyStandingLimits) {
 | 
				
			||||||
        return Number.MAX_SAFE_INTEGER;
 | 
					        return Number.MAX_SAFE_INTEGER;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return inventory[standingLimitBinToInventoryKey[bin]];
 | 
					    return inventory[standingLimitBinToInventoryKey[bin]];
 | 
				
			||||||
@ -526,7 +530,7 @@ export const updateStandingLimit = (
 | 
				
			|||||||
    bin: TStandingLimitBin,
 | 
					    bin: TStandingLimitBin,
 | 
				
			||||||
    subtrahend: number
 | 
					    subtrahend: number
 | 
				
			||||||
): void => {
 | 
					): void => {
 | 
				
			||||||
    if (bin != "STANDING_LIMIT_BIN_NONE") {
 | 
					    if (bin != "STANDING_LIMIT_BIN_NONE" && !config.noDailyStandingLimits) {
 | 
				
			||||||
        inventory[standingLimitBinToInventoryKey[bin]] -= subtrahend;
 | 
					        inventory[standingLimitBinToInventoryKey[bin]] -= subtrahend;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -298,6 +298,12 @@
 | 
				
			|||||||
                                            Arcane Adapters Everywhere
 | 
					                                            Arcane Adapters Everywhere
 | 
				
			||||||
                                        </label>
 | 
					                                        </label>
 | 
				
			||||||
                                    </div>
 | 
					                                    </div>
 | 
				
			||||||
 | 
					                                    <div class="form-check">
 | 
				
			||||||
 | 
					                                        <input class="form-check-input" type="checkbox" id="noDailyStandingLimits" />
 | 
				
			||||||
 | 
					                                        <label class="form-check-label" for="noDailyStandingLimits">
 | 
				
			||||||
 | 
					                                            No Daily Standing Limits
 | 
				
			||||||
 | 
					                                        </label>
 | 
				
			||||||
 | 
					                                    </div>
 | 
				
			||||||
                                    <div class="form-group mt-2">
 | 
					                                    <div class="form-group mt-2">
 | 
				
			||||||
                                        <label class="form-label" for="spoofMasteryRank">
 | 
					                                        <label class="form-label" for="spoofMasteryRank">
 | 
				
			||||||
                                            Spoofed Mastery Rank (-1 to disable)
 | 
					                                            Spoofed Mastery Rank (-1 to disable)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user