L2JMobius

C6 Support for giveHp stat

G-hamsteR · 1 · 5222

Online G-hamsteR

  • Viscount
  • *****
    • Posts: 326
Hello,

I wanted to create an item for healers, so that their healing powers would increase. So, I created giveHp stat, which increases the healing done to others.

You can use it like this:
Code: [Select]
<mul order="0x30" stat="giveHp" val="1.2" />
The above increases healing done to other players by 20%

At gameserver/model/skills/Stat.java, line 38:
Change this:
Code: [Select]
HEAL_EFFECTIVNESS("gainHp"),To this:
Code: [Select]
HEAL_EFFECTIVNESS("gainHp"),
HEAL_PROFICIENCY("giveHp"),

At gameserver/handler/skillhandlers/Heal.java, line 137:
Change this:
Code: [Select]
hp *= target.calcStat(Stat.HEAL_EFFECTIVNESS, 100, null, null) / 100;To this:
Code: [Select]
hp *= target.calcStat(Stat.HEAL_EFFECTIVNESS, 100, null, null) / 100;
if (player != null)
{
hp *= player.calcStat(Stat.HEAL_PROFICIENCY, 100, null, null) / 100;
}

Pastebin patch: https://pastebin.com/jPu0LRee