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
 
Unit * GetCaster ()
 
GameObject * GetGObjCaster ()
 
Unit * GetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObject * GetExplTargetWorldObject ()
 
Unit * GetExplTargetUnit ()
 
GameObject * GetExplTargetGObj ()
 
Item * GetExplTargetItem ()
 
Unit * GetHitUnit ()
 
Creature * GetHitCreature ()
 
Player * GetHitPlayer ()
 
Item * GetHitItem ()
 
GameObject * GetHitGObj ()
 
WorldLocation * GetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
Spell * GetSpell ()
 
Aura * GetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
Item * GetCastItem ()
 
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< CastHandler > BeforeCast
 
HookList< CastHandler > OnCast
 
HookList< CastHandler > AfterCast
 
HookList< CheckCastHandler > OnCheckCast
 
HookList< EffectHandler > OnEffectLaunch
 
HookList< EffectHandler > OnEffectLaunchTarget
 
HookList< EffectHandler > OnEffectHit
 
HookList< EffectHandler > OnEffectHitTarget
 
HookList< BeforeHitHandler > BeforeHit
 
HookList< HitHandler > OnHit
 
HookList< HitHandler > AfterHit
 
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
 
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
 
- 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
386 {
387 // Kologarn area, Killing Spree should not work
388 if (GetCaster()->GetMapId() == MAP_ULDUAR && GetCaster()->GetDistance2d(1766.936f, -24.748f) < 50.0f)
390 return SPELL_CAST_OK;
391 }
@ MAP_ULDUAR
Definition AreaDefines.h:258
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
Definition SharedDefines.h:1110
@ SPELL_CAST_OK
Definition SharedDefines.h:1126
Unit * GetCaster()
Definition SpellScript.cpp:401

References SpellScript::GetCaster(), MAP_ULDUAR, 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
394 {
395 if (targets.empty() || GetCaster()->GetVehicleBase() || GetCaster()->HasUnitState(UNIT_STATE_ROOT))
397 else
398 {
399 // Added attribute not breaking stealth, removes auras here
402 }
403 }
@ SPELL_FAILED_OUT_OF_RANGE
Definition SharedDefines.h:1034
@ AURA_INTERRUPT_FLAG_SPELL_ATTACK
Definition SpellDefines.h:64
@ AURA_INTERRUPT_FLAG_CAST
Definition SpellDefines.h:53
@ UNIT_STATE_ROOT
Definition UnitDefines.h:183
void FinishCast(SpellCastResult result)
Definition SpellScript.cpp:640
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0, bool isAutoshot=false)
Definition Unit.cpp:5215

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
406 {
407 if (Aura* aura = GetCaster()->GetAura(SPELL_ROGUE_KILLING_SPREE))
408 {
409 if (spell_rog_killing_spree_aura* script = dynamic_cast<spell_rog_killing_spree_aura_script*>(aura->GetScriptByName(KillingSpreeScriptName)))
410 script->AddTarget(GetHitUnit());
411 }
412 }
Definition SpellAuras.h:88
Unit * GetHitUnit()
Definition SpellScript.cpp:453
Definition spell_rogue.cpp:306
#define KillingSpreeScriptName
Definition spell_rogue.cpp:374
@ SPELL_ROGUE_KILLING_SPREE
Definition spell_rogue.cpp:38

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.

415 {
419 }
@ EFFECT_1
Definition SharedDefines.h:32
@ SPELL_EFFECT_DUMMY
Definition SharedDefines.h:769
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition SharedDefines.h:1425
#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:405
SpellCastResult CheckCast()
Definition spell_rogue.cpp:385
void FilterTargets(std::list< WorldObject * > &targets)
Definition spell_rogue.cpp:393

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.

381 {
383 }
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: