feat(Core/Spell): Header include optimization for files: SpellAura.h SpellAuraEffects.h (#2632)

This commit is contained in:
niaro-kitty
2020-02-19 09:55:18 +03:00
committed by GitHub
parent 38e8503d21
commit 32dcb3bf63
5 changed files with 46 additions and 12 deletions

View File

@@ -25,6 +25,9 @@
#include "Vehicle.h"
#include "ArenaSpectator.h"
// update aura target map every 500 ms instead of every update - reduce amount of grid searcher calls
static constexpr int32 UPDATE_TARGET_MAP_INTERVAL = 500;
AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 effMask):
_target(target), _base(aura), _removeMode(AURA_REMOVE_NONE), _slot(MAX_AURAS),
_flags(AFLAG_NONE), _effectsToApply(effMask), _needClientUpdate(false), _disableMask(0)
@@ -450,6 +453,11 @@ Aura::~Aura()
_DeleteRemovedApplications();
}
uint32 Aura::GetId() const
{
return GetSpellInfo()->Id;
}
Unit* Aura::GetCaster() const
{
if (GetOwner()->GetGUID() == GetCasterGUID())
@@ -1008,6 +1016,11 @@ bool Aura::IsDeathPersistent() const
return GetSpellInfo()->IsDeathPersistent();
}
bool Aura::IsRemovedOnShapeLost(Unit *target) const
{
return (GetCasterGUID() == target->GetGUID() && m_spellInfo->Stances && !m_spellInfo->HasAttribute(SPELL_ATTR2_NOT_NEED_SHAPESHIFT) && !m_spellInfo->HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFT));
}
bool Aura::CanBeSaved() const
{
if (IsPassive() || (GetSpellInfo()->HasAttribute(SPELL_ATTR0_HIDDEN_CLIENTSIDE) && GetSpellInfo()->Stances))