Core/Auras: Implemented SPELL_AURA_SET_FFA_PVP
Port From (https://github.com/TrinityCore/TrinityCore/commit/c57b012ee4e75dfb4c3d29b6c5f2308ae559aec4)
This commit is contained in:
@@ -631,7 +631,7 @@ namespace Game.Entities
|
|||||||
// @todo should we always synchronize UNIT_FIELD_BYTES_2, 1 of controller and controlled?
|
// @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
|
// no, we shouldn't, those are checked for affecting player by client
|
||||||
if (!pvpInfo.IsInNoPvPArea && !IsGameMaster()
|
if (!pvpInfo.IsInNoPvPArea && !IsGameMaster()
|
||||||
&& (pvpInfo.IsInFFAPvPArea || Global.WorldMgr.IsFFAPvPRealm()))
|
&& (pvpInfo.IsInFFAPvPArea || Global.WorldMgr.IsFFAPvPRealm() || HasAuraType(AuraType.SetFFAPvp)))
|
||||||
{
|
{
|
||||||
if (!IsFFAPvP())
|
if (!IsFFAPvP())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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)]
|
[AuraEffectHandler(AuraType.ModOverrideZonePvpType)]
|
||||||
void HandleModOverrideZonePVPType(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleModOverrideZonePVPType(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user