Page 1 of 1

[C] 14 UseItem

Posted: Mon Aug 10, 2009 1:32 pm
by exT1m
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:
Well.. i get last interlude revision of core/dp (i really don't know it's revision number, that's why i didn't write that).

Few days ago, i haved to add some things on my server, some thing like this http://www.l2jserver.com/trac/changeset/2335, this http://www.l2jserver.com/trac/changeset/2191 and this http://www.l2jserver.com/trac/changeset/2194.. Then, when i used to equip any infinity twohanded weapon and then unequip that, i saw and see:

Code: Select all

Client: [Character: xXxXX - Account: xxx - IP: xx.xxx.xx.xxx] - Failed running : [C] 14 UseItem? - L2J Server Version: ${l2j.revision} - DP Revision: ${l2jdp.re vision} java.lang.NullPointerException?    at net.sf.l2j.gameserver.model.L2Character.removeSkill(L2Character.java:5233)    at net.sf.l2j.gameserver.model.L2Character.removeSkill(L2Character.java:5222)    at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.removeSkill(L2PcInstance.java:6364)    at net.sf.l2j.gameserver.model.Inventory$ItemPassiveSkillsListener?.notifyUnequiped(Inventory.java:237)    at net.sf.l2j.gameserver.model.Inventory.setPaperdollItem(Inventory.java:760)    at net.sf.l2j.gameserver.model.Inventory.unEquipItemInBodySlot(Inventory.java:905)    at net.sf.l2j.gameserver.model.Inventory.unEquipItemInBodySlotAndRecord(Inventory.java:828)    at net.sf.l2j.gameserver.clientpackets.UseItem?.runImpl(UseItem?.java:293)    at net.sf.l2j.gameserver.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:79)    at java.util.concurrent.ThreadPoolExecutor?$Worker.runTask(Unknown Source)    at java.util.concurrent.ThreadPoolExecutor?$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
The same problem: http://www.l2jserver.com/trac/ticket/951, but that person fixed it. I tryied to use the same fix, but nothing happens.. :roll:

Re: [C] 14 UseItem

Posted: Mon Aug 10, 2009 1:38 pm
by janiii
when does the error occures?

what code do you have in net.sf.l2j.gameserver.model.L2Character at line 5222 ?

Re: [C] 14 UseItem

Posted: Mon Aug 10, 2009 1:45 pm
by exT1m
janiii wrote:when does the error occures?
After i mannualy added fixes, that i wrote at one post above.
janiii wrote: what code do you have in net.sf.l2j.gameserver.model.L2Character at line 5222 ?

Code: Select all

public L2Skill removeSkill(L2Skill skill)	{		if (skill == null) return null; 		// Remove the skill from the L2Character _skills		return removeSkill(skill.getId());           [b]// <----- thats 5222 line[/b]	}
So, thats 5233:

Code: Select all

	public L2Skill removeSkill(int skillId)	{		// Remove the skill from the L2Character _skills		L2Skill oldSkill = _skills.remove(skillId);		// Remove all its Func objects from the L2Character calculator set		if (oldSkill != null)			removeStatsOwner(oldSkill);                         if (oldSkill.isChance() && _chanceSkills != null)    [b] // <---- thats 5233 line[/b]                        { 				removeChanceSkill(oldSkill.getId());                        } 		return oldSkill;	}

Re: [C] 14 UseItem

Posted: Mon Aug 10, 2009 7:34 pm
by exT1m
Up - it's really very large problem for me..

Re: [C] 14 UseItem

Posted: Tue Aug 11, 2009 2:06 am
by _DS_
Smth like this:

Code: Select all

if (oldSkill != null){  removeStatsOwner(oldSkill);  if (oldSkill.isChance() && _chanceSkills != null)    removeChanceSkill(oldSkill.getId());}

Re: [C] 14 UseItem

Posted: Tue Aug 11, 2009 4:35 am
by exT1m
Oh, thanks! You just save my life ;D