feat(Core/Entities): add OnPlayerCanGiveLevel script hook (#21666)

This commit is contained in:
Vincent Vanclef
2025-03-10 08:44:33 +01:00
committed by GitHub
parent 4cdb315db1
commit ffe03f6e14
4 changed files with 20 additions and 0 deletions

View File

@@ -2476,6 +2476,9 @@ void Player::GiveLevel(uint8 level)
if (level == oldLevel)
return;
if (!sScriptMgr->OnPlayerCanGiveLevel(this, level))
return;
if (Guild* guild = GetGuild())
guild->UpdateMemberData(this, GUILD_MEMBER_DATA_LEVEL, level);