Skip to content

Fix build against current AzerothCore API (hook signature changes) - #3

Open
holmax009-glitch wants to merge 1 commit into
Zindokar:mainfrom
holmax009-glitch:fix/hook-signatures-current-ac-api
Open

Fix build against current AzerothCore API (hook signature changes)#3
holmax009-glitch wants to merge 1 commit into
Zindokar:mainfrom
holmax009-glitch:fix/hook-signatures-current-ac-api

Conversation

@holmax009-glitch

Copy link
Copy Markdown

Problem

mod-hardcore fails to compile against current AzerothCore master with C3668 / C4263 / C4264 on OnPlayerResurrect and CanPacketReceive. Two core hook signatures changed:

  • PlayerScript::OnPlayerResurrect now takes bool& applySickness (was bool)
  • ServerScript::CanPacketReceive now takes const WorldPacket& (was WorldPacket&)

Fix

Update the two overrides to match. Behavior is unchanged:

  • applySickness was already unused (commented out)
  • CanPacketReceive only calls packet.GetOpcode() (const), so const-qualifying the ref is safe

Testing

  • Builds clean on Windows / MSVC (RelWithDebInfo, x64)
  • worldserver boots with the module enabled (ModHardcore.Enable = 1); module config loads and the server reaches ready state

Two PlayerScript/ServerScript hook signatures changed in current
AzerothCore master and broke the build (C3668/C4263/C4264):

- PlayerScript::OnPlayerResurrect: 3rd param is now `bool&` (was `bool`)
- ServerScript::CanPacketReceive: packet param is now `const WorldPacket&`
  (was `WorldPacket&`)

Update the overrides accordingly. Bodies are unaffected: applySickness
was already unused, and CanPacketReceive only calls packet.GetOpcode()
(const), so making the packet const is safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant