DnR Posted June 3, 2010 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.
0 DnR Posted June 3, 2010 Author Posted June 3, 2010 Sry for the wrong section,move it to help if its possible.
0 j1maras2@ Posted June 3, 2010 Posted June 3, 2010 if (p.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) != null) != null is the fix.
0 DnR Posted June 3, 2010 Author Posted June 3, 2010 I found this in Formulas.java and null is already added.
0 DnR Posted June 3, 2010 Author 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(); } }
0 j1maras2@ Posted June 3, 2010 Posted June 3, 2010 OLD:env.value -= hasMagePDef ? 15 : 31; NEW:env.value -= ((p.getClassId().isMage()) ? 15 : 31);
0 DnR Posted June 3, 2010 Author 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.
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.
8 answers to this question
Recommended Posts