mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
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:
@@ -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);
|
||||
|
||||
@@ -1263,6 +1263,7 @@ void ScriptMgr::OnGetArenaTeamId(Player* player, uint8 slot, uint32& result)
|
||||
});
|
||||
}
|
||||
|
||||
//Signifies that IsFfaPvp has been called.
|
||||
void ScriptMgr::OnIsFFAPvP(Player* player, bool& result)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
@@ -1270,6 +1271,14 @@ void ScriptMgr::OnIsFFAPvP(Player* player, bool& result)
|
||||
script->OnIsFFAPvP(player, result);
|
||||
});
|
||||
}
|
||||
//Fires whenever the UNIT_BYTE2_FLAG_FFA_PVP bit is Changed
|
||||
void ScriptMgr::OnFfaPvpStateUpdate(Player* player, bool result)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
script->OnFfaPvpStateUpdate(player, result);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnIsPvP(Player* player, bool& result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user