DnR Posted June 3, 2010 Share Posted June 3, 2010 Guys,i have this npe and i see no ways to fix it... I just dont understand how can stats go null lol. http://img190.imageshack.us/f/eleosds.jpg/ I searched at the l2j team i use and this issue was never mentioned. L2J gameserver rev.2018 When i unequip all my armor parts,all my stats go to 0. Link to comment Share on other sites More sharing options...
0 DnR Posted June 3, 2010 Author Share Posted June 3, 2010 Sry for the wrong section,move it to help if its possible. Link to comment Share on other sites More sharing options...
0 j1maras2@ Posted June 3, 2010 Share Posted June 3, 2010 if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) != null) != null is the fix. Link to comment Share on other sites More sharing options...
0 DnR Posted June 3, 2010 Author Share Posted June 3, 2010 I found this in Formulas.java and null is already added. Link to comment Share on other sites More sharing options...
0 j1maras2@ Posted June 3, 2010 Share Posted June 3, 2010 Show me the line 278. Link to comment Share on other sites More sharing options...
0 DnR Posted June 3, 2010 Author Share Posted June 3, 2010 i will post all the part related to this line. if (env.player instanceof L2PcInstance) { L2PcInstance p = (L2PcInstance) env.player; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LFINGER) != null) env.value -= 5; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RFINGER) != null) env.value -= 5; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEAR) != null) env.value -= 9; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_REAR) != null) env.value -= 9; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_NECK) != null) env.value -= 13; } env.value *= MENbonus[env.player.getMEN()] * env.player.getLevelMod(); } } static class FuncPDefMod extends Func { static final FuncPDefMod _fmm_instance = new FuncPDefMod(); static Func getInstance() { return _fmm_instance; } private FuncPDefMod() { super(Stats.POWER_DEFENCE, 0x20, null); } @Override public void calc(Env env) { if (env.player instanceof L2PcInstance) { L2PcInstance p = (L2PcInstance) env.player; boolean hasMagePDef = (p.getClassId().isMage() || p.getClassId().getId() == 0x31); // orc mystics are a special case if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_HEAD) != null) env.value -= 12; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) != null) env.value -= hasMagePDef ? 15 : 31; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) != null || p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR) env.value -= hasMagePDef ? 8 : 18; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) != null) env.value -= 8; if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) != null) env.value -= 7; } env.value *= env.player.getLevelMod(); } } Link to comment Share on other sites More sharing options...
0 j1maras2@ Posted June 3, 2010 Share Posted June 3, 2010 OLD:env.value -= hasMagePDef ? 15 : 31; NEW:env.value -= ((p.getClassId().isMage()) ? 15 : 31); Link to comment Share on other sites More sharing options...
0 DnR Posted June 3, 2010 Author Share Posted June 3, 2010 Thank you a lot jimaras,i appreciate it. The problem was here: if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) != null || p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR) env.value -= hasMagePDef ? 8 : 18; Request for lock. Link to comment Share on other sites More sharing options...
0 Erol Posted August 20, 2010 Share Posted August 20, 2010 Request for lock. Link to comment Share on other sites More sharing options...
Question
DnR
Guys,i have this npe and i see no ways to fix it...
I just dont understand how can stats go null lol.
http://img190.imageshack.us/f/eleosds.jpg/
I searched at the l2j team i use and this issue was never mentioned.
L2J gameserver rev.2018
When i unequip all my armor parts,all my stats go to 0.
Link to comment
Share on other sites
8 answers to this question
Recommended Posts