if(caster->getPlayer()&& params.combatType != COMBAT_HEALING )
{
int32_t Lifeleech = caster->getPlayer()->getLifeLeechAmount(); // you can set it empty storage
int32_t Lifeleechchance = caster->getPlayer()->getLifeLeechChance(); // you can set it empty storage
if(Lifeleech > 0)
{
int32_t amount = std::abs((int32_t)std::floor((change * (Lifeleech / 100.))));
if(amount > 0 && random_range(1, 100) <= Lifeleechchance)
{
g_game.combatChangeHealth(COMBAT_HEALING, caster->getPlayer(), caster->getPlayer(), amount);
g_game.addMagicEffect(pCaster->getPosition(), MAGIC_EFFECT_WRAPS_RED); // add effect you want here
}
}
}