L2JMobius

C6 Rebirth does not return Status

junin00 · 4 · 9702

Offline junin00

  • Black Sheep
  • Heir
  • **
    • Posts: 31
There's still a problem with Rebirth. The character, as he passes the level does not change the status HP, MP, CP, gets 1.



Online Mobius

  • Distinguished King
  • *****
    • Posts: 16047
Up to level 26 you will have the same stats because you are essentialy a 3rd class character - 80 levels.

Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/skills/Formulas.java
===================================================================
--- java/org/l2jmobius/gameserver/model/skills/Formulas.java (revision 7463)
+++ java/org/l2jmobius/gameserver/model/skills/Formulas.java (working copy)
@@ -707,7 +707,7 @@
  public void calc(Env env)
  {
  final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate();
- final int lvl = env.player.getLevel() - t.getClassBaseLevel();
+ final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50);
  final double hpmod = t.getLevelHpMod() * lvl;
  final double hpmax = (t.getLevelHpAdd() + hpmod) * lvl;
  final double hpmin = (t.getLevelHpAdd() * lvl) + hpmod;
@@ -754,7 +754,7 @@
  public void calc(Env env)
  {
  final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate();
- final int lvl = env.player.getLevel() - t.getClassBaseLevel();
+ final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50);
  final double cpmod = t.getLevelCpMod() * lvl;
  final double cpmax = (t.getLevelCpAdd() + cpmod) * lvl;
  final double cpmin = (t.getLevelCpAdd() * lvl) + cpmod;
@@ -801,7 +801,7 @@
  public void calc(Env env)
  {
  final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate();
- final int lvl = env.player.getLevel() - t.getClassBaseLevel();
+ final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50);
  final double mpmod = t.getLevelMpMod() * lvl;
  final double mpmax = (t.getLevelMpAdd() + mpmod) * lvl;
  final double mpmin = (t.getLevelMpAdd() * lvl) + mpmod;

This will limit the gap to -50 levels.
Up to 26 you will still have the same stats, but they will not be 1.

If you set to -30 you will have the same, but greater, stats until level 46.
I would stick with -50.

You can further mess with formulas, but this is the simplest solution.


Offline junin00

  • Black Sheep
  • Heir
  • **
    • Posts: 31
I made the modification you asked for, now the character's status has returned, it will allow the player to go and kill monsters without fear of dying.

Thank you very much.