Jump to content
  • 0

Help With Charactercreate.java


Question

Posted (edited)

What should I change to make my char start with full hp? currently when I create new char his HP is set to 80/314, see link for image http://joxi.ru/J2bN6NPsdbok26

 

I believe I should change smth in .setCurrentHp(template.getBaseHpMax()); but im not sure what exactly to do.

int objectId = IdFactory.getInstance().getNextId();
            L2PcInstance newChar = PlayerEnteringManager.getInstance().create(objectId, template, getClient().getAccountName(), _name, _hairStyle, _hairColor, _face, _sex != 0);
            newChar.getStatus().setCurrentHp(template.getBaseHpMax());
            newChar.getStatus().setCurrentCp(template.getBaseCpMax());
            newChar.getStatus().setCurrentMp(template.getBaseMpMax());
Edited by dBayway

5 answers to this question

Recommended Posts

  • 0
Posted

 

newChar.setCurrentHp(newChar.getMaxHp());
newChar.setCurrentMp(newChar.getMaxMp());
newChar.setCurrentMp(newChar.getMaxCp());

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..