Jump to content

[Share] Java Reflect Damage Bug


Recommended Posts

I searched the whole forum and I didn't find a share fixing this bug and since I am currently working in a server pack that this bug works, I share the java code I inserted in order to fix it.

 

Changes :

Once you've added this code in your source and you have compiled the pack, you will notice that you may not PK a flagged character anymore because of the Reflect Damage and daggers cannot get double killed resulting to buff loss. That means a character's CP will be decreased while hitting, but his HP will be increased, draining the enemy's HP.

 

Screenshot [before adding the code] :

reflec11.jpg

 

Screenshot [After adding the code] :

reflec12.jpg

 

 

Index: java/net/sf/l2j/gameserver/model/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/L2Character.java	(revision 1434)
+++ java/net/sf/l2j/gameserver/model/L2Character.java	(working copy)
@@ -5044,7 +5044,7 @@
					if (reflectPercent > 0)
					{
						reflectedDamage = (int)(reflectPercent / 100. * damage);
-						damage -= reflectedDamage;
+						//damage -= reflectedDamage;

						if(reflectedDamage > target.getMaxHp()) // While hitting a low level character the reflect damage is increased.
							reflectedDamage = target.getMaxHp();

 

* Credits To: Kazeno

* Tested By: Tristana

Link to comment
Share on other sites

Hey Kazeno, Can you explain how can i put Reflect Damage in one NPC? I know that isnt your post, but i think that have a relation. I have a problem with my NPCs and i would like to return the dmg to the players that try to hurt a NPC.

 

Tks!

Link to comment
Share on other sites

plz stop with stiuped shares. everyone can found this at l2jserver TIMELINE .... every day team make lot of changes in pack! and so..? u must post it here?

 

please guys dont post bulsh1ts, above the spam ....

Link to comment
Share on other sites

plz stop with stiuped shares. everyone can found this at l2jserver TIMELINE .... every day team make lot of changes in pack! and so..? u must post it here?

 

please guys dont post bulsh1ts, above the spam ....

agree 100%......

this is the bulshits shares..

which change kazeno?

which is the change that you make?

i'm 100% sure if i search i found it to another forum...

i'll reply soon

Link to comment
Share on other sites

agree 100%......

this is the bulshits shares..

which change kazeno?

which is the change that you make?

i'm 100% sure if i search i found it to another forum...

i'll reply soon

 

this is not the reason man, the reason is

 

cant cal it share, cause is a small core modifircation ... if u go at pack forum every day will get more than 5 modification ... so? we must post it here?

Link to comment
Share on other sites

Guys relax.That could be usefull for many ppl.Take it easy and instead of flaming,thank kazeno.

 

Though i dont understand what this would fix.You are just removing a line..more info?And what's that bug?

Link to comment
Share on other sites

What i understand from this code:

 

No more reflect damage for life.What i mean?You get reflect but ONLY at cp.That's fixing the bugs with reflect..indeed..BUT,it's destroying the reflect effect.

Link to comment
Share on other sites

plz stop with stiuped shares. everyone can found this at l2jserver TIMELINE .... every day team make lot of changes in pack! and so..? u must post it here?

 

please guys dont post bulsh1ts, above the spam ....

 

xmmm i agree he shouldnt post all the changes "they" make..(he could just give a link)..anyway

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...