int CLuckyCoin::GetCoinPos(LPOBJ lpObj)
{
	for (int i=12;i<MAIN_INVENTORY_SIZE;i++)
	{
		if( lpObj->pInventory[i].IsItem() == true )
		{
			if ( lpObj->pInventory[i].m_Type == ITEMGET(14,100) )
			{
				int op = (int)lpObj->pInventory[i].m_Durability;

				if ( ITEM_DUR_RANGE(op) != FALSE)
				{
					return i;
				}
			}
		}
	}
	return -1;
}
示例#2
0
int CCastleSiegeSync::CheckOverlapCsMarks(int iIndex)
{
	for ( int x=INVENTORY_BAG_START;x<ReadConfig.MAIN_INVENTORY_SIZE(iIndex,false);x++)
	{
		if ( gObj[iIndex].pInventory[x].IsItem() == TRUE )
		{
			if ( gObj[iIndex].pInventory[x].m_Type == ITEMGET(14,21) )
			{
				if ( gObj[iIndex].pInventory[x].m_Level == 3 )
				{
					int op = gObj[iIndex].pInventory[x].m_Durability;

					if ( ITEM_DUR_RANGE(op) != FALSE)
					{
						return x;
					}
				}
			}
		}
	}

	return -1;
}