Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-09-21 09:42:10 -06:00
committed by GitHub
27 changed files with 327 additions and 72 deletions

View File

@@ -2089,8 +2089,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