mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Spells: add UNIT_FLAG2_IGNORE_REPUTATION when a player is receiving a faction modifying aura
This commit is contained in:
@@ -4845,13 +4845,19 @@ void AuraEffect::HandleAuraModFaction(AuraApplication const* aurApp, uint8 mode,
|
||||
{
|
||||
target->SetFaction(GetMiscValue());
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_IGNORE_REPUTATION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
target->RestoreFaction();
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_IGNORE_REPUTATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user