Core/Housing: activate Start Tutorial opcode at runtime

This commit is contained in:
Gexo91
2026-09-13 01:41:45 +03:00
parent ec769be191
commit 06f1d9aea9
@@ -1,14 +1,43 @@
/* /*
* Copyright (C) WowCommunity Project * Copyright (C) WowCommunity Project
* *
* This SourceCode is NOT free a software. Please hold everything Private * This SourceCode is NOT a free software. Please hold everything Private
* and read our Terms * and read our Terms
*/ */
#include "Player.h" #include "HousingTutorialPackets.h"
#include "HousingTutorialSession.h"
#include "Opcodes.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include <utility>
namespace
{
void HandleHousingStartTutorialDirect(WorldSession* session, WorldPacket& rawPacket)
{
WorldPackets::Housing::HousingSvcsStartTutorial packet(std::move(rawPacket));
Housing::HandleStartTutorial(session, packet);
}
}
void AddCustom_playerscript() void AddCustom_playerscript()
{ {
// The 12.1 Housing opcode is present in the client/core opcode table but is
// still marked STATUS_UNHANDLED there. Install the already implemented
// tutorial handler after OpcodeTable::Initialize() has completed.
//
// This keeps the compatibility change isolated from the generated/native
// opcode list while allowing the retail client button to reach the server.
if (!opcodeTable.IsValid(CMSG_HOUSING_SVCS_START_TUTORIAL))
return;
ClientOpcodeHandler* handler = const_cast<ClientOpcodeHandler*>(
opcodeTable[CMSG_HOUSING_SVCS_START_TUTORIAL]);
if (!handler)
return;
handler->Status = STATUS_LOGGEDIN;
handler->Call = &HandleHousingStartTutorialDirect;
handler->ProcessingPlace = PROCESS_THREADUNSAFE;
} }