Jump to content

Fixed Bonus and Stones if EQ is Equipped


Recommended Posts

Hello Guys,

 

i want to share my char_item.cpp with you,

In my Version the Bonus Add & Bonus Change is fixed,

removing Stones from Armor or Weapon if Equipped  is fixxed too.

 

I removed the Effect from China Firework too (30% Stun)

 

maybe it helps someone :)

 

regards,

killa673 // [sA]Tears aka. [blackBite] @ EPVP

 

PS: for those which changed much Things on the char_item.cpp:

 

to block the extraction of Stones from Equipped EQ search for:

					case USE_DETACHMENT:
						{
							LPITEM item2;

							if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
								return false;

							if (item2->IsExchanging())
								return false;

and add under

							if (item2->IsExchanging())
								return false;
							if (item2->IsEquipped())
								return false;

so it should look like this:

					case USE_DETACHMENT:
						{
							LPITEM item2;

				if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
								return false;

							if (item2->IsExchanging())
								return false;
								
							if (item2->IsEquipped())
								return false;
  • Love 1
Link to comment
https://metin2.dev/topic/2767-fixed-bonus-and-stones-if-eq-is-equipped/
Share on other sites

  • Premium

This file have 7k lines. But i compare it with my own.

You didn't make hudge fixes... Also you removed stun really bad because you removed effect too.

ZheLc.png

Anyway thanks for release! Some of members can use it.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Honorable Member

  • I don't like the fact you separated both checks, but it's irrelevant.

    syErtXM.png

    Put and removed antiwar stone+4 thrice. Now, (w/o fixing it) we'll have a player with 75% (25*3) against warriors even though the item has no stone.

    `remove stones` scrolls (25100, 71109), 6-7 add/change bonuses (71051, 71052) et similia are all still vulnerable.

    To make it simple:

    You just need to replace `if (item2->IsExchanging())` with `if (item2->IsExchanging() || item2->IsEquipped())`.

    char_item.cpp (12 hits)
    ### CHANGE THOSE ONES BELOW
    	Line 1953: 				if (item2->IsExchanging())
    	Line 3480: 									if (item2->IsExchanging() == true)
    	Line 3843: 									if (item2->IsExchanging() == true)
    	Line 3890: 									if (item2->IsExchanging() == true)
    	Line 4437: 							if (item2->IsExchanging())
    	Line 4493: 							if (item2->IsExchanging())
    	Line 4996: 				if (item2->IsExchanging())
    ### DO NOT CHANGE THOSE ONES BELOW
    	Line 5169: 	if (item->IsExchanging())
    	Line 5360: 	if (item->IsExchanging())
    	Line 5499: 	if (item->IsExchanging())
    	Line 6031: 	if (item->IsExchanging())
    	Line 6620: 	if (item && !item->IsExchanging())
    

    My post on epvp for who will need.
  • You also commented the EffectPacket(SE_CHINA_FIREWORK); removing the spinning top on the ground effect.

Edited by Metin2 Dev
Core X - External 2 Internal

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.