mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Core/Spells: fixed Heroic Strike damage calculation
This commit is contained in:
3
sql/updates/world/cata_classic/2024_07_09_00_world.sql
Normal file
3
sql/updates/world/cata_classic/2024_07_09_00_world.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_warr_heroic_strike';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(78, 'spell_warr_heroic_strike');
|
||||
@@ -22,7 +22,25 @@
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "Unit.h"
|
||||
|
||||
// 78 - Heroic Strike
|
||||
class spell_warr_heroic_strike : public SpellScript
|
||||
{
|
||||
// Damage = {8+$ap*60/100}
|
||||
void CalculateDamage(Unit* /*victim*/, int32& damage, int32& /*flatMod*/, float& /*pctMod*/)
|
||||
{
|
||||
damage = static_cast<int32>(8 + GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK) * 0.6f);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
CalcDamage += SpellCalcDamageFn(spell_warr_heroic_strike::CalculateDamage);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_warrior_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_warr_heroic_strike);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user