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

    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • 📜 • Mass PVP – Craft – Progressive Server (ITEMS, ARMOR, WEAPONS, ETC) 🕹️ • Chronicles: Lineage 2 - Interlude (C6) 🛠️ • Retail status 🕒 • Server Time: GMT -3 🏙️ • Main Town: Giran ✨ • Teleportation for all Towns, Gk Global 🛡️ • NPC BUFFER - GMSHOP B-GRADE - DONATION SHOP - AUCTION MANAGER 🐉 • Epic Bosses: Chaotic Zones 🔁 • Protection respawn: 15 seconds ⏰ • Restart Server: 05:00 AM Today 💸 • RTM allowed between players (ask Staff if in doubt) 📊 SERVER RATES: • EXP: x8 • SP: x10 • Adena: x3 • Seal Stone: x3 • Drop: x3 • Spoil: x5 • Raid EXP/SP/Drop: x3 • Premium Rates: x2 🌐 Website: https://www.l2roosters.com 💬 Discord: https://discord.gg/cUyYXrfy 🔥 Join us now and forge your legacy at Roosters Gaming!
    • Hello, lovely people, how are you? I just finished compiling the L2jFrozen project Rev: 1132 (very old). I don't mind it being too old, since the project is for me and my children. (LAN/Offline) it's not meant to be put online. I want to learn and give my children more comfort when playing. And for my part, I also experiment with the game. My problem is that I don't know much about the subject. I was able to make some basic configurations to my liking and that of my children, but it never compiles or anything like that... I would really need help from you, the community... I simply want to remove all subclass restrictions, remove the restriction on "Overlord, Warsmith, and Dark Elf subclasses with White Elves and vice versa." Thank you very much in advance! Greetings, community.
  • Topics

×
×
  • 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