AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_valkyr_touch_aura Class Reference
Inheritance diagram for spell_valkyr_touch_aura:
AuraScript _SpellScript

Private Member Functions

 PrepareAuraScript (spell_valkyr_touch_aura)
 
void HandleEffectPeriodic (AuraEffect const *aurEff)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from AuraScript
 AuraScript ()
 
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Aura *aura)
 
void _PrepareScriptCall (AuraScriptHookType hookType, AuraApplication const *aurApp=nullptr)
 
void _FinishScriptCall ()
 
bool _IsDefaultActionPrevented ()
 
void PreventDefaultAction ()
 
SpellInfo const * GetSpellInfo () const
 
uint32 GetId () const
 
ObjectGuid GetCasterGUID () const
 
Unit * GetCaster () const
 
WorldObject * GetOwner () const
 
Unit * GetUnitOwner () const
 
DynamicObject * GetDynobjOwner () const
 
void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
Aura * GetAura () const
 
AuraObjectType GetType () const
 
int32 GetDuration () const
 
void SetDuration (int32 duration, bool withMods=false)
 
void RefreshDuration ()
 
time_t GetApplyTime () const
 
int32 GetMaxDuration () const
 
void SetMaxDuration (int32 duration)
 
int32 CalcMaxDuration () const
 
bool IsExpired () const
 
bool IsPermanent () const
 
uint8 GetCharges () const
 
void SetCharges (uint8 charges)
 
uint8 CalcMaxCharges () const
 
bool ModCharges (int8 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool DropCharge (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
uint8 GetStackAmount () const
 
void SetStackAmount (uint8 num)
 
bool ModStackAmount (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool IsPassive () const
 
bool IsDeathPersistent () const
 
bool HasEffect (uint8 effIndex) const
 
AuraEffect * GetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
Unit * GetTarget () const
 
AuraApplication const * GetTargetApplication () const
 
- Public Member Functions inherited from _SpellScript
 _SpellScript ()
 
virtual ~_SpellScript ()
 
virtual void _Register ()
 
virtual void _Unload ()
 
virtual void _Init (std::string const *scriptname, uint32 spellId)
 
std::string const * _GetScriptName () const
 
virtual bool Validate (SpellInfo const *)
 
virtual bool Load ()
 
virtual void Unload ()
 
- Static Public Member Functions inherited from _SpellScript
static bool ValidateSpellInfo (std::initializer_list< uint32 > spellIds)
 
template<class T >
static bool ValidateSpellInfo (T const &spellIds)
 
- Public Attributes inherited from AuraScript
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
 
HookList< AuraDispelHandler > OnDispel
 
HookList< AuraDispelHandler > AfterDispel
 
HookList< EffectApplyHandler > OnEffectApply
 
HookList< EffectApplyHandler > AfterEffectApply
 
HookList< EffectApplyHandler > OnEffectRemove
 
HookList< EffectApplyHandler > AfterEffectRemove
 
HookList< EffectPeriodicHandler > OnEffectPeriodic
 
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
 
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
 
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
 
HookList< EffectAbsorbHandler > OnEffectAbsorb
 
HookList< EffectAbsorbHandler > AfterEffectAbsorb
 
HookList< EffectManaShieldHandler > OnEffectManaShield
 
HookList< EffectManaShieldHandler > AfterEffectManaShield
 
HookList< EffectSplitHandler > OnEffectSplit
 
HookList< CheckProcHandler > DoCheckProc
 
HookList< CheckEffectProcHandler > DoCheckEffectProc
 
HookList< AfterCheckProcHandler > DoAfterCheckProc
 
HookList< AuraProcHandler > DoPrepareProc
 
HookList< AuraProcHandler > OnProc
 
HookList< AuraProcHandler > AfterProc
 
HookList< EffectProcHandler > OnEffectProc
 
HookList< EffectProcHandler > AfterEffectProc
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ HandleEffectPeriodic()

void spell_valkyr_touch_aura::HandleEffectPeriodic ( AuraEffect const *  aurEff)
inlineprivate
823 {
825 Unit* caster = GetCaster();
826 if (!caster)
827 return;
828 if (caster->GetMap()->GetId() == 649 )
829 {
831 Map::PlayerList const& pl = caster->GetMap()->GetPlayers();
832 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
833 if (Player* plr = itr->GetSource())
834 if (plr->IsAlive() && !plr->HasAura(excludedID) && !plr->HasSpiritOfRedemptionAura())
835 {
836 uint32 absorb = 0;
837 uint32 resist = 0;
839 int32 dmg = urand(2925, 3075) * (caster->GetMap()->GetDifficulty() - 1);
840 uint32 damage = dmg;
841 int32 resilienceReduction = damage;
842 if (caster->CanApplyResilience())
843 Unit::ApplyResilience(plr, nullptr, &dmg, false, CR_CRIT_TAKEN_SPELL);
844 resilienceReduction = damage - resilienceReduction;
845 damage -= resilienceReduction;
846 uint32 mitigated_damage = resilienceReduction;
847 DamageInfo dmgInfo(caster, plr, damage, GetSpellInfo(), GetSpellInfo()->GetSchoolMask(), DOT, mitigated_damage);
848 Unit::CalcAbsorbResist(dmgInfo);
849 Unit::DealDamageMods(plr, damage, &absorb);
850 int32 overkill = damage - plr->GetHealth();
851 if (overkill < 0)
852 overkill = 0;
853 SpellPeriodicAuraLogInfo pInfo(aurEff, damage, overkill, absorb, resist, 0.0f, false);
854 plr->SendPeriodicAuraLog(&pInfo);
855 Unit::DealDamage(caster, plr, damage, 0, DOT, GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), true);
856 }
857 }
858 }
std::int32_t int32
Definition Define.h:103
std::uint32_t uint32
Definition Define.h:107
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ BASE_ATTACK
Definition Unit.h:216
@ CR_CRIT_TAKEN_SPELL
Definition Unit.h:240
@ DOT
Definition Unit.h:257
@ MELEE_HIT_NORMAL
Definition Unit.h:293
void PreventDefaultAction()
Definition SpellScript.cpp:1005
SpellInfo const * GetSpellInfo() const
Definition SpellScript.cpp:1025
Unit * GetCaster() const
Definition SpellScript.cpp:1040
Definition Unit.h:337
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
uint32 GetId() const
Definition Map.h:234
Difficulty GetDifficulty() const
Definition Map.h:294
PlayerList const & GetPlayers() const
Definition Map.h:335
Definition Player.h:1086
uint32 ExcludeTargetAuraSpell
Definition SpellInfo.h:370
Definition Unit.h:665
bool CanApplyResilience() const
Definition Unit.h:1177
static void ApplyResilience(Unit const *victim, float *crit, int32 *damage, bool isCrit, CombatRating type)
Definition Unit.cpp:14811
static void DealDamageMods(Unit const *victim, uint32 &damage, uint32 *absorb)
Definition Unit.cpp:980
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true, bool allowGM=false, Spell const *spell=nullptr)
Definition Unit.cpp:990
static void CalcAbsorbResist(DamageInfo &dmgInfo, bool Splited=false, uint8 casterLevel=0)
Definition Unit.cpp:2340
Map * GetMap() const
Definition Object.h:637
Definition Unit.h:322
Definition Unit.h:532

References Unit::ApplyResilience(), BASE_ATTACK, MapRefMgr::begin(), Unit::CalcAbsorbResist(), Unit::CanApplyResilience(), CR_CRIT_TAKEN_SPELL, Unit::DealDamage(), Unit::DealDamageMods(), DOT, MapRefMgr::end(), SpellInfo::ExcludeTargetAuraSpell, AuraScript::GetCaster(), Map::GetDifficulty(), Map::GetId(), WorldObject::GetMap(), Map::GetPlayers(), AuraScript::GetSpellInfo(), MELEE_HIT_NORMAL, AuraScript::PreventDefaultAction(), and urand().

Referenced by Register().

◆ PrepareAuraScript()

spell_valkyr_touch_aura::PrepareAuraScript ( spell_valkyr_touch_aura  )
private

◆ Register()

void spell_valkyr_touch_aura::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

861 {
863 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELL_AURA_PERIODIC_DAMAGE
Definition SpellAuraDefines.h:66
#define AuraEffectPeriodicFn(F, I, N)
Definition SpellScript.h:772
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition SpellScript.h:771
void HandleEffectPeriodic(AuraEffect const *aurEff)
Definition boss_twin_valkyr.cpp:822

References AuraEffectPeriodicFn, EFFECT_0, HandleEffectPeriodic(), AuraScript::OnEffectPeriodic, and SPELL_AURA_PERIODIC_DAMAGE.


The documentation for this class was generated from the following file: