mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
feat(Core/Spell): Header include optimization for files: SpellAura.h SpellAuraEffects.h (#2632)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "UnitEvents.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
//==============================================================
|
||||
//================= ThreatCalcHelper ===========================
|
||||
|
||||
@@ -416,6 +416,26 @@ void AuraEffect::GetApplicationList(std::list<AuraApplication*> & applicationLis
|
||||
}
|
||||
}
|
||||
|
||||
uint32 AuraEffect::GetId() const
|
||||
{
|
||||
return m_spellInfo->Id;
|
||||
}
|
||||
|
||||
int32 AuraEffect::GetMiscValueB() const
|
||||
{
|
||||
return m_spellInfo->Effects[m_effIndex].MiscValueB;
|
||||
}
|
||||
|
||||
int32 AuraEffect::GetMiscValue() const
|
||||
{
|
||||
return m_spellInfo->Effects[m_effIndex].MiscValue;
|
||||
}
|
||||
|
||||
AuraType AuraEffect::GetAuraType() const
|
||||
{
|
||||
return (AuraType)m_spellInfo->Effects[m_effIndex].ApplyAuraName;
|
||||
}
|
||||
|
||||
int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||
{
|
||||
int32 amount;
|
||||
@@ -1048,6 +1068,11 @@ bool AuraEffect::IsAffectedOnSpell(SpellInfo const* spell) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AuraEffect::HasSpellClassMask() const
|
||||
{
|
||||
return m_spellInfo->Effects[m_effIndex].SpellClassMask;
|
||||
}
|
||||
|
||||
void AuraEffect::SendTickImmune(Unit* target, Unit* caster) const
|
||||
{
|
||||
if (caster)
|
||||
|
||||
@@ -14,7 +14,6 @@ class SpellInfo;
|
||||
|
||||
#include "SpellAuras.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
typedef void(AuraEffect::*pAuraEffectHandler)(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
|
||||
@@ -35,14 +34,14 @@ class AuraEffect
|
||||
SpellModifier* GetSpellModifier() const { return m_spellmod; }
|
||||
|
||||
SpellInfo const* GetSpellInfo() const { return m_spellInfo; }
|
||||
uint32 GetId() const { return m_spellInfo->Id; }
|
||||
uint32 GetId() const;
|
||||
uint32 GetEffIndex() const { return m_effIndex; }
|
||||
int32 GetBaseAmount() const { return m_baseAmount; }
|
||||
int32 GetAmplitude() const { return m_amplitude; }
|
||||
|
||||
int32 GetMiscValueB() const { return m_spellInfo->Effects[m_effIndex].MiscValueB; }
|
||||
int32 GetMiscValue() const { return m_spellInfo->Effects[m_effIndex].MiscValue; }
|
||||
AuraType GetAuraType() const { return (AuraType)m_spellInfo->Effects[m_effIndex].ApplyAuraName; }
|
||||
int32 GetMiscValueB() const;
|
||||
int32 GetMiscValue() const;
|
||||
AuraType GetAuraType() const;
|
||||
int32 GetAmount() const { return m_isAuraEnabled ? m_amount : 0; }
|
||||
int32 GetForcedAmount() const { return m_amount; }
|
||||
void SetAmount(int32 amount) { m_amount = amount; m_canBeRecalculated = false;}
|
||||
@@ -73,7 +72,7 @@ class AuraEffect
|
||||
bool IsPeriodic() const { return m_isPeriodic; }
|
||||
void SetPeriodic(bool isPeriodic) { m_isPeriodic = isPeriodic; }
|
||||
bool IsAffectedOnSpell(SpellInfo const* spell) const;
|
||||
bool HasSpellClassMask() const { return m_spellInfo->Effects[m_effIndex].SpellClassMask; }
|
||||
bool HasSpellClassMask() const;
|
||||
|
||||
void SendTickImmune(Unit* target, Unit* caster) const;
|
||||
void PeriodicTick(AuraApplication * aurApp, Unit* caster) const;
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#define ACORE_SPELLAURAS_H
|
||||
|
||||
#include "SpellAuraDefines.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Unit.h"
|
||||
|
||||
class Unit;
|
||||
@@ -24,9 +23,6 @@ class DynamicObject;
|
||||
class AuraScript;
|
||||
class ProcInfo;
|
||||
|
||||
// update aura target map every 500 ms instead of every update - reduce amount of grid searcher calls
|
||||
#define UPDATE_TARGET_MAP_INTERVAL 500
|
||||
|
||||
class AuraApplication
|
||||
{
|
||||
friend void Unit::_ApplyAura(AuraApplication * aurApp, uint8 effMask);
|
||||
@@ -93,7 +89,7 @@ class Aura
|
||||
virtual ~Aura();
|
||||
|
||||
SpellInfo const* GetSpellInfo() const { return m_spellInfo; }
|
||||
uint32 GetId() const{ return GetSpellInfo()->Id; }
|
||||
uint32 GetId() const;
|
||||
|
||||
uint64 GetCastItemGUID() const { return m_castItemGuid; }
|
||||
uint32 GetCastItemEntry() const { return m_castItemEntry; }
|
||||
@@ -151,7 +147,7 @@ class Aura
|
||||
bool IsArea() const;
|
||||
bool IsPassive() const;
|
||||
bool IsDeathPersistent() const;
|
||||
bool 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 IsRemovedOnShapeLost(Unit* target) const;
|
||||
bool CanBeSaved() const;
|
||||
bool IsRemoved() const { return m_isRemoved; }
|
||||
bool CanBeSentToClient() const;
|
||||
|
||||
Reference in New Issue
Block a user