diff --git a/backend/utils/clientPatcher.js b/backend/utils/clientPatcher.js index 442e478..398aaf0 100644 --- a/backend/utils/clientPatcher.js +++ b/backend/utils/clientPatcher.js @@ -584,6 +584,17 @@ class ClientPatcher { const { buffer: finalData, count: discordCount } = this.patchDiscordUrl(patchedData); if (count === 0 && discordCount === 0) { + // Check if we're in debug mode with skip - don't fallback if intentionally skipping + const hasSkipList = (process.env.HYTALE_PATCH_SKIP || '').trim().length > 0; + const noLegacyFallback = process.env.HYTALE_NO_LEGACY_FALLBACK === '1'; + + if (hasSkipList || noLegacyFallback) { + console.log('No occurrences patched (skip list active or legacy fallback disabled)'); + fs.writeFileSync(clientPath, patchedData); + this.markAsPatched(clientPath); + return { success: true, patchCount: 0, skipped: true }; + } + console.log('No occurrences found - trying legacy UTF-16LE format...'); // Fallback to legacy patching for older binary formats