Jump to content

Recommended Posts

Posted
On 29/11/2017 at 9:23 PM, .Elfocrash said:

Awesome job as always. 

 

In terms of code review and improvements here are my comments.

 

Line : Comment

 

51: ChristmasEvent should be extending an abstract class called event and shouldn't be a singleton. The XML Document should be on it's own EventConfigLoader. Remember that classes should be doing one job only.

53: Rewards shouldn't be static.

156-157: Should be extracted to their own method called something like determineSpawnProbability()

160-167: Should be extracted to spawnRandomNpc

169-171: Should be extracted to handleNpcDespawn

205-252: This is bad class design because it limits you to a very specific type of a set. Something like this should be generic, so i would suggest you check the Pair class.

271: Loading singletons like this is deceiving to the reader because what you express via your code is that the only reason this line is there is to print the reward size while in reality you are initialising the singleton. Just a .getInstance() should be enough.

332: applyTo is a bad method name not indicating the actions. A reward is not applied. It's given/rewarded. Should be rewardPlayer

337-341: Should be extracted to a method called handleXpReward()

343-347: Should be extracted to a method called handleSpReward()

349-353: Should be extracted to a method called handleRecReward()

355-356: Should be extracted to a method called handleRewardItems()

 

I won't comment on the onBypassFeedback method because the whole thing is poorly designed to begin with anyway.

 

Comments:

Here are some guides that you should keep on your mind when you are coding any type of system. Those are not the only ones, but they apply on what i saw.

  • Classes should only have one responsibility.
  • You should always use long self descriptive names for methods, classes, etc. Your code is your documentation.

I am only giving you really constructive feedback because i know you are keen to learn. Don't take it the wrong way. It is amazing effort.

 

Remember he is learning. Too much info for a small share :)) Nice of you but is too detailed for such a small engine.

  • 2 weeks later...
Posted
16 hours ago, valentin said:

nice  

3333.png

look at the first line of the error. the system couldnt find SantaClaus.java in net.sf.l2j.gameserver.model.actor.instance

You probably paste it accidentally somewhere else like Custom package

  • 2 months later...
Posted
31 minutes ago, martuxas1 said:

Can adapte for l2jfrozen?

 

No because Melron is currently working in creating ARTIFICIAL INTELLIGENCE system which will take L2Monsters in another level!.

I'm kidding. Afcourse it can be adapted everywhere. Its up to you.. 

  • 2 years later...
Posted

@melron Hi where can i put this? aCis 384 !

+		if (ChristmasEvent.getInstance().isEnabled() && killer instanceof Player)
+			ChristmasEvent.getInstance().luckySpawn(this, ((Player) killer));
+	

or I can put it to connect with Load ();
em ChristmasEvent.java
sorry for the few words i use google translator.

Posted
23 hours ago, L2VANPER said:

@melron Hi where can i put this? aCis 384 !


+		if (ChristmasEvent.getInstance().isEnabled() && killer instanceof Player)
+			ChristmasEvent.getInstance().luckySpawn(this, ((Player) killer));
+	

or I can put it to connect with Load ();
em ChristmasEvent.java
sorry for the few words i use google translator.

should be in Monster class at method doDie

  • Thanks 1
Posted
23 hours ago, melron said:

should be in Monster class at method doDie

Obrigado já avia conseguido antes da sua resposta quando vi o Codigo Killer pensei mesmo em colocar la
mais aCis 384 Attackable.java

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Dear friends! We are constantly growing and developing, and we are finally ready to offer you the opportunity to integrate advertising across all SOCNET projects! Our service provides the opportunity to place ads on the website socnet.store, in our SMM panel socnet.pro, in Telegram bots socnet.shop and socnet.cc (celebrity bot), as well as in another new (currently secret) project. Each platform provides detailed analytics and information about available ad banners. The document below contains all detailed information in two languages — Russian and English. Here you will find answers to frequently asked questions about exact ad placement locations, integration costs, purchasing process, restrictions, and many other details. The document also contains a table with the current advertising placement queue in our projects. Document with detailed information: https://docs.google.com/document/d/1u4ro3fLkjfyvcp1Eu64rkgQy2Xl5lj87_1W25cVsqPM/edit?usp=sharing Thank you for your attention and support! Sincerely, the SOCNET team. Active project links: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled "Get Trial Bonus" on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends! We are constantly growing and developing, and we are finally ready to offer you the opportunity to integrate advertising across all SOCNET projects! Our service provides the opportunity to place ads on the website socnet.store, in our SMM panel socnet.pro, in Telegram bots socnet.shop and socnet.cc (celebrity bot), as well as in another new (currently secret) project. Each platform provides detailed analytics and information about available ad banners. The document below contains all detailed information in two languages — Russian and English. Here you will find answers to frequently asked questions about exact ad placement locations, integration costs, purchasing process, restrictions, and many other details. The document also contains a table with the current advertising placement queue in our projects. Document with detailed information: https://docs.google.com/document/d/1u4ro3fLkjfyvcp1Eu64rkgQy2Xl5lj87_1W25cVsqPM/edit?usp=sharing Thank you for your attention and support! Sincerely, the SOCNET team. Active project links: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled "Get Trial Bonus" on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends! We are constantly growing and developing, and we are finally ready to offer you the opportunity to integrate advertising across all SOCNET projects! Our service provides the opportunity to place ads on the website socnet.store, in our SMM panel socnet.pro, in Telegram bots socnet.shop and socnet.cc (celebrity bot), as well as in another new (currently secret) project. Each platform provides detailed analytics and information about available ad banners. The document below contains all detailed information in two languages — Russian and English. Here you will find answers to frequently asked questions about exact ad placement locations, integration costs, purchasing process, restrictions, and many other details. The document also contains a table with the current advertising placement queue in our projects. Document with detailed information: https://docs.google.com/document/d/1u4ro3fLkjfyvcp1Eu64rkgQy2Xl5lj87_1W25cVsqPM/edit?usp=sharing Thank you for your attention and support! Sincerely, the SOCNET team. Active project links: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled "Get Trial Bonus" on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Base: L2JServer (2007) Java: 8 MariaDB: 10   Let's get this moving, I hope that with everyone's help in any way we can accomplish something. Any help is welcome, it's been years since I've worked with L2 and I'm slowly getting back into it, I don't have that much experience + let's keep trying. The project is on GitHub, I hope that anyone who wants to contribute will create a fork to send their "possible" contributions, so that everyone on the forum can use it.   Modifications:       Mods:         DOWNLOADS Projeto: Github System: MEDIAFIRE Cliente: Google Driver GeoData: Mediafire
    • Looking for someone who creates custom updaters,dm
  • 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