1888 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
14 lines
616 B
C++
14 lines
616 B
C++
// Source reference only, GPL; not compiled into or executed by the client.
|
|
struct spell_vampirism : public AuraScript
|
|
{
|
|
std::optional<SpellAuraProcResult> OnProc(Unit* owner, Unit* /*victim*/, uint32 damage, int32 /*originalAmount*/, Aura* aura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/) override
|
|
{
|
|
if (damage <= 1 || !owner->IsAlive())
|
|
return SPELL_AURA_PROC_FAILED;
|
|
|
|
int32 const heal = std::max(1u, aura->GetModifier()->m_amount * damage / 100);
|
|
owner->ModifyHealth(heal);
|
|
return SPELL_AURA_PROC_OK;
|
|
}
|
|
};
|