Jump to content
  • 0

L2j Problem with L2PCInstance


Question

Posted

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.

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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?

  • 0
Posted

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.

  • 0
Posted

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

 

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

Guest
This topic is now closed to further replies.


  • Posts

    • 🧵 [FREE RELEASE] L2Updater + AntiCheat + Build System + Full Website ⚔️ Presentation After a long time of development, testing, and improvements, I decided to release this project for free to the community. This is a complete package for anyone who wants to build a Lineage II server with a professional-level structure. The idea was not just to create a simple tool, but a full ecosystem that covers everything a modern server needs. 🚀 What’s Included This release contains: ✔ Modern Launcher (Windows) ✔ Smart Update System (FULL + PATCH) ✔ AntiCheat protection (client-side DLL) ✔ Build System for generating updates ✔ Complete Website (register + ranking + pages) Everything is integrated to work together. 🧠 Project Concept The goal of this project is simple: Instead of using outdated launchers or fragmented systems, this package provides: ✔ Organization ✔ Performance ✔ Security ✔ Scalability 🔄 Update System The updater is based on a manifest system, where: ✔ The client checks versions automatically ✔ Only changed files are downloaded (patch system) ✔ Full client is downloaded if needed ✔ Files are validated using hash This results in: Faster updates Lower bandwidth usage Better user experience 🛡️ AntiCheat System The AntiCheat included in this package works directly on the client side. It provides: ✔ Protection against modified clients ✔ Basic cheat detection ✔ File integrity validation ✔ Blocking of suspicious environments This helps maintain a fair and controlled gameplay environment. 🏗️ Build System (Patch Creator) A full build system is included to automate updates. Features: ✔ Detect changed files automatically ✔ Generate FULL packages ✔ Generate PATCH updates ✔ Create manifest.json automatically This allows you to manage updates like: 🌐 Website System A complete website is included, featuring: ✔ Account registration ✔ Player ranking (PvP / PK) ✔ News pages ✔ Integration with the server database 🎯 Why Use This? Many servers fail because they lack structure. This package solves that by providing: ✔ A complete environment ✔ Organized update flow ✔ Integrated systems ✔ Ready-to-use base ⚙️ Technical Details ✔ Launcher developed with modern UI concepts ✔ Patch system based on hash validation ✔ Integration between server, launcher, and website ✔ Expandable architecture 📦 Download 👉 (https://mega.nz/file/AusTnYQK#ZhvArkZpDS7FH60TXd2rg5wT2OxSg9v2pJ2GLrJbyiQ / download link here) 💬 Final Words If your server does not have a system like this today: This project is designed to help you reach a higher level.  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..