Core/Auras: Added serverside checking for UNIT_FLAG_PACIFIED when attempting to start melee attack
Closes #8623
This commit is contained in:
@@ -8914,6 +8914,9 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
|
||||
if (GetTypeId() == TYPEID_PLAYER && IsMounted())
|
||||
return false;
|
||||
|
||||
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
return false;
|
||||
|
||||
// nobody can attack GM in GM-mode
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
||||
@@ -2301,7 +2301,10 @@ void AuraEffect::HandleAuraModPacify(AuraApplication const* aurApp, uint8 mode,
|
||||
Unit* target = aurApp->GetTarget();
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED);
|
||||
target->AttackStop();
|
||||
}
|
||||
else
|
||||
{
|
||||
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
|
||||
|
||||
Reference in New Issue
Block a user