feat(core): OnFfaPvpStateUpdate Event (#13023)

* Event for Notification when the Player enters into or Leaves Ffa

* Bug and Formatting Fixes
This commit is contained in:
DavuKnight
2022-09-21 07:33:28 -05:00
committed by GitHub
parent dfa49e9433
commit d8598c764e
9 changed files with 90 additions and 14 deletions

View File

@@ -170,6 +170,15 @@ CreatureAI* ScriptMgr::GetCreatureAI(Creature* creature)
return tempScript ? tempScript->GetAI(creature) : nullptr;
}
//Fires whenever the UNIT_BYTE2_FLAG_FFA_PVP bit is Changed on the player
void ScriptMgr::OnFfaPvpStateUpdate(Creature* creature, bool InPvp)
{
ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
{
script->OnFfaPvpStateUpdate(creature, InPvp);
});
}
void ScriptMgr::OnCreatureUpdate(Creature* creature, uint32 diff)
{
ASSERT(creature);