mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Auras: Implemented SPELL_AURA_SET_FFA_PVP
This commit is contained in:
@@ -23498,7 +23498,7 @@ void Player::UpdatePvPState(bool onlyFFA)
|
||||
/// @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 || sWorld->IsFFAPvPRealm()))
|
||||
&& (pvpInfo.IsInFFAPvPArea || sWorld->IsFFAPvPRealm() || HasAuraType(SPELL_AURA_SET_FFA_PVP)))
|
||||
{
|
||||
if (!IsFFAPvP())
|
||||
{
|
||||
|
||||
@@ -237,7 +237,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleAuraModAttackPowerPercent, //166 SPELL_AURA_MOD_ATTACK_POWER_PCT
|
||||
&AuraEffect::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT
|
||||
&AuraEffect::HandleNoImmediateEffect, //168 SPELL_AURA_MOD_DAMAGE_DONE_VERSUS implemented in Unit::SpellDamageBonus, Unit::MeleeDamageBonus
|
||||
&AuraEffect::HandleNULL, //169 SPELL_AURA_SET_FFA_PVP
|
||||
&AuraEffect::HandleSetFFAPvP, //169 SPELL_AURA_SET_FFA_PVP implemented in Player::UpdatePvPState
|
||||
&AuraEffect::HandleDetectAmore, //170 SPELL_AURA_DETECT_AMORE used to detect various spells that change visual of units for aura target
|
||||
&AuraEffect::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
|
||||
&AuraEffect::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
|
||||
@@ -6305,6 +6305,18 @@ void AuraEffect::HandleLinkedSummon(AuraApplication const* aurApp, uint8 mode, b
|
||||
}
|
||||
}
|
||||
|
||||
void AuraEffect::HandleSetFFAPvP(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
return;
|
||||
|
||||
Player* target = aurApp->GetTarget()->ToPlayer();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
target->UpdatePvPState(true);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleModOverrideZonePVPType(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
|
||||
@@ -313,6 +313,7 @@ class TC_GAME_API AuraEffect
|
||||
void HandlePlayScene(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleCreateAreaTrigger(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleLinkedSummon(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleSetFFAPvP(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleModOverrideZonePVPType(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleBattlegroundPlayerPosition(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user