Jump to content
  • 0

L2j Problem with L2PCInstance


thepwned

Question

i have one problem with l2j gameserver (instances. L2PCinstance) when every player log in game lose all skills active and passive..

 

this is the file (i just added a part of the problem)

 

// Remove a skill from the L2Character and its Func objects from calculator set of the L2Character
        final L2Skill oldSkill = super.removeSkill(skill);
        if (oldSkill != null)
        {
            Connection con = null;
            try
            {
                // Remove or update a L2PcInstance skill from the character_skills table of the database
                con = L2DatabaseFactory.getInstance().getConnection();
                PreparedStatement statement = con.prepareStatement(DELETE_SKILL_FROM_CHAR);
                
                statement.setInt(1, oldSkill.getId());
                statement.setInt(2, getObjectId());
                statement.setInt(3, getClassIndex());
                statement.execute();
                statement.close();
            }
            catch (Exception e)
            {
                _log.log(Level.WARNING, "Error could not delete skill: " + e.getMessage(), e);
            }
            finally
            {
                L2DatabaseFactory.close(con);
            }
        }
        
        if (transformId() > 0 || isCursedWeaponEquipped())
            return oldSkill;
        
        final L2ShortCut[] allShortCuts = getAllShortCuts();
        for (L2ShortCut sc : allShortCuts)
        {
            if ((sc != null) && (skill != null) && (sc.getId() == skill.getId()) && (sc.getType() == L2ShortCut.TYPE_SKILL)
                && !(skill.getId() >= 3080 && skill.getId() <= 3259)) // FIXME: Rough fix for shortcuts of augments getting removed. Find a better way
                deleteShortCut(sc.getSlot(), sc.getPage());
        }
        return oldSkill;
    }
    

 

Here my gameserver errors when i log in - ingame problem:

 

1)l2servproblem1.png

 

2)l2servproblem2.png

 

i hope i gave all the infos to have a respone.. if i am not right reply me what other to upload ... any answer is weclome.

Link to comment
Share on other sites

Recommended Posts

  • 0

i have one problem with l2j gameserver (instances. L2PCinstance) when every player log in game lose all skills active and passive..

 

this is the file (i just added a part of the problem)

 

// Remove a skill from the L2Character and its Func objects from calculator set of the L2Character
        final L2Skill oldSkill = super.removeSkill(skill);
        if (oldSkill != null)
        {
            Connection con = null;
            try
            {
                // Remove or update a L2PcInstance skill from the character_skills table of the database
                con = L2DatabaseFactory.getInstance().getConnection();
                PreparedStatement statement = con.prepareStatement(DELETE_SKILL_FROM_CHAR);
                
                statement.setInt(1, oldSkill.getId());
                statement.setInt(2, getObjectId());
                statement.setInt(3, getClassIndex());
                statement.execute();
                statement.close();
            }
            catch (Exception e)
            {
                _log.log(Level.WARNING, "Error could not delete skill: " + e.getMessage(), e);
            }
            finally
            {
                L2DatabaseFactory.close(con);
            }
        }
        
        if (transformId() > 0 || isCursedWeaponEquipped())
            return oldSkill;
        
        final L2ShortCut[] allShortCuts = getAllShortCuts();
        for (L2ShortCut sc : allShortCuts)
        {
            if ((sc != null) && (skill != null) && (sc.getId() == skill.getId()) && (sc.getType() == L2ShortCut.TYPE_SKILL)
                && !(skill.getId() >= 3080 && skill.getId() <= 3259)) // FIXME: Rough fix for shortcuts of augments getting removed. Find a better way
                deleteShortCut(sc.getSlot(), sc.getPage());
        }
        return oldSkill;
    }
    

 

Here my gameserver errors when i log in - ingame problem:

 

1)l2servproblem1.png

 

2)l2servproblem2.png

 

i hope i gave all the infos to have a respone.. if i am not right reply me what other to upload ... any answer is weclome.

Link to comment
Share on other sites

  • 0

i have one problem with l2j gameserver (instances. L2PCinstance) when every player log in game lose all skills active and passive..

 

this is the file (i just added a part of the problem)

 

// Remove a skill from the L2Character and its Func objects from calculator set of the L2Character
        final L2Skill oldSkill = super.removeSkill(skill);
        if (oldSkill != null)
        {
            Connection con = null;
            try
            {
                // Remove or update a L2PcInstance skill from the character_skills table of the database
                con = L2DatabaseFactory.getInstance().getConnection();
                PreparedStatement statement = con.prepareStatement(DELETE_SKILL_FROM_CHAR);
                
                statement.setInt(1, oldSkill.getId());
                statement.setInt(2, getObjectId());
                statement.setInt(3, getClassIndex());
                statement.execute();
                statement.close();
            }
            catch (Exception e)
            {
                _log.log(Level.WARNING, "Error could not delete skill: " + e.getMessage(), e);
            }
            finally
            {
                L2DatabaseFactory.close(con);
            }
        }
        
        if (transformId() > 0 || isCursedWeaponEquipped())
            return oldSkill;
        
        final L2ShortCut[] allShortCuts = getAllShortCuts();
        for (L2ShortCut sc : allShortCuts)
        {
            if ((sc != null) && (skill != null) && (sc.getId() == skill.getId()) && (sc.getType() == L2ShortCut.TYPE_SKILL)
                && !(skill.getId() >= 3080 && skill.getId() <= 3259)) // FIXME: Rough fix for shortcuts of augments getting removed. Find a better way
                deleteShortCut(sc.getSlot(), sc.getPage());
        }
        return oldSkill;
    }
    

 

Here my gameserver errors when i log in - ingame problem:

 

1)l2servproblem1.png

 

2)l2servproblem2.png

 

i hope i gave all the infos to have a respone.. if i am not right reply me what other to upload ... any answer is weclome.

Link to comment
Share on other sites

  • 0

The error is pretty self-explanatory, you have an NPE. First things first: add an NPE fix, and secondly, find out whats causing your NPE, you really just have to look at what you wrote to find it.

Secondly, this is not the area for questions.

Link to comment
Share on other sites

  • 0

The error is pretty self-explanatory, you have an NPE. First things first: add an NPE fix, and secondly, find out whats causing your NPE, you really just have to look at what you wrote to find it.

Secondly, this is not the area for questions.

Link to comment
Share on other sites

  • 0

The error is pretty self-explanatory, you have an NPE. First things first: add an NPE fix, and secondly, find out whats causing your NPE, you really just have to look at what you wrote to find it.

Secondly, this is not the area for questions.

Link to comment
Share on other sites

  • 0

The error is pretty self-explanatory, you have an NPE. First things first: add an NPE fix, and secondly, find out whats causing your NPE, you really just have to look at what you wrote to find it.

Secondly, this is not the area for questions.

 

your answer is welcome anyway, but little missed.. explain me little better if is possible, maybe i am newbie :P also give me some infos about where i can add this kind of posts... thanks

Link to comment
Share on other sites

  • 0

The error is pretty self-explanatory, you have an NPE. First things first: add an NPE fix, and secondly, find out whats causing your NPE, you really just have to look at what you wrote to find it.

Secondly, this is not the area for questions.

 

your answer is welcome anyway, but little missed.. explain me little better if is possible, maybe i am newbie :P also give me some infos about where i can add this kind of posts... thanks

Link to comment
Share on other sites

  • 0

The error is pretty self-explanatory, you have an NPE. First things first: add an NPE fix, and secondly, find out whats causing your NPE, you really just have to look at what you wrote to find it.

Secondly, this is not the area for questions.

 

your answer is welcome anyway, but little missed.. explain me little better if is possible, maybe i am newbie :P also give me some infos about where i can add this kind of posts... thanks

Link to comment
Share on other sites

  • 0

Somehow: it can't restore skills.

 

As you can't restore skills, it doesn't fill skills array.

As skills array isn't filled, skills array is still null and so when it goes deeper it finds nothing, so you got a NPE.

 

The problem isn't the NPE, it's why it can't restore skills.

 

PS : your empty skills window is normal, as array is null.

PS2 : I would check the method which restore skills. It got nothing with removeSkill() method. It's about character loading. Search with error description "could not restore character" using ctrl+H.

Link to comment
Share on other sites

  • 0

Somehow: it can't restore skills.

 

As you can't restore skills, it doesn't fill skills array.

As skills array isn't filled, skills array is still null and so when it goes deeper it finds nothing, so you got a NPE.

 

The problem isn't the NPE, it's why it can't restore skills.

 

PS : your empty skills window is normal, as array is null.

PS2 : I would check the method which restore skills. It got nothing with removeSkill() method. It's about character loading. Search with error description "could not restore character" using ctrl+H.

Link to comment
Share on other sites

  • 0

Somehow: it can't restore skills.

 

As you can't restore skills, it doesn't fill skills array.

As skills array isn't filled, skills array is still null and so when it goes deeper it finds nothing, so you got a NPE.

 

The problem isn't the NPE, it's why it can't restore skills.

 

PS : your empty skills window is normal, as array is null.

PS2 : I would check the method which restore skills. It got nothing with removeSkill() method. It's about character loading. Search with error description "could not restore character" using ctrl+H.

Link to comment
Share on other sites

  • 0

Somehow: it can't restore skills.

 

As you can't restore skills, it doesn't fill skills array.

As skills array isn't filled, skills array is still null and so when it goes deeper it finds nothing, so you got a NPE.

 

 

 

The problem isn't the NPE, it's why it can't restore skills.

 

PS : your empty skills window is normal, as array is null.

PS2 : I would check the method which restore skills. It got nothing with removeSkill() method. It's about character loading. Search with error description "could not restore character" using ctrl+H.

 

 

Your answer seems good, can you tell me please which file to open to search for that?

Link to comment
Share on other sites

  • 0

If I used yellow in previous answer, that was to avoid to repeat myself.

 

i asked you for wich file name i have to search... my name is thepwned yes my name is thepwned but that can't give you full sentence about who i am.... BTW if you're not borred to write me the file name i'll get it as intention.. Thanks.

Link to comment
Share on other sites

  • 0

Search with error description "could not restore character" using ctrl+H.

 

If u dont know whch file is it, u can start with L2PcInstance.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock