feat(Core): add OnPlayerQuestAccept hook to PlayerScript (#25875)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -852,6 +852,11 @@ void ScriptMgr::OnPlayerQuestAbandon(Player* player, uint32 questId)
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_QUEST_ABANDON, script->OnPlayerQuestAbandon(player, questId));
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerQuestAccept(Player* player, Quest const* quest)
|
||||
{
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_QUEST_ACCEPT, script->OnPlayerQuestAccept(player, quest));
|
||||
}
|
||||
|
||||
// Player anti cheat
|
||||
void ScriptMgr::AnticheatSetCanFlybyServer(Player* player, bool apply)
|
||||
{
|
||||
|
||||
@@ -190,6 +190,7 @@ enum PlayerHook
|
||||
PLAYERHOOK_ON_PLAYER_ENTER_COMBAT,
|
||||
PLAYERHOOK_ON_PLAYER_LEAVE_COMBAT,
|
||||
PLAYERHOOK_ON_QUEST_ABANDON,
|
||||
PLAYERHOOK_ON_PLAYER_QUEST_ACCEPT,
|
||||
PLAYERHOOK_ON_GET_QUEST_RATE,
|
||||
PLAYERHOOK_ON_CAN_PLAYER_FLY_IN_ZONE,
|
||||
PLAYERHOOK_ANTICHEAT_SET_CAN_FLY_BY_SERVER,
|
||||
@@ -730,6 +731,14 @@ public:
|
||||
*/
|
||||
virtual void OnPlayerQuestAbandon(Player* /*player*/, uint32 /*questId*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook called after a player accepts a quest, regardless of quest giver type
|
||||
*
|
||||
* @param player Contains information about the Player
|
||||
* @param quest Contains information about the Quest
|
||||
*/
|
||||
virtual void OnPlayerQuestAccept(Player* /*player*/, Quest const* /*quest*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook called before other CanFlyChecks are applied
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user