mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
refactor(Scripts/Pet): code cleanup (part 8) (#6928)
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include "CellImpl.h"
|
||||
#include "CombatAI.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -62,10 +61,13 @@ public:
|
||||
|
||||
// Xinef: Night of the Dead avoidance
|
||||
if (Aura* aur = me->GetAura(SPELL_DK_NIGHT_OF_THE_DEAD))
|
||||
if (Unit* owner = me->GetOwner())
|
||||
if (AuraEffect* aurEff = owner->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2718, 0))
|
||||
if (aur->GetEffect(0))
|
||||
aur->GetEffect(0)->SetAmount(-aurEff->GetSpellInfo()->Effects[EFFECT_2].CalcValue());
|
||||
if (AuraEffect* aurEff = owner->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2718, 0))
|
||||
{
|
||||
if (aur->GetEffect(0))
|
||||
{
|
||||
aur->GetEffect(0)->SetAmount(-aurEff->GetSpellInfo()->Effects[EFFECT_2].CalcValue());
|
||||
}
|
||||
}
|
||||
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
|
||||
Reference in New Issue
Block a user