Jump to content

Recommended Posts

  • Premium

Hi devs !

I have 2 little requests:

1. How can I do to solve next BUG on Tranmustation system:

  • equip weapon with transmutation -> OK
  • equip weapon skin -> OK
  • unequip weapon skin -> weapon become original skin of weapon, not tranmutated

2. Which bugs must be checked before these releasing systems on live game server? 

Thank you all !

Link to comment
https://metin2.dev/topic/17590-costume-weapon-transmutation/
Share on other sites

  • Premium

Preview to understand much better what I mean:

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

Edited by Metin2 Dev
Core X - External 2 Internal

It's from item.cpp.

This case : https://metin2.download/picture/rNPEFWZ2cyqHse2L9AIDu9BMuYaYuEZH/.png

You need to adapt this : "m_pOwner->SetPart" for your version of transmutation system.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Premium

I've expected that, but it looks good...

		case ITEM_WEAPON:
			{
#ifdef __WEAPON_COSTUME_SYSTEM__
				if (m_pOwner->GetWear(WEAR_COSTUME_WEAPON) != 0)
					break;
#endif
				if (bAdd)
				{
					if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
					{
#ifdef __CHANGELOOK_SYSTEM__
						DWORD dwRes = GetTransmutation() != 0 ? GetTransmutation() : GetVnum();
						m_pOwner->SetPart(PART_WEAPON, dwRes);
#else
						m_pOwner->SetPart(PART_WEAPON, GetVnum());
#endif
					}
				}
				else
				{
					if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
#ifdef __WEAPON_COSTUME_SYSTEM__
						m_pOwner->SetPart(PART_WEAPON, 0);
#else
						m_pOwner->SetPart(PART_WEAPON, m_pOwner->GetOriginalPart(PART_WEAPON));
#endif
				}
			}
			break;

 

  • Premium

Thanks for nothing this time.

Solved myself editing item.cpp like this:

#if defined __WEAPON_COSTUME_SYSTEM__ && !defined __CHANGELOOK_SYSTEM__
				else if (GetSubType() == COSTUME_WEAPON)
				{
					toSetPart = PART_WEAPON;
					if (!bAdd)
					{
						const CItem* pWeapon = m_pOwner->GetWear(WEAR_WEAPON);
						toSetValue = (NULL != pWeapon) ? pWeapon->GetVnum() : m_pOwner->GetPart(PART_WEAPON);						
					}
				}
#endif
#if defined __WEAPON_COSTUME_SYSTEM__ && defined __CHANGELOOK_SYSTEM__
				else if (GetSubType() == COSTUME_WEAPON)
				{		

					toSetPart = PART_WEAPON;
					if (!bAdd)
					{
						const CItem* pWeapon = m_pOwner->GetWear(WEAR_WEAPON);
						if(NULL != pWeapon)
						{
							if(pWeapon->GetTransmutation() != 0)
								toSetValue = pWeapon->GetTransmutation();
							else
								toSetValue = pWeapon->GetVnum();
						}
					}
				}
#endif

 

  • Love 2

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.