feat(Core/Hooks): OnBattlegroundDesertion (#4619)

This commit is contained in:
Francesco Borzì
2021-02-21 22:12:25 +01:00
committed by GitHub
parent 8dbdffab92
commit a4115862de
6 changed files with 48 additions and 23 deletions

View File

@@ -7,6 +7,7 @@
#ifndef SC_SCRIPTMGR_H
#define SC_SCRIPTMGR_H
#include "Battleground.h"
#include "Common.h"
#include "ObjectMgr.h"
#include "DBCStores.h"
@@ -744,6 +745,9 @@ protected:
public:
virtual void OnPlayerReleasedGhost(Player* /*player*/) { }
// Called when a player does a desertion action (see BattlegroundDesertionType)
virtual void OnBattlegroundDesertion(Player* /*player*/, BattlegroundDesertionType const /*desertionType*/) { }
// Called when a player completes a quest
virtual void OnPlayerCompleteQuest(Player* /*player*/, Quest const* /*quest_id*/) { }
@@ -1394,6 +1398,7 @@ public: /* PlayerScript */
void OnBeforeInitTalentForLevel(Player* player, uint8& level, uint32& talentPointsForLevel);
void OnFirstLogin(Player* player);
void OnPlayerCompleteQuest(Player* player, Quest const* quest);
void OnBattlegroundDesertion(Player* player, BattlegroundDesertionType const desertionType);
bool CanJoinInBattlegroundQueue(Player* player, uint64 BattlemasterGuid, BattlegroundTypeId BGTypeID, uint8 joinAsGroup, GroupJoinBattlegroundResult& err);
bool ShouldBeRewardedWithMoneyInsteadOfExp(Player* player);
void OnBeforeTempSummonInitStats(Player* player, TempSummon* tempSummon, uint32& duration);