fix: Qaston revert (#13320)
* Revert "fix(Core/QAston): fixed shields oneshotting (#13271)" This reverts commite05f61d1b3. * Revert "fix(Core): Crash (#13292)" This reverts commita818bcf3e2. * Revert "fix: Crash (#13241)" This reverts commitbe423a91b5. * delete sql * Revert "refactor(Core/Spells): Implement QAston Proc System (#11079)" This reverts commitcbd3fd0967. * add sql revert * fix sql * remove update from world.updates
This commit is contained in:
parent
e189caeb76
commit
ad4ce0895f
55 changed files with 8995 additions and 9257 deletions
|
|
@ -35,7 +35,6 @@ enum WarriorSpells
|
|||
SPELL_WARRIOR_IMPROVED_SPELL_REFLECTION_TRIGGER = 59725,
|
||||
SPELL_WARRIOR_BLOODTHIRST = 23885,
|
||||
SPELL_WARRIOR_BLOODTHIRST_DAMAGE = 23881,
|
||||
SPELL_WARRIOR_BLOODSURGE_R1 = 29723,
|
||||
SPELL_WARRIOR_CHARGE = 34846,
|
||||
SPELL_WARRIOR_DAMAGE_SHIELD_DAMAGE = 59653,
|
||||
SPELL_WARRIOR_DEEP_WOUNDS_RANK_1 = 12162,
|
||||
|
|
@ -43,8 +42,6 @@ enum WarriorSpells
|
|||
SPELL_WARRIOR_DEEP_WOUNDS_RANK_3 = 12868,
|
||||
SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC = 12721,
|
||||
SPELL_WARRIOR_EXECUTE = 20647,
|
||||
SPELL_WARRIOR_EXECUTE_GCD_REDUCED = 71069,
|
||||
SPELL_WARRIOR_EXTRA_CHARGE = 70849,
|
||||
SPELL_WARRIOR_GLYPH_OF_EXECUTION = 58367,
|
||||
SPELL_WARRIOR_GLYPH_OF_VIGILANCE = 63326,
|
||||
SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_BUFF = 65156,
|
||||
|
|
@ -52,8 +49,6 @@ enum WarriorSpells
|
|||
SPELL_WARRIOR_LAST_STAND_TRIGGERED = 12976,
|
||||
SPELL_WARRIOR_RETALIATION_DAMAGE = 22858,
|
||||
SPELL_WARRIOR_SLAM = 50783,
|
||||
SPELL_WARRIOR_SLAM_GCD_REDUCED = 71072,
|
||||
SPELL_WARRIOR_SUDDEN_DEATH_R1 = 46913,
|
||||
SPELL_WARRIOR_SUNDER_ARMOR = 58567,
|
||||
SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_1 = 12723,
|
||||
SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_2 = 26654,
|
||||
|
|
@ -64,11 +59,6 @@ enum WarriorSpells
|
|||
SPELL_WARRIOR_UNRELENTING_ASSAULT_TRIGGER_2 = 64850,
|
||||
SPELL_WARRIOR_VIGILANCE_PROC = 50725,
|
||||
SPELL_WARRIOR_VIGILANCE_REDIRECT_THREAT = 59665,
|
||||
SPELL_WARRIOR_SECOND_WIND_TRIGGER_1 = 29841,
|
||||
SPELL_WARRIOR_SECOND_WIND_TRIGGER_2 = 29842,
|
||||
SPELL_WARRIOR_GLYPH_OF_BLOCKING = 58374,
|
||||
SPELL_WARRIOR_STOICISM = 70845,
|
||||
SPELL_WARRIOR_T10_MELEE_4P_BONUS = 70847,
|
||||
SPELL_WARRIOR_WHIRLWIND_OFF = 44949
|
||||
};
|
||||
|
||||
|
|
@ -83,7 +73,6 @@ enum MiscSpells
|
|||
SPELL_PALADIN_GREATER_BLESSING_OF_SANCTUARY = 25899,
|
||||
SPELL_PRIEST_RENEWED_HOPE = 63944,
|
||||
SPELL_GEN_DAMAGE_REDUCTION_AURA = 68066,
|
||||
SPELL_CATEGORY_SHIELD_SLAM = 1209
|
||||
};
|
||||
|
||||
class spell_warr_mocking_blow : public SpellScript
|
||||
|
|
@ -173,7 +162,7 @@ class spell_warr_improved_spell_reflection : public AuraScript
|
|||
CustomSpellValues values;
|
||||
values.AddSpellMod(SPELLVALUE_MAX_TARGETS, aurEff->GetAmount());
|
||||
values.AddSpellMod(SPELLVALUE_RADIUS_MOD, 2000); // Base range = 100, final range = 20 value / 10000.0f = 0.2f
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_WARRIOR_IMPROVED_SPELL_REFLECTION_TRIGGER, values, eventInfo.GetActor(), TRIGGERED_FULL_MASK, nullptr, aurEff);
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_WARRIOR_IMPROVED_SPELL_REFLECTION_TRIGGER, values, eventInfo.GetActor(), TRIGGERED_FULL_MASK, nullptr);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
|
@ -235,31 +224,6 @@ class spell_warr_improved_spell_reflection_trigger_aura : public AuraScript
|
|||
}
|
||||
};
|
||||
|
||||
// 70844 - Item - Warrior T10 Protection 4P Bonus
|
||||
class spell_warr_item_t10_prot_4p_bonus : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_item_t10_prot_4p_bonus);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WARRIOR_STOICISM });
|
||||
}
|
||||
|
||||
void HandleProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
int32 bp0 = CalculatePct(target->GetMaxHealth(), GetSpellInfo()->Effects[EFFECT_1].CalcValue());
|
||||
target->CastCustomSpell(SPELL_WARRIOR_STOICISM, SPELLVALUE_BASE_POINT0, bp0, (Unit*)nullptr, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnProc += AuraProcFn(spell_warr_item_t10_prot_4p_bonus::HandleProc);
|
||||
}
|
||||
};
|
||||
|
||||
// 12975 - Last Stand
|
||||
class spell_warr_last_stand : public SpellScript
|
||||
{
|
||||
|
|
@ -290,13 +254,7 @@ class spell_warr_deep_wounds : public SpellScript
|
|||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_WARRIOR_DEEP_WOUNDS_RANK_1,
|
||||
SPELL_WARRIOR_DEEP_WOUNDS_RANK_2,
|
||||
SPELL_WARRIOR_DEEP_WOUNDS_RANK_3,
|
||||
SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC
|
||||
});
|
||||
return ValidateSpellInfo({ SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
|
|
@ -311,7 +269,7 @@ class spell_warr_deep_wounds : public SpellScript
|
|||
ApplyPct(damage, 16.0f * GetSpellInfo()->GetRank() / 6.0f);
|
||||
target->CastDelayedSpellWithPeriodicAmount(caster, SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC, SPELL_AURA_PERIODIC_DAMAGE, damage, EFFECT_0);
|
||||
|
||||
caster->CastCustomSpell(target, SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC, &damage, nullptr, nullptr, true);
|
||||
//caster->CastCustomSpell(target, SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC, &damage, nullptr, nullptr, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -415,47 +373,6 @@ class spell_warr_damage_shield : public AuraScript
|
|||
}
|
||||
};
|
||||
|
||||
// -12834 - Deep Wounds Aura
|
||||
class spell_warr_deep_wounds_aura : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_deep_wounds_aura);
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
if (!damageInfo)
|
||||
return false;
|
||||
|
||||
return eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* actor = eventInfo.GetActor();
|
||||
float damage = 0.f;
|
||||
|
||||
if (eventInfo.GetDamageInfo()->GetAttackType() == OFF_ATTACK)
|
||||
damage = (actor->GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE) + actor->GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)) / 2.f;
|
||||
else
|
||||
damage = (actor->GetFloatValue(UNIT_FIELD_MINDAMAGE) + actor->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2.f;
|
||||
|
||||
actor->CastCustomSpell(GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, SPELLVALUE_BASE_POINT0, int32(damage), eventInfo.GetProcTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_warr_deep_wounds_aura::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_warr_deep_wounds_aura::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
// -5308 - Execute
|
||||
class spell_warr_execute : public SpellScript
|
||||
{
|
||||
|
|
@ -513,71 +430,6 @@ class spell_warr_execute : public SpellScript
|
|||
}
|
||||
};
|
||||
|
||||
// -29723 - Sudden Death
|
||||
// -46913 - Bloodsurge
|
||||
class spell_warr_extra_proc : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_extra_proc);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_WARRIOR_T10_MELEE_4P_BONUS,
|
||||
SPELL_WARRIOR_EXTRA_CHARGE,
|
||||
SPELL_WARRIOR_SLAM_GCD_REDUCED,
|
||||
SPELL_WARRIOR_EXECUTE_GCD_REDUCED
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
AuraEffect const* bonusAurEff = target->GetAuraEffect(SPELL_WARRIOR_T10_MELEE_4P_BONUS, EFFECT_0);
|
||||
if (!bonusAurEff)
|
||||
return;
|
||||
|
||||
if (!roll_chance_i(bonusAurEff->GetAmount()))
|
||||
return;
|
||||
|
||||
target->CastSpell((Unit*)nullptr, SPELL_WARRIOR_EXTRA_CHARGE, true, nullptr, aurEff);
|
||||
|
||||
SpellInfo const* auraInfo = aurEff->GetSpellInfo();
|
||||
if (auraInfo->IsRankOf(sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_BLOODSURGE_R1)))
|
||||
target->CastSpell((Unit*)nullptr, SPELL_WARRIOR_SLAM_GCD_REDUCED, true, nullptr, aurEff);
|
||||
else if (auraInfo->IsRankOf(sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_SUDDEN_DEATH_R1)))
|
||||
target->CastSpell((Unit*)nullptr, SPELL_WARRIOR_EXECUTE_GCD_REDUCED, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_warr_extra_proc::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
// 58375 - Glyph of Blocking
|
||||
class spell_warr_glyph_of_blocking : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_glyph_of_blocking);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WARRIOR_GLYPH_OF_BLOCKING });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
caster->CastSpell(caster, SPELL_WARRIOR_GLYPH_OF_BLOCKING, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_warr_glyph_of_blocking::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 12809 - Concussion Blow
|
||||
class spell_warr_concussion_blow : public SpellScript
|
||||
{
|
||||
|
|
@ -736,46 +588,6 @@ class spell_warr_rend : public AuraScript
|
|||
}
|
||||
};
|
||||
|
||||
// -29834 - Second Wind
|
||||
class spell_warr_second_wind : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_second_wind);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_WARRIOR_SECOND_WIND_TRIGGER_1,
|
||||
SPELL_WARRIOR_SECOND_WIND_TRIGGER_2
|
||||
});
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo)
|
||||
return false;
|
||||
|
||||
return (spellInfo->GetAllEffectsMechanicMask() & ((1 << MECHANIC_ROOT) | (1 << MECHANIC_STUN))) != 0;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
static uint32 const triggeredSpells[2] = { SPELL_WARRIOR_SECOND_WIND_TRIGGER_1, SPELL_WARRIOR_SECOND_WIND_TRIGGER_2 };
|
||||
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActionTarget();
|
||||
uint32 spellId = triggeredSpells[GetSpellInfo()->GetRank() - 1];
|
||||
caster->CastSpell(caster, spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_warr_second_wind::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_warr_second_wind::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 64380, 65941 - Shattering Throw
|
||||
class spell_warr_shattering_throw : public SpellScript
|
||||
{
|
||||
|
|
@ -846,7 +658,7 @@ class spell_warr_sweeping_strikes : public AuraScript
|
|||
if (spellInfo && spellInfo->Id == SPELL_WARRIOR_EXECUTE && !_procTarget->HasAuraState(AURA_STATE_HEALTHLESS_20_PERCENT))
|
||||
{
|
||||
// If triggered by Execute (while target is not under 20% hp) deals normalized weapon damage
|
||||
GetTarget()->CastSpell(_procTarget, SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_2, true, nullptr, aurEff);
|
||||
GetTarget()->CastSpell(_procTarget, SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_2, aurEff);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -866,30 +678,6 @@ private:
|
|||
Unit* _procTarget = nullptr;
|
||||
};
|
||||
|
||||
// 28845 - Cheat Death
|
||||
class spell_warr_t3_prot_8p_bonus : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_t3_prot_8p_bonus);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (eventInfo.GetActionTarget()->HealthBelowPct(20))
|
||||
return true;
|
||||
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
if (damageInfo && damageInfo->GetDamage())
|
||||
if (GetTarget()->HealthBelowPctDamaged(20, damageInfo->GetDamage()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_warr_t3_prot_8p_bonus::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
// 50720 - Vigilance
|
||||
class spell_warr_vigilance : public AuraScript
|
||||
{
|
||||
|
|
@ -1024,6 +812,38 @@ class spell_warr_glyph_of_sunder_armor : public AuraScript
|
|||
}
|
||||
};
|
||||
|
||||
// Spell 28845 - Cheat Death
|
||||
|
||||
enum CheatDeath
|
||||
{
|
||||
SPELL_CHEAT_DEATH_TRIGGER = 28846
|
||||
};
|
||||
|
||||
class spell_warr_t3_prot_8p_bonus : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_t3_prot_8p_bonus);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetActionTarget() && eventInfo.GetActionTarget()->GetHealthPct() <= 20.0f;
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = eventInfo.GetActionTarget())
|
||||
{
|
||||
target->CastSpell(target, SPELL_CHEAT_DEATH_TRIGGER, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_warr_t3_prot_8p_bonus::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_warr_t3_prot_8p_bonus::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
// 20230 - Retaliation
|
||||
class spell_warr_retaliation : public AuraScript
|
||||
{
|
||||
|
|
@ -1084,10 +904,4 @@ void AddSC_warrior_spell_scripts()
|
|||
RegisterSpellScript(spell_warr_vigilance);
|
||||
RegisterSpellScript(spell_warr_vigilance_trigger);
|
||||
RegisterSpellScript(spell_warr_t3_prot_8p_bonus);
|
||||
RegisterSpellScript(spell_warr_item_t10_prot_4p_bonus);
|
||||
RegisterSpellScript(spell_warr_deep_wounds_aura);
|
||||
RegisterSpellScript(spell_warr_extra_proc);
|
||||
RegisterSpellScript(spell_warr_glyph_of_blocking);
|
||||
RegisterSpellScript(spell_warr_second_wind);
|
||||
RegisterSpellScript(spell_warr_t3_prot_8p_bonus);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue