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
 
UnitGetCaster () const
 
WorldObjectGetOwner () const
 
UnitGetUnitOwner () const
 
DynamicObjectGetDynobjOwner () const
 
void Remove (uint32 removeMode=0)
 
AuraGetAura () 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
 
AuraEffectGetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
UnitGetTarget () 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 void Register ()=0
 
virtual bool Validate (SpellInfo 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< CheckAreaTargetHandlerDoCheckAreaTarget
 
HookList< AuraDispelHandlerOnDispel
 
HookList< AuraDispelHandlerAfterDispel
 
HookList< EffectApplyHandlerOnEffectApply
 
HookList< EffectApplyHandlerAfterEffectApply
 
HookList< EffectApplyHandlerOnEffectRemove
 
HookList< EffectApplyHandlerAfterEffectRemove
 
HookList< EffectPeriodicHandlerOnEffectPeriodic
 
HookList< EffectUpdatePeriodicHandlerOnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandlerDoEffectCalcAmount
 
HookList< EffectCalcPeriodicHandlerDoEffectCalcPeriodic
 
HookList< EffectCalcSpellModHandlerDoEffectCalcSpellMod
 
HookList< EffectAbsorbHandlerOnEffectAbsorb
 
HookList< EffectAbsorbHandlerAfterEffectAbsorb
 
HookList< EffectManaShieldHandlerOnEffectManaShield
 
HookList< EffectManaShieldHandlerAfterEffectManaShield
 
HookList< EffectSplitHandlerOnEffectSplit
 
HookList< CheckProcHandlerDoCheckProc
 
HookList< AfterCheckProcHandlerDoAfterCheckProc
 
HookList< AuraProcHandlerDoPrepareProc
 
HookList< AuraProcHandlerOnProc
 
HookList< AuraProcHandlerAfterProc
 
HookList< EffectProcHandlerOnEffectProc
 
HookList< EffectProcHandlerAfterEffectProc
 
virtual bool _Validate (SpellInfo const *entry)
 
- 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
338 {
339 _targets.push_back(target->GetGUID());
340 }
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
GuidList _targets
Definition: spell_rogue.cpp:350

References _targets, and Object::GetGUID().

◆ HandleApply()

void spell_rog_killing_spree_aura::HandleApply ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inlineprivate
299 {
301 }
@ SPELL_ROGUE_KILLING_SPREE_DMG_BUFF
Definition: spell_rogue.cpp:40
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:1168
Unit * GetTarget() const
Definition: SpellScript.cpp:1165

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
304 {
305 while (!_targets.empty())
306 {
308 if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid))
309 {
310 // xinef: target may be no longer valid
311 if (!GetTarget()->IsValidAttackTarget(target) || target->HasStealthAura() || target->HasInvisibilityAura())
312 {
313 _targets.remove(guid);
314 continue;
315 }
316
318
319 // xinef: ensure fast coordinates switch, dont wait for client to send opcode
320 WorldLocation const& dest = GetTarget()->ToPlayer()->GetTeleportDest();
321 GetTarget()->ToPlayer()->UpdatePosition(dest, true);
322
324 break;
325 }
326 else
327 _targets.remove(guid);
328 }
329 }
TriggerCastFlags
Definition: SpellDefines.h:130
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition: SpellDefines.h:148
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Disallows proc events from triggered spell (default)
Definition: SpellDefines.h:147
@ SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG
Definition: spell_rogue.cpp:39
@ SPELL_ROGUE_KILLING_SPREE_TELEPORT
Definition: spell_rogue.cpp:38
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:202
Player * ToPlayer()
Definition: Object.h:198
Definition: ObjectGuid.h:118
Definition: Position.h:251
WorldLocation & GetTeleportDest()
Definition: Player.h:2069
bool UpdatePosition(float x, float y, float z, float orientation, bool teleport=false) override
Definition: PlayerUpdates.cpp:1111
Definition: Unit.h:630
bool HasStealthAura() const
Definition: Unit.h:1103

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
332 {
334 }
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4891

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.

343 {
347 }
@ SPELL_AURA_PERIODIC_DUMMY
Definition: SpellAuraDefines.h:289
@ AURA_EFFECT_HANDLE_REAL
Definition: SpellAuraDefines.h:42
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:760
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:743
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:754
@ EFFECT_0
Definition: SharedDefines.h:31
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:753
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:759
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:742
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_rogue.cpp:331
void HandleEffectPeriodic(AuraEffect const *)
Definition: spell_rogue.cpp:303
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_rogue.cpp:298

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.

289 {
290 return ValidateSpellInfo(
291 {
295 });
296 }
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().