mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +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:
@@ -2088,8 +2088,14 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
|
||||
if (owner->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED))
|
||||
trigger->SetUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED);
|
||||
if (owner->IsFFAPvP())
|
||||
trigger->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
|
||||
{
|
||||
if (!HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
|
||||
{
|
||||
sScriptMgr->OnFfaPvpStateUpdate(trigger, true);
|
||||
trigger->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
|
||||
}
|
||||
|
||||
}
|
||||
// xinef: Remove Immunity flags
|
||||
trigger->SetImmuneToNPC(false);
|
||||
// xinef: set proper orientation, fixes cast against stealthed targets
|
||||
|
||||
Reference in New Issue
Block a user