Core/Auras: Implemented SPELL_AURA_SET_FFA_PVP

Port From (https://github.com/TrinityCore/TrinityCore/commit/c57b012ee4e75dfb4c3d29b6c5f2308ae559aec4)
This commit is contained in:
hondacrx
2021-02-22 15:34:37 -05:00
parent a5e9adffe6
commit d21b61baba
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -631,7 +631,7 @@ namespace Game.Entities
// @todo should we always synchronize UNIT_FIELD_BYTES_2, 1 of controller and controlled?
// no, we shouldn't, those are checked for affecting player by client
if (!pvpInfo.IsInNoPvPArea && !IsGameMaster()
&& (pvpInfo.IsInFFAPvPArea || Global.WorldMgr.IsFFAPvPRealm()))
&& (pvpInfo.IsInFFAPvPArea || Global.WorldMgr.IsFFAPvPRealm() || HasAuraType(AuraType.SetFFAPvp)))
{
if (!IsFFAPvP())
{
+13
View File
@@ -6065,6 +6065,19 @@ namespace Game.Spells
}
}
[AuraEffectHandler(AuraType.SetFFAPvp)]
void HandleSetFFAPvP(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.Real))
return;
Player target = aurApp.GetTarget().ToPlayer();
if (!target)
return;
target.UpdatePvPState(true);
}
[AuraEffectHandler(AuraType.ModOverrideZonePvpType)]
void HandleModOverrideZonePVPType(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{