mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
The repo was internally inconsistent: the LICENSE file is GPL v3 but every src/ header carried the LGPL v3 notice and the README said "LGPL v3 or later". LGPL was also the wrong fit — this is an injected mod plus a bundled addon, not a library other code links against, so LGPL's linking exception buys nothing. It's also required: src/voicechat/Tts.cpp is ported from awesome_wotlk's VoiceChat.cpp, which is GPL v3, and a derivative of GPL code cannot be relicensed under more permissive terms. Dependencies stay compatible — MinHook (BSD-2) and the nampower-mirrored packet shapes (BSD) are GPL-compatible, and SAPI is covered by the system-library exception. Swept "GNU Lesser General Public License" -> "GNU General Public License" across all 257 src/ headers and changed the README license line to match the GPL v3 LICENSE file. Comment-only; no build impact.
60 lines
2.2 KiB
C++
60 lines
2.2 KiB
C++
// This file is part of ClassicAPI.
|
|
//
|
|
// ClassicAPI is free software: you can redistribute it and/or modify it under the terms
|
|
// of the GNU General Public License as published by the Free Software Foundation, either
|
|
// version 3 of the License, or (at your option) any later version.
|
|
//
|
|
// ClassicAPI is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
// PURPOSE. See the GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License along with
|
|
// ClassicAPI. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
// Suppress vanilla 1.12.1's "Your game interface files are corrupt"
|
|
// fatal error so the engine accepts the in-memory file modifications
|
|
// ClassicAPI makes via the file-read hook:
|
|
//
|
|
// - `src/bindings/Inject.cpp` splices into FrameXML's `Bindings.xml`
|
|
// - `src/addons/Embedded.cpp` surfaces the embedded `!!!ClassicAPI`
|
|
// addon
|
|
//
|
|
// Both diverge from what's on disk, so the cumulative hashes the
|
|
// engine computes against `Interface\FrameXML.sig` (global) and each
|
|
// addon entry's stored signature (per-addon) no longer match. The
|
|
// engine calls `FUN_00401560(10)` and tears down the process.
|
|
//
|
|
// We hook `FUN_00401560` (the fatal-error dispatcher) and drop calls
|
|
// with code `10`. Other codes pass through to the original handler
|
|
// unmolested — we don't want to mask legitimate fatal conditions
|
|
// (login failures, connection drops, etc., which use other codes).
|
|
//
|
|
// Modded clients (Octo + TLS-bootloader, SuperWoW-style) usually
|
|
// neutralize the integrity checks at startup; the engine never
|
|
// reaches `FUN_00401560(10)` there and our hook is a harmless no-op.
|
|
|
|
#include "Game.h"
|
|
#include "Offsets.h"
|
|
|
|
namespace Security::FrameXMLBypass {
|
|
|
|
namespace {
|
|
|
|
using FatalError_t = void(__fastcall *)(unsigned code);
|
|
FatalError_t FatalError_o = nullptr;
|
|
|
|
void __fastcall FatalError_h(unsigned code) {
|
|
if (code == 10)
|
|
return;
|
|
FatalError_o(code);
|
|
}
|
|
|
|
const Game::HookAutoRegister _hookreg{
|
|
Offsets::FUN_FATAL_ERROR,
|
|
reinterpret_cast<void *>(&FatalError_h),
|
|
reinterpret_cast<void **>(&FatalError_o)};
|
|
|
|
} // namespace
|
|
|
|
} // namespace Security::FrameXMLBypass
|