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

Public Member Functions

void AddTarget (Unit *target)
 
void Register () override
 
- 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
 
GameObject * GetGObjCaster () 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 Load ()
 
virtual void Unload ()
 

Private Member Functions

 PrepareAuraScript (spell_rog_killing_spree_aura)
 
bool Validate (SpellInfo const *) override
 
void HandleApply (AuraEffect const *, AuraEffectHandleModes)
 
void HandleEffectPeriodic (AuraEffect const *)
 
void HandleRemove (AuraEffect const *, AuraEffectHandleModes)
 

Private Attributes

GuidList _targets
 

Additional Inherited Members

- 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< 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

◆ AddTarget()

void spell_rog_killing_spree_aura::AddTarget ( Unit *  target)
inline
360 {
361 _targets.push_back(target->GetGUID());
362 }
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:120
GuidList _targets
Definition spell_rogue.cpp:372

References _targets, and Object::GetGUID().

◆ HandleApply()

void spell_rog_killing_spree_aura::HandleApply ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inlineprivate
321 {
323 }
Unit * GetTarget() const
Definition SpellScript.cpp:1178
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1378
@ SPELL_ROGUE_KILLING_SPREE_DMG_BUFF
Definition spell_rogue.cpp:41

References Unit::CastSpell(), AuraScript::GetTarget(), and SPELL_ROGUE_KILLING_SPREE_DMG_BUFF.

Referenced by Register().

◆ HandleEffectPeriodic()

void spell_rog_killing_spree_aura::HandleEffectPeriodic ( AuraEffect const *  )
inlineprivate
326 {
327 while (!_targets.empty())
328 {
330 if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid))
331 {
332 // xinef: target may be no longer valid
333 if (!GetTarget()->IsValidAttackTarget(target) || target->HasStealthAura() || target->HasInvisibilityAura())
334 {
335 _targets.remove(guid);
336 continue;
337 }
338
340
341 // xinef: ensure fast coordinates switch, dont wait for client to send opcode
342 WorldLocation const& dest = GetTarget()->ToPlayer()->GetTeleportDest();
343 GetTarget()->ToPlayer()->UpdatePosition(dest, true);
344
346 break;
347 }
348 else
349 _targets.remove(guid);
350 }
351 }
TriggerCastFlags
Definition SpellDefines.h:140
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition SpellDefines.h:158
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Disallows proc events from triggered spell (default)
Definition SpellDefines.h:157
Definition ObjectGuid.h:121
Player * ToPlayer()
Definition Object.h:208
WorldLocation & GetTeleportDest()
Definition Player.h:2121
bool UpdatePosition(float x, float y, float z, float orientation, bool teleport=false) override
Definition PlayerUpdates.cpp:1179
Definition Unit.h:670
bool HasStealthAura() const
Definition Unit.h:1860
Definition Position.h:256
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:133
Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:223
@ SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG
Definition spell_rogue.cpp:40
@ SPELL_ROGUE_KILLING_SPREE_TELEPORT
Definition spell_rogue.cpp:39

References _targets, Unit::CastSpell(), AuraScript::GetTarget(), Player::GetTeleportDest(), ObjectAccessor::GetUnit(), Unit::HasStealthAura(), Acore::Containers::SelectRandomContainerElement(), SPELL_ROGUE_KILLING_SPREE_TELEPORT, SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG, Object::ToPlayer(), TRIGGERED_DONT_REPORT_CAST_ERROR, TRIGGERED_FULL_MASK, and Player::UpdatePosition().

Referenced by Register().

◆ HandleRemove()

void spell_rog_killing_spree_aura::HandleRemove ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inlineprivate
354 {
356 }
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4969

References AuraScript::GetTarget(), Unit::RemoveAurasDueToSpell(), and SPELL_ROGUE_KILLING_SPREE_DMG_BUFF.

Referenced by Register().

◆ PrepareAuraScript()

spell_rog_killing_spree_aura::PrepareAuraScript ( spell_rog_killing_spree_aura  )
private

◆ Register()

void spell_rog_killing_spree_aura::Register ( )
inlineoverridevirtual

Implements _SpellScript.

365 {
369 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELL_AURA_PERIODIC_DUMMY
Definition SpellAuraDefines.h:289
@ AURA_EFFECT_HANDLE_REAL
Definition SpellAuraDefines.h:42
#define AuraEffectPeriodicFn(F, I, N)
Definition SpellScript.h:761
#define AuraEffectApplyFn(F, I, N, M)
Definition SpellScript.h:744
#define AuraEffectRemoveFn(F, I, N, M)
Definition SpellScript.h:755
HookList< EffectApplyHandler > AfterEffectRemove
Definition SpellScript.h:754
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition SpellScript.h:760
HookList< EffectApplyHandler > AfterEffectApply
Definition SpellScript.h:743
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
Definition spell_rogue.cpp:353
void HandleEffectPeriodic(AuraEffect const *)
Definition spell_rogue.cpp:325
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
Definition spell_rogue.cpp:320

References AuraScript::AfterEffectApply, AuraScript::AfterEffectRemove, AURA_EFFECT_HANDLE_REAL, AuraEffectApplyFn, AuraEffectPeriodicFn, AuraEffectRemoveFn, EFFECT_0, HandleApply(), HandleEffectPeriodic(), HandleRemove(), AuraScript::OnEffectPeriodic, and SPELL_AURA_PERIODIC_DUMMY.

◆ Validate()

bool spell_rog_killing_spree_aura::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

311 {
312 return ValidateSpellInfo(
313 {
317 });
318 }
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition SpellScript.h:125

References SPELL_ROGUE_KILLING_SPREE_DMG_BUFF, SPELL_ROGUE_KILLING_SPREE_TELEPORT, SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG, and _SpellScript::ValidateSpellInfo().

Member Data Documentation

◆ _targets

GuidList spell_rog_killing_spree_aura::_targets
private

Referenced by AddTarget(), and HandleEffectPeriodic().


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