feat(Core): OnBeforeChooseGraveyard Hook (#12860)

This commit is contained in:
ZhengPeiRu21
2022-09-06 12:47:37 -06:00
committed by GitHub
parent 5d25a0686d
commit 80e6a6d781
3 changed files with 20 additions and 0 deletions

View File

@@ -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)