Safe Piercing stuck at animation

07/17/2016 21:08 Supindahood#1
First of all, regular piercing window works, and Safe Piercing has used to work before as well. I can't recall when it broke. I've tried replacing resource and source files with clean ones but the problem still persists.

The problem is when i place a Suit or Weapon into the piercing window, insert Moonstone and Protect scroll, hit start - It will start to load but then before displaying success or fail it will just get stuck there with the animations and display nothing. I can close the window and continue playing and no materials were lost, and there is nothing in the logs also.

Any ideas where to look for an error?
07/18/2016 01:12 Nortix#2
Debug this function: CItemUpgrade::SmeltSafetyPiercingSize
07/18/2016 08:00 Supindahood#3
Thanks! This solved my problem. Turns out i had removed the penya cost which made it stop working. Thanks for pointing me where to look, I thought I had looked in all related files.

A kind of related question, Im trying to replace piercing weapons with piercing necklaces, I replaced the IK3_ parts in item.cpp and similar files, but it stops like my last problem, except only for necklaces.

Do you know how to enable this?
07/18/2016 12:35 Nortix#4
Same procedure, debug the way of the packet and have a look where it stops. I guess it will stop in CItemElem::IsPierceAble.
07/18/2016 13:55 Supindahood#5
I am not sure how to debug.

This is how my IsPierceAble looks like.

Code:
BOOL CItemElem::IsPierceAble( DWORD dwTargetItemKind3, BOOL bSize )
{
	if( !GetProp() )
		return FALSE;

	int nPiercedSize = GetPiercingSize();
	if( bSize ) // ÇǾî½Ì »çÀÌÁ ´Ã¸®´Â °æ¿ì
		nPiercedSize++;
	
	if( GetProp()->dwItemKind3 == IK3_SUIT )
	{
		if( nPiercedSize <= MAX_PIERCING_SUIT )
		{
			if( dwTargetItemKind3 == NULL_ID )
				return TRUE;
			else if( dwTargetItemKind3 == IK3_SOCKETCARD )
					return TRUE;
		}
	}
	// EDITED
	else if( GetProp()->dwItemKind3 == IK3_NECKLACE )
	{
		if( nPiercedSize <= MAX_PIERCING_WEAPON )
		{
			if( dwTargetItemKind3 == NULL_ID )
				return TRUE;
			else if( dwTargetItemKind3 == IK3_SOCKETCARD2 )
				return TRUE;
		}
	}