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

@@ -772,8 +772,14 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
player->SetRestFlag(REST_FLAG_IN_TAVERN, atEntry->entry);
if (sWorld->IsFFAPvPRealm())
player->RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
{
if (player->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
{
player->RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
sScriptMgr->OnFfaPvpStateUpdate(player, false);
}
}
return;
}