186 uint32 countMax = snd->GetSpellInfo()->GetMaxDuration();
188 snd->GetBase()->SetDuration(countMax,
true);
189 snd->GetBase()->SetMaxDuration(snd->GetBase()->GetDuration());
268 for (
uint8 s = 0; s < 3; ++s)
310 static char constexpr const ScriptName[] =
"spell_rog_killing_spree";
320 if (targets.empty() ||
GetCaster()->GetVehicleBase())
449template <u
int32 RemoveSpellId>
464 visualAura->SetDuration(duration);
465 visualAura->SetMaxDuration(duration);
588 static char constexpr const ScriptName[] =
"spell_rog_rupture";
607 canBeRecalculated =
false;
609 float const attackpowerPerCombo[6] =
619 uint8 cp = caster->ToPlayer()->GetComboPoints();
623 amount +=
int32(caster->GetTotalAttackPowerValue(
BASE_ATTACK) * attackpowerPerCombo[cp]);
693 if (!ruptureAuraScript)
699 uint32 countMin = aurEff->GetBase()->GetMaxDuration();
700 uint32 countMax = countMin - bonusDuration;
705 if (countMin < countMax)
707 bonusDuration += 2000;
709 aurEff->GetBase()->SetDuration(aurEff->GetBase()->GetDuration() + 2000);
710 aurEff->GetBase()->SetMaxDuration(countMin + 2000);
736 if (eventInfo.
GetActor() == target->GetSelectedUnit())
832 script->SetRedirectTarget(explTarget->GetGUID());
920 targets.push_back(target);
@ ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
#define TC_LOG_ERROR(filterType__,...)
std::list< ObjectGuid > GuidList
@ EQUIPMENT_SLOT_MAINHAND
#define INVENTORY_SLOT_BAG_0
bool roll_chance_i(int chance)
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
#define RegisterSpellScript(spell_script)
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_UNIT_CASTER_AREA_PARTY
@ TARGET_UNIT_DEST_AREA_ENEMY
@ SPELL_FAILED_OUT_OF_RANGE
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAPPLY
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_MELEE_HASTE
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT
@ SPELLFAMILYFLAG_ROGUE_KICK
@ SPELLFAMILYFLAG1_ROGUE_DISMANTLE
@ SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP
@ SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY
@ SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY
#define BeforeSpellHitFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAmountFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
T CalculatePct(T base, U pct)
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
HookList< CheckProcHandler > DoCheckProc
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
int32 GetDuration() const
uint32 GetEnchantmentId(EnchantmentSlot slot) const
static ObjectGuid const Empty
std::string ToString() const
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
Item * GetItemByPos(uint16 pos) const
Unit * GetActionTarget() const
SpellInfo const * GetSpellInfo() const
DamageInfo * GetDamageInfo() const
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
void ResetCooldown(uint32 spellId, bool update=false)
void AddCooldown(uint32 spellId, uint32 itemId, std::chrono::duration< Type, Period > cooldownDuration)
bool HasCooldown(SpellInfo const *spellInfo, uint32 itemId=0, bool ignoreCategoryCooldown=false) const
void ResetCooldowns(Predicate predicate, bool update=false)
SpellSchoolMask GetSchoolMask() const
int32 CalcPowerCost(WorldObject const *caster, SpellSchoolMask schoolMask, Spell *spell=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
HookList< HitHandler > AfterHit
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Item * GetCastItem() const
Aura * GetHitAura(bool dynObjAura=false) const
HookList< BeforeHitHandler > BeforeHit
Unit * GetExplTargetUnit() const
void FinishCast(SpellCastResult result, uint32 *param1=nullptr, uint32 *param2=nullptr)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetOriginalCaster() const
void UnregisterRedirectThreat(uint32 spellId)
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
float GetHealthPct() const
ThreatManager & GetThreatManager()
Unit * SelectNearbyTarget(Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
uint32 CountPctFromMaxHealth(int32 pct) const
SpellHistory * GetSpellHistory()
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
std::string const & GetName() const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareAuraScript(spell_rog_blade_flurry)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_rog_cheat_death_cooldown)
void HandleDummy(SpellEffIndex)
PrepareAuraScript(spell_rog_cheat_death)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
bool Validate(SpellInfo const *) override
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
void HandleProc(AuraEffect const *, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_rog_cut_to_the_chase)
PrepareAuraScript(spell_rog_deadly_brew)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_rog_deadly_poison)
void HandleBeforeHit(SpellMissInfo missInfo)
PrepareSpellScript(spell_rog_glyph_of_backstab_triggered_SpellScript)
void HandleScript(SpellEffIndex effIndex)
spell_rog_rupture::spell_rog_rupture_AuraScript RuptureAuraScript
SpellScript * GetSpellScript() const override
spell_rog_glyph_of_backstab_triggered()
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_rog_glyph_of_backstab)
bool Validate(SpellInfo const *) override
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_rog_honor_among_thieves_proc_aura)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_rog_honor_among_thieves_proc)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
bool CheckProc(ProcEventInfo &)
bool Validate(SpellInfo const *spellInfo) override
PrepareAuraScript(spell_rog_honor_among_thieves)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_rog_hunger_for_blood)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_rog_killing_spree_AuraScript)
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void AddTarget(Unit *target)
void HandleEffectPeriodic(AuraEffect const *)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_rog_killing_spree_SpellScript)
spell_rog_killing_spree()
SpellScript * GetSpellScript() const override
static char constexpr const ScriptName[]
AuraScript * GetAuraScript() const override
spell_rog_nerves_of_steel()
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_rog_nerves_of_steel)
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_rog_overkill_mos)
void AfterApply(AuraEffect const *aurEff, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_rog_preparation)
void HandleEffectPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_rog_prey_on_the_weak)
PrepareAuraScript(spell_rog_quick_recovery)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_rog_rupture_AuraScript)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &canBeRecalculated)
void ResetDuration(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const override
static char constexpr const ScriptName[]
PrepareAuraScript(spell_rog_setup)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_rog_shiv)
PrepareAuraScript(spell_rog_tricks_of_the_trade_aura)
void SetRedirectTarget(ObjectGuid const &guid)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
ObjectGuid _redirectTarget
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
PrepareAuraScript(spell_rog_tricks_of_the_trade_proc)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_rog_tricks_of_the_trade)
PrepareAuraScript(spell_rog_turn_the_tables)
bool Validate(SpellInfo const *spellInfo) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_rog_vanish)
void ApplyStealth(AuraEffect const *, AuraEffectHandleModes)
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
void AddSC_rogue_spell_scripts()
@ SPELL_ROGUE_PREY_ON_THE_WEAK
@ SPELL_ROGUE_HUNGER_FOR_BLOOD
@ SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC
@ SPELL_ROGUE_T10_2P_BONUS
@ SPELL_ROGUE_HONOR_AMONG_THIEVES
@ SPELL_ROGUE_QUICK_RECOVERY_ENERGY
@ SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST
@ SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG
@ SPELL_ROGUE_CHEATING_DEATH
@ SPELL_ROGUE_MASTER_OF_SUBTLETY_BUFF
@ SPELL_ROGUE_CRIPPLING_POISON
@ SPELL_ROGUE_TRICKS_OF_THE_TRADE
@ SPELL_ROGUE_GLYPH_OF_PREPARATION
@ SPELL_ROGUE_CHEAT_DEATH_COOLDOWN
@ SPELL_ROGUE_KILLING_SPREE
@ SPELL_ROGUE_HONOR_AMONG_THIEVES_2
@ SPELL_ROGUE_OVERKILL_BUFF
@ SPELL_ROGUE_KILLING_SPREE_DMG_BUFF
@ SPELL_ROGUE_GLYPH_OF_BACKSTAB_TRIGGER
@ SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC
@ SPELL_ROGUE_SHIV_TRIGGERED
@ SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK
@ SPELL_ROGUE_KILLING_SPREE_TELEPORT
uint32 Effect[MAX_ITEM_ENCHANTMENT_EFFECTS]
uint32 EffectArg[MAX_ITEM_ENCHANTMENT_EFFECTS]