Jump to content

Recommended Posts

Posted

you should refactor everything at once so you dont end up having a gazillion refactoring changesets^^

I don't have in mind what my next refactor is going to be, so I commit them separately.

 

I hope you move them in datapack in the future

Fine, now go play with your flying ship.

Posted

I hope you move them in datapack in the future

 

hahahahah

 

change GameServer.java to Console.java. for obvious reasons

Posted

I hope you move them in datapack in the future

 

Pointless, if you leave them in the core you can use them for much greater things :

 

Its best to unhardcode stuff like olympiad and such features.

Guest Elfocrash
Posted

Pointless, if you leave them in the core you can use them for much greater things :

 

Its best to unhardcode stuff like olympiad and such features.

It is best to unhardcode as much stuff as you can for obvious reasons + starting with the handlers is a good move as it is easy us fuck.

Posted

Personally, I want java on my eclipse and scripts on the dp

And some people want a million dollar, we cant have everyone satisfied.

Posted

It is best to unhardcode as much stuff as you can for obvious reasons + starting with the handlers is a good move as it is easy us -beep-.

 

Yes its good to unhardcode stuff(altho using them in jars is pretty much the best way for performance gains, or just caching them), but there are things that should not be unhardcoded.

 

Keeping the handlers in the core gives you the possibility of having class based restriction so for example

 

if (itemId = infinite line of itemIds) or if (potions.class)

 

Doesnt seem much but used properly on the places where it can its a pretty good thing.

Posted

And some people want a million dollar, we cant have everyone satisfied.

 

really ?

 

You compare two really different things.

 

On l2j everything is possible while on real life not ;)

Posted

really ?

 

You compare two really different things.

 

On l2j everything is possible while on real life not ;)

I am comparing the desire in general not the specific environment.

Guest Elfocrash
Posted

but there are things that should not be unhardcoded.

I never said he should do it on everything. He can't do it either way knowledgewise to start with.

Posted

Where do we start :) Damn L2J community is still striving and going good. That's interesting news, but now on a more serious note regarding the packs and some replies here.

 

The educational myth

 

Personally, I don't believe L2 to be the best option for educational purposes. Mainly because L2J and generally private servers is a concept way too close to the market. Everything around here is done for the money. It is not a good ground for education when everyone expects your product to reach production state and make money. There are countless of open source projects out there for Java Developers that want to learn to use Java Technologies. Some that I could name are the Jetty Open Source Web Server, Apache Solr Indexer, the NoSQL Cassandra database etc. They all include amazing technologies, JAX-RS, JAXB, EJB3, Spring, Hibernate etc.

 

The new hot L2J Project

 

I'll pretend to be your grandpa, "listen kid", you don't create a new L2J Project just because you want to refractor the code in a way you believe is the right one. If you ask ten people where they want handlers to be, you will get ten different answers, even if they can be in the core, or in the datapack. The same will go for the name of L2PcInstance class. Purity is not a goal you should pursue in real life. On the other hand, chaos isn't a goal either. You can't create a pack full of shitty customs just because you learnt how to adopt every share out there to your pack.

 

Why should a pack exist ?

 

A pack should exist if it gives value to the people that need it. Ask this question to yourself when you create a pack, what am I doing different than the others that will make my target group prefer me over them ? Specifically for your pack, you should ask what does it do better than acis, in which sections does it improve it. That's how you can find your packs identity. I could name some reasons where acis fails and you could succeed. Examples: lack of custom codes, lack of essential things like custom gatekeeper/buffer, lack of SVN access for easy sync.

 

PS:

if (itemId = infinite line of itemIds) or if (potions.class)

That's not a reason for handlers to stay in the core -.-'. And it violates the Liskov principle of Object Oriented Programming.

 

Posted

Where do we start :) Damn L2J community is still striving and going good. That's interesting news, but now on a more serious note regarding the packs and some replies here.

 

The educational myth

 

Personally, I don't believe L2 to be the best option for educational purposes. Mainly because L2J and generally private servers is a concept way too close to the market. Everything around here is done for the money. It is not a good ground for education when everyone expects your product to reach production state and make money. There are countless of open source projects out there for Java Developers that want to learn to use Java Technologies. Some that I could name are the Jetty Open Source Web Server, Apache Solr Indexer, the NoSQL Cassandra database etc. They all include amazing technologies, JAX-RS, JAXB, EJB3, Spring, Hibernate etc.

 

The new hot L2J Project

 

I'll pretend to be your grandpa, "listen kid", you don't create a new L2J Project just because you want to refractor the code in a way you believe is the right one. If you ask ten people where they want handlers to be, you will get ten different answers, even if they can be in the core, or in the datapack. The same will go for the name of L2PcInstance class. Purity is not a goal you should pursue in real life. On the other hand, chaos isn't a goal either. You can't create a pack full of shitty customs just because you learnt how to adopt every share out there to your pack.

 

Why should a pack exist ?

 

A pack should exist if it gives value to the people that need it. Ask this question to yourself when you create a pack, what am I doing different than the others that will make my target group prefer me over them ? Specifically for your pack, you should ask what does it do better than acis, in which sections does it improve it. That's how you can find your packs identity. I could name some reasons where acis fails and you could succeed. Examples: lack of custom codes, lack of essential things like custom gatekeeper/buffer, lack of SVN access for easy sync.

 

PS:That's not a reason for handlers to stay in the core -.-'. And it violates the Liskov principle of Object Oriented Programming.

 

 

Okay than i'll be more specific, heres a part from the l2jfree global restriction engine

 

public final boolean canUseItemHandler(Class<? extends IItemHandler> clazz, int itemId, L2Playable activeChar,

L2ItemInstance item, L2PcInstance player)

{

if (clazz == SummonItems.class)

{

if (player != null && isInFunEvent(player) && started() && !allowSummon())

{

activeChar.sendPacket(ActionFailed.STATIC_PACKET);

return false;

}

}

else if (clazz == Potions.class)

{

if (player != null && isInFunEvent(player) && started() && !allowPotions())

{

player.sendPacket(ActionFailed.STATIC_PACKET);

return false;

}

}

 

return true;

}

 

Same can be done with a specific skillhandler, skilltargethandler, admincommand handler or whatever you wish. Mainly for me thats the reason why i keep handlers in the core. Things like that in my book worth more than unhardcoding something becuse if you look it(and dont think about what l2j does because most of their stuff is just eyecandy or theoretically good stuff executed badly), you get better functionality over a simple convention of code design.

Posted

Wow, you take things a bit too serious, Leluche. There is no reason for competition, there is no reason to create a project to compete acis and try to make something better than this. Also, there are no rules for creating a new project.

 

I do it for the lols as I said to the first post, that most of you missed, and as you can see at some previous replies haters gonna hate. If I want to refactor everything to food names I am gonna do it and the last thing I have in mind about this project is earning money.

Posted
public final boolean canUseItemHandler(Class<? extends IItemHandler> clazz, int itemId, L2Playable activeChar,

        L2ItemInstance item, L2PcInstance player)

  {

      if (clazz == SummonItems.class) // Implementation agnostic ?

      {

        if (player != null && isInFunEvent(player) && started() && !allowSummon())

        {

            activeChar.sendPacket(ActionFailed.STATIC_PACKET);

            return false;

        }

      }

      else if (clazz == Potions.class) //Implementation agnostic ?

      {

        if (player != null && isInFunEvent(player) && started() && !allowPotions())

        {

            player.sendPacket(ActionFailed.STATIC_PACKET);

            return false;

        }

      }

     

      return true;

  }

 

This is a bad coding practice.

 

public final boolean canUseItemHandler(itemHandler handler, int itemId, L2Playable activeChar,

        L2ItemInstance item, L2PcInstance player)

  {

    boolean result = false;

 

    result = handler.evaluateConditions(itemId,activeChar,item,player); // ItemHandler interface includes evaluateConditions(...);

     

    return result;

  }

 

Easier, faster and implementation agnostic since this code section does not need to know the class type of the handler to evaluate. And it avoids reflecting on the Class<?> equality.

Guest
This topic is now closed to further replies.



  • Posts

    • I’ve worked with a web designer Tacoma before, and it really reminded me how much smoother projects run when design and development stay in sync. Your setup looks solid, and pairing clean UI work with steady backend support can save a ton of back‑and‑forth later. If you ever decide to push harder on conversions or need outside perspective on structure, that mix helped me spot gaps early on.
    • If you’re juggling mixed payment methods and tricky setups, I’ve found that easing the pressure on the subscription side can make the whole flow smoother. I started using Subscription Revenue Growth for handling my own recurring payments, upgrades, and all that messy churn stuff, and it took a big weight off. Pairing something stable for subs with your gateway setup can keep cashflow from going off the rails.
    • L2Avalon launches February 20 High Five project (Salvation client) focused on classic world progression — not instance spam and not “twink” metas. What is L2Avalon? L2Avalon is built around real Lineage 2 gameplay: farming spots, open world conflict, raids, epics, economy and competition. No Kamael Reduced instanced content **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net Balance & Economy Every class is tuned to be viable in PvE and PvP Off-meta classes get buffed instead of adding power-creep garbage Adena-based economy Farming matters: boosted Drop/Spoil for each stage of progression Rates & Settings Dynamic XP: 50x (Lv 1–40) → 1x (Lv 78+) Staged progression with new content unlocking weekly Adena / Drop / Spoil: 3x / 5x / 5x NPC Buffer: 2 hours (Premium: 3 hours) Box limit: 2+1 windows per PC MP potion: 1000 MP, 10s cooldown Free2Play System (earn Donate Coins by playing) You don’t have to donate to progress. Donate Coins drop in-game, so everything is achievable through playtime and activity. Where Donate Coins drop: Mobs Lv 76+, Raid Bosses Lv 70+, Epic Bosses Auto-farm (controlled) Limit: only 1 window can use auto-farm at the same time Daily time: 1 hour/day without Premium Extra tickets: purchasable with PC Bang points (earned by being online) Disabled zones: CC / IT / FOG / VARKA / KETRA Equipment Changes Reworked set bonuses Reworked SA system Enchanted set bonuses Enchanted shirt bonuses Fake Epic jewelry (weakened alternative) Skills (High Five mechanics) New skills added Old skills updated New enchant branches + updated existing ones Subclass skills Clan skills Daily Activities (solo-friendly) Events / Missions / Instances Stages Soon — stage schedule and weekly unlocks will be published February 20 — we start. **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net
    • Hello MxC community, i want to buy client dev / patch maker services for the client of salvation. Im using L2jeternity multiprotocol (h5-salvation 140). I want a Patch full optimized for the h5 content. Everything that is not needed must be removed, as well as some textures like maps for example should be also adjusted to h5 content. If you know anyone that can take the job feel free to contact me here or in Discord. Only professional work.   Discord: ch4osroxas   Thank you very much!
  • 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..

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