Jump to content

Costume Weapon & Transmutation


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
Share on other sites

  • 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;

 

Link to comment
Share on other sites

  • 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
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.