mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
feat(Core): OnBeforeChooseGraveyard Hook (#12860)
This commit is contained in:
@@ -1349,6 +1349,14 @@ void ScriptMgr::OnPlayerResurrect(Player* player, float restore_percent, bool ap
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnBeforeChooseGraveyard(Player* player, TeamId teamId, bool nearCorpse, uint32& graveyardOverride)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
script->OnBeforeChooseGraveyard(player, teamId, nearCorpse, graveyardOverride);
|
||||
});
|
||||
}
|
||||
|
||||
bool ScriptMgr::CanPlayerUseChat(Player* player, uint32 type, uint32 language, std::string& msg)
|
||||
{
|
||||
auto ret = IsValidBoolScript<PlayerScript>([&](PlayerScript* script)
|
||||
|
||||
@@ -1316,6 +1316,9 @@ public:
|
||||
|
||||
virtual void OnPlayerResurrect(Player* /*player*/, float /*restore_percent*/, bool /*applySickness*/) { }
|
||||
|
||||
// Called before selecting the graveyard when releasing spirit
|
||||
virtual void OnBeforeChooseGraveyard(Player* /*player*/, TeamId /*teamId*/, bool /*nearCorpse*/, uint32& /*graveyardOverride*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook called before player sending message in default chat
|
||||
*
|
||||
@@ -2317,6 +2320,7 @@ public: /* PlayerScript */
|
||||
void OnSetServerSideVisibility(Player* player, ServerSideVisibilityType& type, AccountTypes& sec);
|
||||
void OnSetServerSideVisibilityDetect(Player* player, ServerSideVisibilityType& type, AccountTypes& sec);
|
||||
void OnPlayerResurrect(Player* player, float restore_percent, bool applySickness);
|
||||
void OnBeforeChooseGraveyard(Player* player, TeamId teamId, bool nearCorpse, uint32& graveyardOverride);
|
||||
bool CanPlayerUseChat(Player* player, uint32 type, uint32 language, std::string& msg);
|
||||
bool CanPlayerUseChat(Player* player, uint32 type, uint32 language, std::string& msg, Player* receiver);
|
||||
bool CanPlayerUseChat(Player* player, uint32 type, uint32 language, std::string& msg, Group* group);
|
||||
|
||||
Reference in New Issue
Block a user