feat(Core/Player): Addition of a Hook in CanFlyInZone check (#16590)

---------

Co-authored-by: tmoos <tmoos@meteomatics.com>
Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Tralenor
2023-09-20 22:40:08 +02:00
committed by GitHub
parent 152429867b
commit 0796df57ac
6 changed files with 35 additions and 4 deletions

View File

@@ -74,6 +74,21 @@ void ScriptMgr::OnPlayerReleasedGhost(Player* player)
});
}
bool ScriptMgr::OnCanPlayerFlyInZone(Player* player, uint32 mapId, uint32 zoneId, SpellInfo const* bySpell)
{
auto ret = IsValidBoolScript<PlayerScript>([player, mapId, zoneId, bySpell](PlayerScript* script)
{
return !script->OnCanPlayerFlyInZone(player, mapId, zoneId, bySpell);
});
if (ret && *ret)
{
return false;
}
return true;
}
void ScriptMgr::OnPVPKill(Player* killer, Player* killed)
{
ExecuteScript<PlayerScript>([&](PlayerScript* script)