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

Public Member Functions

void AddTarget (Unit *target)
 
- 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_AuraScript)
 
bool Validate (SpellInfo const *) override
 
void HandleApply (AuraEffect const *, AuraEffectHandleModes)
 
void HandleEffectPeriodic (AuraEffect const *)
 
void HandleRemove (AuraEffect const *, AuraEffectHandleModes)
 
void Register () override
 

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::spell_rog_killing_spree_AuraScript::AddTarget ( Unit target)
inline
402 {
403 _targets.push_back(target->GetGUID());
404 }
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
GuidList _targets
Definition: spell_rogue.cpp:407

References _targets, and Object::GetGUID().

◆ HandleApply()

void spell_rog_killing_spree::spell_rog_killing_spree_AuraScript::HandleApply ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inlineprivate
356 {
358 }
@ 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:1169
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::spell_rog_killing_spree_AuraScript::HandleEffectPeriodic ( AuraEffect const *  )
inlineprivate
361 {
362 while (!_targets.empty())
363 {
365 if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid))
366 {
367 // xinef: target may be no longer valid
368 if (!GetTarget()->IsValidAttackTarget(target) || target->HasStealthAura() || target->HasInvisibilityAura())
369 {
370 _targets.remove(guid);
371 continue;
372 }
373
375
376 // xinef: ensure fast coordinates switch, dont wait for client to send opcode
377 WorldLocation const& dest = GetTarget()->ToPlayer()->GetTeleportDest();
378 GetTarget()->ToPlayer()->UpdatePosition(dest, true);
379
381 break;
382 }
383 else
384 _targets.remove(guid);
385 }
386 }
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:135
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:204
Player * ToPlayer()
Definition: Object.h:195
Definition: ObjectGuid.h:120
Definition: Position.h:251
WorldLocation & GetTeleportDest()
Definition: Player.h:2040
bool UpdatePosition(float x, float y, float z, float orientation, bool teleport=false) override
Definition: PlayerUpdates.cpp:1112
Definition: Unit.h:1290
bool HasStealthAura() const
Definition: Unit.h:1706

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::spell_rog_killing_spree_AuraScript::HandleRemove ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inlineprivate
389 {
391 }
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4835

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

Referenced by Register().

◆ PrepareAuraScript()

spell_rog_killing_spree::spell_rog_killing_spree_AuraScript::PrepareAuraScript ( spell_rog_killing_spree_AuraScript  )
private

◆ Register()

void spell_rog_killing_spree::spell_rog_killing_spree_AuraScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

394 {
398 }
@ 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:30
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:388
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_rogue.cpp:355
void HandleEffectPeriodic(AuraEffect const *)
Definition: spell_rogue.cpp:360

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::spell_rog_killing_spree_AuraScript::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

346 {
347 return ValidateSpellInfo(
348 {
352 });
353 }
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::spell_rog_killing_spree_AuraScript::_targets
private

Referenced by AddTarget(), and HandleEffectPeriodic().