refactor(Scripts/Pet): code cleanup (part 8) (#6928)
This commit is contained in:
parent
e954e3e32a
commit
e556560bc1
3 changed files with 7 additions and 11 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include "CreatureTextMgr.h"
|
||||
#include "Group.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "PetAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@ enum HunterSpells
|
|||
SPELL_HUNTER_PET_SCALING = 62915
|
||||
};
|
||||
|
||||
enum HunterCreatures
|
||||
{
|
||||
NPC_HUNTER_VIPER = 19921
|
||||
};
|
||||
|
||||
class npc_pet_hunter_snake_trap : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue