mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Scripts/Spells: fixed Lava Burst crit chance against targets affected by Flame Shock
This commit is contained in:
3
sql/updates/world/cata_classic/2025_02_09_00_world.sql
Normal file
3
sql/updates/world/cata_classic/2025_02_09_00_world.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_sha_lava_burst';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(51505, 'spell_sha_lava_burst');
|
||||
@@ -22,7 +22,30 @@
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "Unit.h"
|
||||
|
||||
namespace Scripts::Spells::Shaman
|
||||
{
|
||||
// 51505 - Lava Burst
|
||||
class spell_sha_lava_burst : public SpellScript
|
||||
{
|
||||
void CalcCritChance(Unit const* victim, float& critChance)
|
||||
{
|
||||
// The crit chance against targets effected by the caster's Flame Shock spell is 100%
|
||||
if (victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, flag128(0x10000000), GetCaster()->GetGUID()))
|
||||
critChance = 100.0f;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnCalcCritChance += SpellOnCalcCritChanceFn(spell_sha_lava_burst::CalcCritChance);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void AddSC_shaman_spell_scripts()
|
||||
{
|
||||
using namespace Scripts::Spells::Shaman;
|
||||
RegisterSpellScript(spell_sha_lava_burst);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user