mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Spells: Fix warrior "Rend" damage
This commit is contained in:
3
sql/updates/world/2013_07_26_02_world_spell_misc_434.sql
Normal file
3
sql/updates/world/2013_07_26_02_world_spell_misc_434.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_warr_rend';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(94009, 'spell_warr_rend');
|
||||
@@ -538,7 +538,7 @@ class spell_warr_rallying_cry : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 772 - Rend
|
||||
// 94009 - Rend
|
||||
class spell_warr_rend : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -554,21 +554,13 @@ class spell_warr_rend : public SpellScriptLoader
|
||||
{
|
||||
canBeRecalculated = false;
|
||||
|
||||
// $0.2 * (($MWB + $mwb) / 2 + $AP / 14 * $MWS) bonus per tick
|
||||
// $0.25 * (($MWB + $mwb) / 2 + $AP / 14 * $MWS) bonus per tick
|
||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 mws = caster->GetAttackTime(BASE_ATTACK);
|
||||
float mwbMin = caster->GetWeaponDamageRange(BASE_ATTACK, MINDAMAGE);
|
||||
float mwbMax = caster->GetWeaponDamageRange(BASE_ATTACK, MAXDAMAGE);
|
||||
float mwb = ((mwbMin + mwbMax) / 2 + ap * mws / 14000) * 0.2f;
|
||||
float mwb = ((mwbMin + mwbMax) / 2 + ap * mws / 14000) * 0.25f;
|
||||
amount += int32(caster->ApplyEffectModifiers(GetSpellInfo(), aurEff->GetEffIndex(), mwb));
|
||||
|
||||
// "If used while your target is above 75% health, Rend does 35% more damage."
|
||||
// as for 3.1.3 only ranks above 9 (wrong tooltip?)
|
||||
if (GetSpellInfo()->GetRank() >= 9)
|
||||
{
|
||||
if (GetUnitOwner()->HasAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, GetSpellInfo(), caster))
|
||||
AddPct(amount, GetSpellInfo()->Effects[EFFECT_2].CalcValue(caster));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user