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());

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...