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

Private Member Functions

 PrepareSpellScript (spell_rog_killing_spree)
 
bool Validate (SpellInfo const *) override
 
SpellCastResult CheckCast ()
 
void FilterTargets (std::list< WorldObject * > &targets)
 
void HandleDummy (SpellEffIndex)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from SpellScript
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Spell *spell)
 
void _InitHit ()
 
bool _IsEffectPrevented (SpellEffIndex effIndex)
 
bool _IsDefaultEffectPrevented (SpellEffIndex effIndex)
 
void _PrepareScriptCall (SpellScriptHookType hookType)
 
void _FinishScriptCall ()
 
bool IsInCheckCastHook () const
 
bool IsInTargetHook () const
 
bool IsInHitPhase () const
 
bool IsInEffectHook () const
 
UnitGetCaster ()
 
UnitGetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObjectGetExplTargetWorldObject ()
 
UnitGetExplTargetUnit ()
 
GameObjectGetExplTargetGObj ()
 
ItemGetExplTargetItem ()
 
UnitGetHitUnit ()
 
CreatureGetHitCreature ()
 
PlayerGetHitPlayer ()
 
ItemGetHitItem ()
 
GameObjectGetHitGObj ()
 
WorldLocationGetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
SpellGetSpell ()
 
AuraGetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo const * GetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void Cancel ()
 
void SetCustomCastResultMessage (SpellCustomErrors result)
 
- 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 ()
 
- 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 SpellScript
HookList< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< BeforeHitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList< ObjectAreaTargetSelectHandlerOnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandlerOnObjectTargetSelect
 
HookList< DestinationTargetSelectHandlerOnDestinationTargetSelect
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ CheckCast()

SpellCastResult spell_rog_killing_spree::CheckCast ( )
inlineprivate
365 {
366 // Kologarn area, Killing Spree should not work
367 if (GetCaster()->GetMapId() == 603 /*Ulduar*/ && GetCaster()->GetDistance2d(1766.936f, -24.748f) < 50.0f)
369 return SPELL_CAST_OK;
370 }
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
Definition SharedDefines.h:1122
@ SPELL_CAST_OK
Definition SharedDefines.h:1138
Unit * GetCaster()
Definition SpellScript.cpp:401

References SpellScript::GetCaster(), SPELL_CAST_OK, and SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW.

Referenced by Register().

◆ FilterTargets()

void spell_rog_killing_spree::FilterTargets ( std::list< WorldObject * > &  targets)
inlineprivate
373 {
374 if (targets.empty() || GetCaster()->GetVehicleBase() || GetCaster()->HasUnitState(UNIT_STATE_ROOT))
376 else
377 {
378 // Added attribute not breaking stealth, removes auras here
381 }
382 }
@ SPELL_FAILED_OUT_OF_RANGE
Definition SharedDefines.h:1046
@ AURA_INTERRUPT_FLAG_SPELL_ATTACK
Definition SpellDefines.h:56
@ AURA_INTERRUPT_FLAG_CAST
Definition SpellDefines.h:45
@ UNIT_STATE_ROOT
Definition UnitDefines.h:180
void FinishCast(SpellCastResult result)
Definition SpellScript.cpp:635
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0, bool isAutoshot=false)
Definition Unit.cpp:5213

References AURA_INTERRUPT_FLAG_CAST, AURA_INTERRUPT_FLAG_SPELL_ATTACK, SpellScript::FinishCast(), SpellScript::GetCaster(), Unit::RemoveAurasWithInterruptFlags(), SPELL_FAILED_OUT_OF_RANGE, and UNIT_STATE_ROOT.

Referenced by Register().

◆ HandleDummy()

void spell_rog_killing_spree::HandleDummy ( SpellEffIndex  )
inlineprivate
385 {
386 if (Aura* aura = GetCaster()->GetAura(SPELL_ROGUE_KILLING_SPREE))
387 {
388 if (spell_rog_killing_spree_aura* script = dynamic_cast<spell_rog_killing_spree_aura_script*>(aura->GetScriptByName(KillingSpreeScriptName)))
389 script->AddTarget(GetHitUnit());
390 }
391 }
Definition SpellAuras.h:87
Unit * GetHitUnit()
Definition SpellScript.cpp:448
Definition spell_rogue.cpp:285
#define KillingSpreeScriptName
Definition spell_rogue.cpp:353
@ SPELL_ROGUE_KILLING_SPREE
Definition spell_rogue.cpp:37

References SpellScript::GetCaster(), SpellScript::GetHitUnit(), KillingSpreeScriptName, and SPELL_ROGUE_KILLING_SPREE.

Referenced by Register().

◆ PrepareSpellScript()

spell_rog_killing_spree::PrepareSpellScript ( spell_rog_killing_spree  )
private

◆ Register()

void spell_rog_killing_spree::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

394 {
398 }
@ EFFECT_1
Definition SharedDefines.h:32
@ SPELL_EFFECT_DUMMY
Definition SharedDefines.h:781
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition SharedDefines.h:1421
#define SpellCheckCastFn(F)
Definition SpellScript.h:329
#define SpellEffectFn(F, I, N)
Definition SpellScript.h:337
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition SpellScript.h:354
HookList< CheckCastHandler > OnCheckCast
Definition SpellScript.h:328
HookList< EffectHandler > OnEffectHitTarget
Definition SpellScript.h:336
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition SpellScript.h:353
void HandleDummy(SpellEffIndex)
Definition spell_rogue.cpp:384
SpellCastResult CheckCast()
Definition spell_rogue.cpp:364
void FilterTargets(std::list< WorldObject * > &targets)
Definition spell_rogue.cpp:372

References CheckCast(), EFFECT_1, FilterTargets(), HandleDummy(), SpellScript::OnCheckCast, SpellScript::OnEffectHitTarget, SpellScript::OnObjectAreaTargetSelect, SPELL_EFFECT_DUMMY, SpellCheckCastFn, SpellEffectFn, SpellObjectAreaTargetSelectFn, and TARGET_UNIT_DEST_AREA_ENEMY.

◆ Validate()

bool spell_rog_killing_spree::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

360 {
362 }
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition SpellScript.h:125

References SPELL_ROGUE_KILLING_SPREE, and _SpellScript::ValidateSpellInfo().


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