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:
parent
dfa49e9433
commit
d8598c764e
9 changed files with 90 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue