diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 1030 |
1 files changed, 424 insertions, 606 deletions
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 4350789d635..db839492c59 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -60,279 +60,224 @@ enum RogueSpells }; // 13877, 33735, (check 51211, 65956) - Blade Flurry -class spell_rog_blade_flurry : public SpellScriptLoader +class spell_rog_blade_flurry : public AuraScript { - public: - spell_rog_blade_flurry() : SpellScriptLoader("spell_rog_blade_flurry") { } - - class spell_rog_blade_flurry_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_blade_flurry_AuraScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK }); - } - - bool CheckProc(ProcEventInfo& eventInfo) - { - _procTarget = eventInfo.GetActor()->SelectNearbyTarget(eventInfo.GetProcTarget()); - return _procTarget != nullptr; - } - - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) - { - PreventDefaultAction(); - if (DamageInfo* damageInfo = eventInfo.GetDamageInfo()) - { - CastSpellExtraArgs args(aurEff); - args.AddSpellBP0(damageInfo->GetDamage()); - GetTarget()->CastSpell(_procTarget, SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK, args); - } - } + PrepareAuraScript(spell_rog_blade_flurry); - void Register() override - { - DoCheckProc += AuraCheckProcFn(spell_rog_blade_flurry_AuraScript::CheckProc); - OnEffectProc += AuraEffectProcFn(spell_rog_blade_flurry_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK }); + } - Unit* _procTarget = nullptr; - }; + bool CheckProc(ProcEventInfo& eventInfo) + { + _procTarget = eventInfo.GetActor()->SelectNearbyTarget(eventInfo.GetProcTarget()); + return _procTarget != nullptr; + } - AuraScript* GetAuraScript() const override + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + if (DamageInfo* damageInfo = eventInfo.GetDamageInfo()) { - return new spell_rog_blade_flurry_AuraScript(); + CastSpellExtraArgs args(aurEff); + args.AddSpellBP0(damageInfo->GetDamage()); + GetTarget()->CastSpell(_procTarget, SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK, args); } + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_rog_blade_flurry::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_rog_blade_flurry::HandleProc, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE); + } + + Unit* _procTarget = nullptr; }; // -31228 - Cheat Death -class spell_rog_cheat_death : public SpellScriptLoader +class spell_rog_cheat_death : public AuraScript { - public: - spell_rog_cheat_death() : SpellScriptLoader("spell_rog_cheat_death") { } - - class spell_rog_cheat_death_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_cheat_death_AuraScript); + PrepareAuraScript(spell_rog_cheat_death); - uint32 absorbChance = 0; + uint32 absorbChance = 0; - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_CHEAT_DEATH_COOLDOWN }); - } - - bool Load() override - { - absorbChance = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); - return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER; - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_CHEAT_DEATH_COOLDOWN }); + } - void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/) - { - // Set absorbtion amount to unlimited - amount = -1; - } + bool Load() override + { + absorbChance = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); + return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER; + } - void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) - { - Player* target = GetTarget()->ToPlayer(); - if (dmgInfo.GetDamage() < target->GetHealth() || target->GetSpellHistory()->HasCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN) || !roll_chance_i(absorbChance)) - return; + void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/) + { + // Set absorbtion amount to unlimited + amount = -1; + } - target->CastSpell(target, SPELL_ROGUE_CHEAT_DEATH_COOLDOWN, true); - target->GetSpellHistory()->AddCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN, 0, std::chrono::minutes(1)); + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + { + Player* target = GetTarget()->ToPlayer(); + if (dmgInfo.GetDamage() < target->GetHealth() || target->GetSpellHistory()->HasCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN) || !roll_chance_i(absorbChance)) + return; - uint32 health10 = target->CountPctFromMaxHealth(10); + target->CastSpell(target, SPELL_ROGUE_CHEAT_DEATH_COOLDOWN, true); + target->GetSpellHistory()->AddCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN, 0, std::chrono::minutes(1)); - // hp > 10% - absorb hp till 10% - if (target->GetHealth() > health10) - absorbAmount = dmgInfo.GetDamage() - target->GetHealth() + health10; - // hp lower than 10% - absorb everything - else - absorbAmount = dmgInfo.GetDamage(); - } + uint32 health10 = target->CountPctFromMaxHealth(10); - void Register() override - { - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_cheat_death_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB); - OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_cheat_death_AuraScript::Absorb, EFFECT_0); - } - }; + // hp > 10% - absorb hp till 10% + if (target->GetHealth() > health10) + absorbAmount = dmgInfo.GetDamage() - target->GetHealth() + health10; + // hp lower than 10% - absorb everything + else + absorbAmount = dmgInfo.GetDamage(); + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_cheat_death_AuraScript(); - } + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_cheat_death::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB); + OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_cheat_death::Absorb, EFFECT_0); + } }; // -51664 - Cut to the Chase -class spell_rog_cut_to_the_chase : public SpellScriptLoader +class spell_rog_cut_to_the_chase : public AuraScript { - public: - spell_rog_cut_to_the_chase() : SpellScriptLoader("spell_rog_cut_to_the_chase") { } - - class spell_rog_cut_to_the_chase_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_cut_to_the_chase_AuraScript); - - void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) - { - PreventDefaultAction(); + PrepareAuraScript(spell_rog_cut_to_the_chase); - // "refresh your Slice and Dice duration to its 5 combo point maximum" - Unit* caster = eventInfo.GetActor(); - // lookup Slice and Dice - if (AuraEffect const* snd = caster->GetAuraEffect(SPELL_AURA_MOD_MELEE_HASTE, SPELLFAMILY_ROGUE, 0x00040000, 0x00000000, 0x00000000, caster->GetGUID())) - { - // Max 5 cp duration - uint32 countMax = snd->GetSpellInfo()->GetMaxDuration(); - - snd->GetBase()->SetDuration(countMax, true); - snd->GetBase()->SetMaxDuration(snd->GetBase()->GetDuration()); - } - } - - void Register() override - { - OnEffectProc += AuraEffectProcFn(spell_rog_cut_to_the_chase_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); - } - }; + void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); - AuraScript* GetAuraScript() const override + // "refresh your Slice and Dice duration to its 5 combo point maximum" + Unit* caster = eventInfo.GetActor(); + // lookup Slice and Dice + if (AuraEffect const* snd = caster->GetAuraEffect(SPELL_AURA_MOD_MELEE_HASTE, SPELLFAMILY_ROGUE, 0x00040000, 0x00000000, 0x00000000, caster->GetGUID())) { - return new spell_rog_cut_to_the_chase_AuraScript(); + // Max 5 cp duration + uint32 countMax = snd->GetSpellInfo()->GetMaxDuration(); + + snd->GetBase()->SetDuration(countMax, true); + snd->GetBase()->SetMaxDuration(snd->GetBase()->GetDuration()); } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_rog_cut_to_the_chase::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } }; // -51625 - Deadly Brew -class spell_rog_deadly_brew : public SpellScriptLoader +class spell_rog_deadly_brew : public AuraScript { - public: - spell_rog_deadly_brew() : SpellScriptLoader("spell_rog_deadly_brew") { } - - class spell_rog_deadly_brew_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_deadly_brew_AuraScript); + PrepareAuraScript(spell_rog_deadly_brew); - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_CRIPPLING_POISON }); - } - - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) - { - PreventDefaultAction(); - eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_ROGUE_CRIPPLING_POISON, aurEff); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_CRIPPLING_POISON }); + } - void Register() override - { - OnEffectProc += AuraEffectProcFn(spell_rog_deadly_brew_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); - } - }; + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_ROGUE_CRIPPLING_POISON, aurEff); + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_deadly_brew_AuraScript(); - } + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_rog_deadly_brew::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } }; // -2818 - Deadly Poison -class spell_rog_deadly_poison : public SpellScriptLoader +class spell_rog_deadly_poison : public SpellScript { - public: - spell_rog_deadly_poison() : SpellScriptLoader("spell_rog_deadly_poison") { } + PrepareSpellScript(spell_rog_deadly_poison); - class spell_rog_deadly_poison_SpellScript : public SpellScript - { - PrepareSpellScript(spell_rog_deadly_poison_SpellScript); + bool Load() override + { + // at this point CastItem must already be initialized + return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem(); + } - bool Load() override - { - // at this point CastItem must already be initialized - return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem(); - } + void HandleBeforeHit(SpellMissInfo missInfo) + { + if (missInfo != SPELL_MISS_NONE) + return; - void HandleBeforeHit(SpellMissInfo missInfo) - { - if (missInfo != SPELL_MISS_NONE) - return; + if (Unit* target = GetHitUnit()) + // Deadly Poison + if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0x80000, 0, GetCaster()->GetGUID())) + _stackAmount = aurEff->GetBase()->GetStackAmount(); + } - if (Unit* target = GetHitUnit()) - // Deadly Poison - if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0x80000, 0, GetCaster()->GetGUID())) - _stackAmount = aurEff->GetBase()->GetStackAmount(); - } + void HandleAfterHit() + { + if (_stackAmount < 5) + return; - void HandleAfterHit() - { - if (_stackAmount < 5) - return; + Player* player = GetCaster()->ToPlayer(); - Player* player = GetCaster()->ToPlayer(); + if (Unit* target = GetHitUnit()) + { - if (Unit* target = GetHitUnit()) - { + Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); - Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); + if (item == GetCastItem()) + item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); - if (item == GetCastItem()) - item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + if (!item) + return; - if (!item) - return; + // item combat enchantments + for (uint8 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot) + { + SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(EnchantmentSlot(slot))); + if (!enchant) + continue; + + for (uint8 s = 0; s < 3; ++s) + { + if (enchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) + continue; - // item combat enchantments - for (uint8 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot) + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->EffectArg[s]); + if (!spellInfo) { - SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(EnchantmentSlot(slot))); - if (!enchant) - continue; - - for (uint8 s = 0; s < 3; ++s) - { - if (enchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) - continue; - - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->EffectArg[s]); - if (!spellInfo) - { - TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, %s) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUID().ToString().c_str(), enchant->EffectArg[s]); - continue; - } - - // Proc only rogue poisons - if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE || spellInfo->Dispel != DISPEL_POISON) - continue; - - // Do not reproc deadly - if (spellInfo->SpellFamilyFlags.IsEqual(0x10000, 0x80000, 0)) - continue; - - if (spellInfo->IsPositive()) - player->CastSpell(player, enchant->EffectArg[s], item); - else - player->CastSpell(target, enchant->EffectArg[s], item); - } + TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, %s) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUID().ToString().c_str(), enchant->EffectArg[s]); + continue; } - } - } - void Register() override - { - BeforeHit += BeforeSpellHitFn(spell_rog_deadly_poison_SpellScript::HandleBeforeHit); - AfterHit += SpellHitFn(spell_rog_deadly_poison_SpellScript::HandleAfterHit); - } + // Proc only rogue poisons + if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE || spellInfo->Dispel != DISPEL_POISON) + continue; - uint8 _stackAmount = 0; - }; + // Do not reproc deadly + if (spellInfo->SpellFamilyFlags.IsEqual(0x10000, 0x80000, 0)) + continue; - SpellScript* GetSpellScript() const override - { - return new spell_rog_deadly_poison_SpellScript(); + if (spellInfo->IsPositive()) + player->CastSpell(player, enchant->EffectArg[s], item); + else + player->CastSpell(target, enchant->EffectArg[s], item); + } + } } + } + + void Register() override + { + BeforeHit += BeforeSpellHitFn(spell_rog_deadly_poison::HandleBeforeHit); + AfterHit += SpellHitFn(spell_rog_deadly_poison::HandleAfterHit); + } + + uint8 _stackAmount = 0; }; // 51690 - Killing Spree @@ -437,225 +382,169 @@ class spell_rog_killing_spree : public SpellScriptLoader char constexpr const spell_rog_killing_spree::ScriptName[]; // -31130 - Nerves of Steel -class spell_rog_nerves_of_steel : public SpellScriptLoader +class spell_rog_nerves_of_steel : public AuraScript { - public: - spell_rog_nerves_of_steel() : SpellScriptLoader("spell_rog_nerves_of_steel") { } - - class spell_rog_nerves_of_steel_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_nerves_of_steel_AuraScript); + PrepareAuraScript(spell_rog_nerves_of_steel); - public: - spell_rog_nerves_of_steel_AuraScript() - { - absorbPct = 0; - } - - private: - uint32 absorbPct; +public: + spell_rog_nerves_of_steel() + { + absorbPct = 0; + } - bool Load() override - { - absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); - return true; - } +private: + uint32 absorbPct; - void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/) - { - // Set absorbtion amount to unlimited - amount = -1; - } + bool Load() override + { + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); + return true; + } - void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) - { - // reduces all damage taken while stun or fear - if (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_FLEEING) || (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN))) - absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct); - } + void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/) + { + // Set absorbtion amount to unlimited + amount = -1; + } - void Register() override - { - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_nerves_of_steel_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB); - OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_nerves_of_steel_AuraScript::Absorb, EFFECT_0); - } - }; + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + { + // reduces all damage taken while stun or fear + if (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_FLEEING) || (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN))) + absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct); + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_nerves_of_steel_AuraScript(); - } + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_nerves_of_steel::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB); + OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_nerves_of_steel::Absorb, EFFECT_0); + } }; // 31666 - Master of Subtlety // 58428 - Overkill - aura remove spell (SERVERSIDE) -template <uint32 RemoveSpell> -class spell_rog_overkill_mos : public SpellScriptLoader +template <uint32 RemoveSpellId> +class spell_rog_overkill_mos : public AuraScript { - public: - spell_rog_overkill_mos(char const* ScriptName) : SpellScriptLoader(ScriptName) { } - - template <uint32 RemoveSpellId> - class spell_rog_overkill_mos_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_overkill_mos_AuraScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ RemoveSpellId }); - } + PrepareAuraScript(spell_rog_overkill_mos); - void PeriodicTick(AuraEffect const* /*aurEff*/) - { - GetTarget()->RemoveAurasDueToSpell(RemoveSpellId); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ RemoveSpellId }); + } - void Register() override - { - OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_overkill_mos_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); - } - }; + void PeriodicTick(AuraEffect const* /*aurEff*/) + { + GetTarget()->RemoveAurasDueToSpell(RemoveSpellId); + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_overkill_mos_AuraScript<RemoveSpell>(); - } + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_overkill_mos::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } }; // 14185 - Preparation -class spell_rog_preparation : public SpellScriptLoader +class spell_rog_preparation : public SpellScript { - public: - spell_rog_preparation() : SpellScriptLoader("spell_rog_preparation") { } + PrepareSpellScript(spell_rog_preparation); - class spell_rog_preparation_SpellScript : public SpellScript - { - PrepareSpellScript(spell_rog_preparation_SpellScript); - - bool Load() override - { - return GetCaster()->GetTypeId() == TYPEID_PLAYER; - } + bool Load() override + { + return GetCaster()->GetTypeId() == TYPEID_PLAYER; + } - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_GLYPH_OF_PREPARATION }); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_GLYPH_OF_PREPARATION }); + } - void HandleDummy(SpellEffIndex /*effIndex*/) - { - Unit* caster = GetCaster(); - caster->GetSpellHistory()->ResetCooldowns([caster](SpellHistory::CooldownStorageType::iterator itr) -> bool - { - SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first); - if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE) - return false; - - return (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep - spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT) || // Vanish, Evasion, Sprint - (caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION) && - (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE || // Dismantle - spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_KICK || // Kick - (spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY && // Blade Flurry - spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY))); - }, true); - } + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + caster->GetSpellHistory()->ResetCooldowns([caster](SpellHistory::CooldownStorageType::iterator itr) -> bool + { + SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first); + if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE) + return false; - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_rog_preparation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - } - }; + return (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep + spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT) || // Vanish, Evasion, Sprint + (caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION) && + (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE || // Dismantle + spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_KICK || // Kick + (spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY && // Blade Flurry + spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY))); + }, true); + } - SpellScript* GetSpellScript() const override - { - return new spell_rog_preparation_SpellScript(); - } + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_rog_preparation::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } }; // -51685 - Prey on the Weak -class spell_rog_prey_on_the_weak : public SpellScriptLoader +class spell_rog_prey_on_the_weak : public AuraScript { - public: - spell_rog_prey_on_the_weak() : SpellScriptLoader("spell_rog_prey_on_the_weak") { } - - class spell_rog_prey_on_the_weak_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_prey_on_the_weak_AuraScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_PREY_ON_THE_WEAK }); - } + PrepareAuraScript(spell_rog_prey_on_the_weak); - void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) - { - Unit* target = GetTarget(); - Unit* victim = target->GetVictim(); - if (victim && (target->GetHealthPct() > victim->GetHealthPct())) - { - if (!target->HasAura(SPELL_ROGUE_PREY_ON_THE_WEAK)) - { - CastSpellExtraArgs args(TRIGGERED_FULL_MASK); - args.AddSpellBP0(GetSpellInfo()->Effects[EFFECT_0].CalcValue()); - target->CastSpell(target, SPELL_ROGUE_PREY_ON_THE_WEAK, args); - } - } - else - target->RemoveAurasDueToSpell(SPELL_ROGUE_PREY_ON_THE_WEAK); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_PREY_ON_THE_WEAK }); + } - void Register() override + void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) + { + Unit* target = GetTarget(); + Unit* victim = target->GetVictim(); + if (victim && (target->GetHealthPct() > victim->GetHealthPct())) + { + if (!target->HasAura(SPELL_ROGUE_PREY_ON_THE_WEAK)) { - OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_prey_on_the_weak_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + CastSpellExtraArgs args(TRIGGERED_FULL_MASK); + args.AddSpellBP0(GetSpellInfo()->Effects[EFFECT_0].CalcValue()); + target->CastSpell(target, SPELL_ROGUE_PREY_ON_THE_WEAK, args); } - }; - - AuraScript* GetAuraScript() const override - { - return new spell_rog_prey_on_the_weak_AuraScript(); } + else + target->RemoveAurasDueToSpell(SPELL_ROGUE_PREY_ON_THE_WEAK); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_prey_on_the_weak::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } }; // -31244 - Quick Recovery -class spell_rog_quick_recovery : public SpellScriptLoader +class spell_rog_quick_recovery : public AuraScript { - public: - spell_rog_quick_recovery() : SpellScriptLoader("spell_rog_quick_recovery") { } - - class spell_rog_quick_recovery_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_quick_recovery_AuraScript); + PrepareAuraScript(spell_rog_quick_recovery); - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_QUICK_RECOVERY_ENERGY }); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_QUICK_RECOVERY_ENERGY }); + } - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) - { - PreventDefaultAction(); - SpellInfo const* spellInfo = eventInfo.GetSpellInfo(); - if (!spellInfo) - return; - - Unit* caster = eventInfo.GetActor(); - int32 amount = CalculatePct(spellInfo->CalcPowerCost(caster, spellInfo->GetSchoolMask()), aurEff->GetAmount()); - CastSpellExtraArgs args(aurEff); - args.AddSpellBP0(amount); - caster->CastSpell(nullptr, SPELL_ROGUE_QUICK_RECOVERY_ENERGY, args); - } + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + SpellInfo const* spellInfo = eventInfo.GetSpellInfo(); + if (!spellInfo) + return; - void Register() override - { - OnEffectProc += AuraEffectProcFn(spell_rog_quick_recovery_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); - } - }; + Unit* caster = eventInfo.GetActor(); + int32 amount = CalculatePct(spellInfo->CalcPowerCost(caster, spellInfo->GetSchoolMask()), aurEff->GetAmount()); + CastSpellExtraArgs args(aurEff); + args.AddSpellBP0(amount); + caster->CastSpell(nullptr, SPELL_ROGUE_QUICK_RECOVERY_ENERGY, args); + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_quick_recovery_AuraScript(); - } + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_rog_quick_recovery::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } }; // -1943 - Rupture @@ -725,36 +614,25 @@ class spell_rog_rupture : public SpellScriptLoader char constexpr const spell_rog_rupture::ScriptName[]; // 56800 - Glyph of Backstab (dummy) -class spell_rog_glyph_of_backstab : public SpellScriptLoader +class spell_rog_glyph_of_backstab : public AuraScript { - public: - spell_rog_glyph_of_backstab() : SpellScriptLoader("spell_rog_glyph_of_backstab") { } - - class spell_rog_glyph_of_backstab_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_glyph_of_backstab_AuraScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_GLYPH_OF_BACKSTAB_TRIGGER }); - } + PrepareAuraScript(spell_rog_glyph_of_backstab); - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) - { - PreventDefaultAction(); - eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_ROGUE_GLYPH_OF_BACKSTAB_TRIGGER, aurEff); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_GLYPH_OF_BACKSTAB_TRIGGER }); + } - void Register() override - { - OnEffectProc += AuraEffectProcFn(spell_rog_glyph_of_backstab_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); - } - }; + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_ROGUE_GLYPH_OF_BACKSTAB_TRIGGER, aurEff); + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_glyph_of_backstab_AuraScript(); - } + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_rog_glyph_of_backstab::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } }; // 63975 - Glyph of Backstab (triggered - serverside) @@ -814,73 +692,51 @@ class spell_rog_glyph_of_backstab_triggered : public SpellScriptLoader }; // -13983 - Setup -class spell_rog_setup : public SpellScriptLoader +class spell_rog_setup : public AuraScript { - public: - spell_rog_setup() : SpellScriptLoader("spell_rog_setup") { } - - class spell_rog_setup_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_setup_AuraScript); - - bool CheckProc(ProcEventInfo& eventInfo) - { - if (Player* target = GetTarget()->ToPlayer()) - if (eventInfo.GetActor() == target->GetSelectedUnit()) - return true; + PrepareAuraScript(spell_rog_setup); - return false; - } + bool CheckProc(ProcEventInfo& eventInfo) + { + if (Player* target = GetTarget()->ToPlayer()) + if (eventInfo.GetActor() == target->GetSelectedUnit()) + return true; - void Register() override - { - DoCheckProc += AuraCheckProcFn(spell_rog_setup_AuraScript::CheckProc); - } - }; + return false; + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_setup_AuraScript(); - } + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_rog_setup::CheckProc); + } }; // 5938 - Shiv -class spell_rog_shiv : public SpellScriptLoader +class spell_rog_shiv : public SpellScript { - public: - spell_rog_shiv() : SpellScriptLoader("spell_rog_shiv") { } - - class spell_rog_shiv_SpellScript : public SpellScript - { - PrepareSpellScript(spell_rog_shiv_SpellScript); + PrepareSpellScript(spell_rog_shiv); - bool Load() override - { - return GetCaster()->GetTypeId() == TYPEID_PLAYER; - } - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_SHIV_TRIGGERED }); - } + bool Load() override + { + return GetCaster()->GetTypeId() == TYPEID_PLAYER; + } - void HandleDummy(SpellEffIndex /*effIndex*/) - { - Unit* caster = GetCaster(); - if (Unit* unitTarget = GetHitUnit()) - caster->CastSpell(unitTarget, SPELL_ROGUE_SHIV_TRIGGERED, true); - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_SHIV_TRIGGERED }); + } - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_rog_shiv_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - } - }; + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + if (Unit* unitTarget = GetHitUnit()) + caster->CastSpell(unitTarget, SPELL_ROGUE_SHIV_TRIGGERED, true); + } - SpellScript* GetSpellScript() const override - { - return new spell_rog_shiv_SpellScript(); - } + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_rog_shiv::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } }; // 57934 - Tricks of the Trade @@ -968,157 +824,119 @@ class spell_rog_tricks_of_the_trade_proc : public AuraScript }; // -51698, 51700, 51701 - Honor Among Thieves -class spell_rog_honor_among_thieves : public SpellScriptLoader +class spell_rog_honor_among_thieves : public AuraScript { -public: - spell_rog_honor_among_thieves() : SpellScriptLoader("spell_rog_honor_among_thieves") { } + PrepareAuraScript(spell_rog_honor_among_thieves); - class spell_rog_honor_among_thieves_AuraScript : public AuraScript + bool Validate(SpellInfo const* spellInfo) override { - PrepareAuraScript(spell_rog_honor_among_thieves_AuraScript); - - bool Validate(SpellInfo const* spellInfo) override - { - return ValidateSpellInfo( - { - SPELL_ROGUE_HONOR_AMONG_THIEVES_2, - spellInfo->Effects[EFFECT_0].TriggerSpell - }); - } - - bool CheckProc(ProcEventInfo& /*eventInfo*/) + return ValidateSpellInfo( { - Unit* caster = GetCaster(); - if (!caster || caster->HasAura(SPELL_ROGUE_HONOR_AMONG_THIEVES_2)) - return false; + SPELL_ROGUE_HONOR_AMONG_THIEVES_2, + spellInfo->Effects[EFFECT_0].TriggerSpell + }); + } - return true; - } + bool CheckProc(ProcEventInfo& /*eventInfo*/) + { + Unit* caster = GetCaster(); + if (!caster || caster->HasAura(SPELL_ROGUE_HONOR_AMONG_THIEVES_2)) + return false; - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) - { - PreventDefaultAction(); + return true; + } - Unit* caster = GetCaster(); - if (!caster) - return; + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); - Unit* target = GetTarget(); - target->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, { aurEff, caster->GetGUID() }); - } + Unit* caster = GetCaster(); + if (!caster) + return; - void Register() override - { - DoCheckProc += AuraCheckProcFn(spell_rog_honor_among_thieves_AuraScript::CheckProc); - OnEffectProc += AuraEffectProcFn(spell_rog_honor_among_thieves_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); - } - }; + Unit* target = GetTarget(); + target->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, { aurEff, caster->GetGUID() }); + } - AuraScript* GetAuraScript() const override + void Register() override { - return new spell_rog_honor_among_thieves_AuraScript(); + DoCheckProc += AuraCheckProcFn(spell_rog_honor_among_thieves::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_rog_honor_among_thieves::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); } }; // 52916 - Honor Among Thieves (Proc) -class spell_rog_honor_among_thieves_proc : public SpellScriptLoader +class spell_rog_honor_among_thieves_proc : public SpellScript { -public: - spell_rog_honor_among_thieves_proc() : SpellScriptLoader("spell_rog_honor_among_thieves_proc") { } + PrepareSpellScript(spell_rog_honor_among_thieves_proc); - class spell_rog_honor_among_thieves_proc_SpellScript : public SpellScript + bool Validate(SpellInfo const* /*spellInfo*/) override { - PrepareSpellScript(spell_rog_honor_among_thieves_proc_SpellScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC }); - } - - void FilterTargets(std::list<WorldObject*>& targets) - { - targets.clear(); - - Unit* target = GetOriginalCaster(); - if (!target) - return; + return ValidateSpellInfo({ SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC }); + } - targets.push_back(target); - } + void FilterTargets(std::list<WorldObject*>& targets) + { + targets.clear(); - void Register() override - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rog_honor_among_thieves_proc_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY); - } - }; + Unit* target = GetOriginalCaster(); + if (!target) + return; - SpellScript* GetSpellScript() const override - { - return new spell_rog_honor_among_thieves_proc_SpellScript(); + targets.push_back(target); } - class spell_rog_honor_among_thieves_proc_AuraScript : public AuraScript + void Register() override { - PrepareAuraScript(spell_rog_honor_among_thieves_proc_AuraScript); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rog_honor_among_thieves_proc::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY); + } +}; - void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - Unit* caster = GetCaster(); - if (!caster) - return; +class spell_rog_honor_among_thieves_proc_aura : public AuraScript +{ + PrepareAuraScript(spell_rog_honor_among_thieves_proc_aura); - if (Player* player = caster->ToPlayer()) - player->CastSpell(nullptr, SPELL_ROGUE_HONOR_AMONG_THIEVES_2, true); - } + void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* caster = GetCaster(); + if (!caster) + return; - void Register() override - { - AfterEffectApply += AuraEffectApplyFn(spell_rog_honor_among_thieves_proc_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); - } - }; + if (Player* player = caster->ToPlayer()) + player->CastSpell(nullptr, SPELL_ROGUE_HONOR_AMONG_THIEVES_2, true); + } - AuraScript* GetAuraScript() const override + void Register() override { - return new spell_rog_honor_among_thieves_proc_AuraScript(); + AfterEffectApply += AuraEffectApplyFn(spell_rog_honor_among_thieves_proc_aura::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); } }; // -51627 - Turn the Tables -class spell_rog_turn_the_tables : public SpellScriptLoader +class spell_rog_turn_the_tables : public AuraScript { - public: - spell_rog_turn_the_tables() : SpellScriptLoader("spell_rog_turn_the_tables") { } - - class spell_rog_turn_the_tables_AuraScript : public AuraScript - { - PrepareAuraScript(spell_rog_turn_the_tables_AuraScript); - - bool Validate(SpellInfo const* spellInfo) override - { - return ValidateSpellInfo({ spellInfo->Effects[EFFECT_0].TriggerSpell }); - } + PrepareAuraScript(spell_rog_turn_the_tables); - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) - { - PreventDefaultAction(); + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ spellInfo->Effects[EFFECT_0].TriggerSpell }); + } - Unit* caster = GetCaster(); - if (!caster) - return; + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); - caster->CastSpell(nullptr, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, aurEff); - } + Unit* caster = GetCaster(); + if (!caster) + return; - void Register() override - { - OnEffectProc += AuraEffectProcFn(spell_rog_turn_the_tables_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); - } - }; + caster->CastSpell(nullptr, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, aurEff); + } - AuraScript* GetAuraScript() const override - { - return new spell_rog_turn_the_tables_AuraScript(); - } + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_rog_turn_the_tables::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } }; // -11327 - Vanish @@ -1155,27 +973,27 @@ class spell_rog_vanish : public AuraScript void AddSC_rogue_spell_scripts() { - new spell_rog_blade_flurry(); - new spell_rog_cheat_death(); - new spell_rog_cut_to_the_chase(); - new spell_rog_deadly_brew(); - new spell_rog_deadly_poison(); + RegisterSpellScript(spell_rog_blade_flurry); + RegisterSpellScript(spell_rog_cheat_death); + RegisterSpellScript(spell_rog_cut_to_the_chase); + RegisterSpellScript(spell_rog_deadly_brew); + RegisterSpellScript(spell_rog_deadly_poison); new spell_rog_killing_spree(); - new spell_rog_nerves_of_steel(); - new spell_rog_overkill_mos<SPELL_ROGUE_OVERKILL_BUFF>("spell_rog_overkill"); - new spell_rog_overkill_mos<SPELL_ROGUE_MASTER_OF_SUBTLETY_BUFF>("spell_rog_master_of_subtlety"); - new spell_rog_preparation(); - new spell_rog_prey_on_the_weak(); - new spell_rog_quick_recovery(); + RegisterSpellScript(spell_rog_nerves_of_steel); + RegisterSpellScriptWithArgs(spell_rog_overkill_mos<SPELL_ROGUE_OVERKILL_BUFF>, "spell_rog_overkill"); + RegisterSpellScriptWithArgs(spell_rog_overkill_mos<SPELL_ROGUE_MASTER_OF_SUBTLETY_BUFF>, "spell_rog_master_of_subtlety"); + RegisterSpellScript(spell_rog_preparation); + RegisterSpellScript(spell_rog_prey_on_the_weak); + RegisterSpellScript(spell_rog_quick_recovery); new spell_rog_rupture(); - new spell_rog_glyph_of_backstab(); + RegisterSpellScript(spell_rog_glyph_of_backstab); new spell_rog_glyph_of_backstab_triggered(); - new spell_rog_setup(); - new spell_rog_shiv(); + RegisterSpellScript(spell_rog_setup); + RegisterSpellScript(spell_rog_shiv); RegisterSpellAndAuraScriptPair(spell_rog_tricks_of_the_trade, spell_rog_tricks_of_the_trade_aura); RegisterSpellScript(spell_rog_tricks_of_the_trade_proc); - new spell_rog_honor_among_thieves(); - new spell_rog_honor_among_thieves_proc(); - new spell_rog_turn_the_tables(); + RegisterSpellScript(spell_rog_honor_among_thieves); + RegisterSpellAndAuraScriptPair(spell_rog_honor_among_thieves_proc, spell_rog_honor_among_thieves_proc_aura); + RegisterSpellScript(spell_rog_turn_the_tables); RegisterSpellScript(spell_rog_vanish); } |