Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -21,12 +21,17 @@
|
||||
* Scriptnames of files in this file should be prefixed with "spell_rog_".
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "Containers.h"
|
||||
#include "DBCStores.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "Containers.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum RogueSpells
|
||||
{
|
||||
@@ -70,18 +75,9 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_blade_flurry_AuraScript);
|
||||
|
||||
public:
|
||||
spell_rog_blade_flurry_AuraScript()
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
@@ -93,11 +89,7 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
TC_LOG_ERROR("misc", "damage: %u procSpell: %u",
|
||||
eventInfo.GetDamageInfo()->GetDamage(), eventInfo.GetDamageInfo()->GetSpellInfo() ? eventInfo.GetDamageInfo()->GetSpellInfo()->Id : 0);
|
||||
|
||||
GetTarget()->CastCustomSpell(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK, SPELLVALUE_BASE_POINT0, eventInfo.GetDamageInfo()->GetDamage(), _procTarget, true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK, SPELLVALUE_BASE_POINT0, eventInfo.GetDamageInfo()->GetDamage(), _procTarget, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -109,8 +101,7 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
OnEffectProc += AuraEffectProcFn(spell_rog_blade_flurry_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _procTarget;
|
||||
Unit* _procTarget = nullptr;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
@@ -129,20 +120,11 @@ class spell_rog_cheat_death : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_cheat_death_AuraScript);
|
||||
|
||||
public:
|
||||
spell_rog_cheat_death_AuraScript()
|
||||
{
|
||||
absorbChance = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbChance;
|
||||
uint32 absorbChance = 0;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_CHEAT_DEATH_COOLDOWN });
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
@@ -201,15 +183,13 @@ class spell_rog_crippling_poison : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_CRIPPLING_POISON))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_CRIPPLING_POISON });
|
||||
}
|
||||
|
||||
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_ROGUE_CRIPPLING_POISON, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_ROGUE_CRIPPLING_POISON, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -263,13 +243,6 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_rog_deadly_poison_SpellScript);
|
||||
|
||||
public:
|
||||
spell_rog_deadly_poison_SpellScript()
|
||||
{
|
||||
_stackAmount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
// at this point CastItem must already be initialized
|
||||
@@ -347,7 +320,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
AfterHit += SpellHitFn(spell_rog_deadly_poison_SpellScript::HandleAfterHit);
|
||||
}
|
||||
|
||||
uint8 _stackAmount;
|
||||
uint8 _stackAmount = 0;
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
@@ -357,11 +330,12 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
};
|
||||
|
||||
// 51690 - Killing Spree
|
||||
#define KillingSpreeScriptName "spell_rog_killing_spree"
|
||||
class spell_rog_killing_spree : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_rog_killing_spree() : SpellScriptLoader(KillingSpreeScriptName) { }
|
||||
static char constexpr const ScriptName[] = "spell_rog_killing_spree";
|
||||
|
||||
spell_rog_killing_spree() : SpellScriptLoader(ScriptName) { }
|
||||
|
||||
class spell_rog_killing_spree_SpellScript : public SpellScript
|
||||
{
|
||||
@@ -376,10 +350,8 @@ class spell_rog_killing_spree : public SpellScriptLoader
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Aura* aura = GetCaster()->GetAura(SPELL_ROGUE_KILLING_SPREE))
|
||||
{
|
||||
if (spell_rog_killing_spree_AuraScript* script = dynamic_cast<spell_rog_killing_spree_AuraScript*>(aura->GetScriptByName(KillingSpreeScriptName)))
|
||||
if (spell_rog_killing_spree_AuraScript* script = aura->GetScript<spell_rog_killing_spree_AuraScript>(ScriptName))
|
||||
script->AddTarget(GetHitUnit());
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -400,11 +372,12 @@ class spell_rog_killing_spree : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_KILLING_SPREE_TELEPORT)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_ROGUE_KILLING_SPREE_DMG_BUFF))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_ROGUE_KILLING_SPREE_TELEPORT,
|
||||
SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG,
|
||||
SPELL_ROGUE_KILLING_SPREE_DMG_BUFF
|
||||
});
|
||||
}
|
||||
|
||||
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -455,6 +428,7 @@ class spell_rog_killing_spree : public SpellScriptLoader
|
||||
return new spell_rog_killing_spree_AuraScript();
|
||||
}
|
||||
};
|
||||
char constexpr const spell_rog_killing_spree::ScriptName[];
|
||||
|
||||
// 31666 - Master of Subtlety
|
||||
class spell_rog_master_of_subtlety : public SpellScriptLoader
|
||||
@@ -468,9 +442,7 @@ class spell_rog_master_of_subtlety : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_MASTER_OF_SUBTLETY_DAMAGE_PERCENT))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_MASTER_OF_SUBTLETY_DAMAGE_PERCENT });
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
@@ -556,9 +528,7 @@ class spell_rog_overkill : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_OVERKILL_POWER_REGEN))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_OVERKILL_POWER_REGEN });
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
@@ -598,9 +568,7 @@ class spell_rog_preparation : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_GLYPH_OF_PREPARATION))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_GLYPH_OF_PREPARATION });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
@@ -644,9 +612,7 @@ class spell_rog_prey_on_the_weak : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_PREY_ON_THE_WEAK))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_PREY_ON_THE_WEAK });
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
@@ -727,11 +693,12 @@ class spell_rog_recuperate : public SpellScriptLoader
|
||||
};
|
||||
|
||||
// -1943 - Rupture
|
||||
#define RuptureScriptName "spell_rog_rupture"
|
||||
class spell_rog_rupture : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_rog_rupture() : SpellScriptLoader(RuptureScriptName) { }
|
||||
static char constexpr const ScriptName[] = "spell_rog_rupture";
|
||||
|
||||
spell_rog_rupture() : SpellScriptLoader(ScriptName) { }
|
||||
|
||||
class spell_rog_rupture_AuraScript : public AuraScript
|
||||
{
|
||||
@@ -789,6 +756,7 @@ class spell_rog_rupture : public SpellScriptLoader
|
||||
return new spell_rog_rupture_AuraScript();
|
||||
}
|
||||
};
|
||||
char constexpr const spell_rog_rupture::ScriptName[];
|
||||
|
||||
// 63975 - Glyph of Backstab (triggered - serverside)
|
||||
class spell_rog_glyph_of_backstab_triggered : public SpellScriptLoader
|
||||
@@ -810,7 +778,7 @@ class spell_rog_glyph_of_backstab_triggered : public SpellScriptLoader
|
||||
// search our Rupture aura on target
|
||||
if (AuraEffect* aurEff = GetHitUnit()->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, caster->GetGUID()))
|
||||
{
|
||||
RuptureAuraScript* ruptureAuraScript = dynamic_cast<RuptureAuraScript*>(aurEff->GetBase()->GetScriptByName(RuptureScriptName));
|
||||
RuptureAuraScript* ruptureAuraScript = aurEff->GetBase()->GetScript<RuptureAuraScript>(spell_rog_rupture::ScriptName);
|
||||
if (!ruptureAuraScript)
|
||||
return;
|
||||
|
||||
@@ -863,9 +831,7 @@ class spell_rog_shiv : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_SHIV_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_SHIV_TRIGGERED });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
@@ -899,14 +865,15 @@ class spell_rog_stealth : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_MASTER_OF_SUBTLETY_PASSIVE) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_ROGUE_MASTER_OF_SUBTLETY_DAMAGE_PERCENT) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_ROGUE_MASTER_OF_SUBTLETY_PERIODIC) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_ROGUE_OVERKILL_TALENT) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_ROGUE_OVERKILL_POWER_REGEN) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_ROGUE_OVERKILL_PERIODIC))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_ROGUE_MASTER_OF_SUBTLETY_PASSIVE,
|
||||
SPELL_ROGUE_MASTER_OF_SUBTLETY_DAMAGE_PERCENT,
|
||||
SPELL_ROGUE_MASTER_OF_SUBTLETY_PERIODIC,
|
||||
SPELL_ROGUE_OVERKILL_TALENT,
|
||||
SPELL_ROGUE_OVERKILL_POWER_REGEN,
|
||||
SPELL_ROGUE_OVERKILL_PERIODIC
|
||||
});
|
||||
}
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -917,7 +884,7 @@ class spell_rog_stealth : public SpellScriptLoader
|
||||
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_ROGUE_MASTER_OF_SUBTLETY_PASSIVE, EFFECT_0))
|
||||
{
|
||||
int32 basepoints0 = aurEff->GetAmount();
|
||||
target->CastCustomSpell(target, SPELL_ROGUE_MASTER_OF_SUBTLETY_DAMAGE_PERCENT, &basepoints0, NULL, NULL, true);
|
||||
target->CastCustomSpell(target, SPELL_ROGUE_MASTER_OF_SUBTLETY_DAMAGE_PERCENT, &basepoints0, nullptr, nullptr, true);
|
||||
}
|
||||
|
||||
// Overkill
|
||||
@@ -961,20 +928,9 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_tricks_of_the_trade_AuraScript);
|
||||
|
||||
public:
|
||||
spell_rog_tricks_of_the_trade_AuraScript()
|
||||
{
|
||||
_redirectTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST, SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC });
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -1006,8 +962,7 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
OnEffectProc += AuraEffectProcFn(spell_rog_tricks_of_the_trade_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _redirectTarget;
|
||||
Unit* _redirectTarget = nullptr;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
@@ -1089,9 +1044,7 @@ class spell_rog_honor_among_thieves : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
|
||||
Reference in new issue
Block a user