feat(Core/Scripting): OnPlayerResurrect allow changing of applySickness (#25353)

This commit is contained in:
sogladev 2026-04-15 13:03:56 +02:00 committed by GitHub
parent 1aac318401
commit 117095f1cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -794,7 +794,7 @@ void ScriptMgr::OnPlayerSetServerSideVisibilityDetect(Player* player, ServerSide
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_SET_SERVER_SIDE_VISIBILITY_DETECT, script->OnPlayerSetServerSideVisibilityDetect(player, type, sec));
}
void ScriptMgr::OnPlayerResurrect(Player* player, float restore_percent, bool applySickness)
void ScriptMgr::OnPlayerResurrect(Player* player, float restore_percent, bool& applySickness)
{
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_RESURRECT, script->OnPlayerResurrect(player, restore_percent, applySickness));
}

View file

@ -627,7 +627,7 @@ public:
virtual void OnPlayerSetServerSideVisibilityDetect(Player* /*player*/, ServerSideVisibilityType& /*type*/, AccountTypes& /*sec*/) { }
virtual void OnPlayerResurrect(Player* /*player*/, float /*restore_percent*/, bool /*applySickness*/) { }
virtual void OnPlayerResurrect(Player* /*player*/, float /*restore_percent*/, bool& /*applySickness*/) { }
// Called before selecting the graveyard when releasing spirit
virtual void OnPlayerBeforeChooseGraveyard(Player* /*player*/, TeamId /*teamId*/, bool /*nearCorpse*/, uint32& /*graveyardOverride*/) { }

View file

@ -443,7 +443,7 @@ public: /* PlayerScript */
bool OnPlayerCanSetTradeItem(Player* player, Item* tradedItem, uint8 tradeSlot);
void OnPlayerSetServerSideVisibility(Player* player, ServerSideVisibilityType& type, AccountTypes& sec);
void OnPlayerSetServerSideVisibilityDetect(Player* player, ServerSideVisibilityType& type, AccountTypes& sec);
void OnPlayerResurrect(Player* player, float restore_percent, bool applySickness);
void OnPlayerResurrect(Player* player, float restore_percent, bool& applySickness);
void OnPlayerBeforeChooseGraveyard(Player* player, TeamId teamId, bool nearCorpse, uint32& graveyardOverride);
bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 language, std::string& msg);
bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 language, std::string& msg, Player* receiver);