Ejemplo n.º 1
0
bool VSCheckInstall::checkInstallComplex(bool completeMcf)
{
	if (HasAnyFlags(getItemInfo()->getStatus(), UserCore::Item::ItemInfoI::STATUS_INSTALLCOMPLEX) == false)
		return false;

	UserCore::Item::ItemInfoI* pItem = getItemInfo();
	UserCore::Item::ItemInfoI* pParent = getParentItemInfo();

	if (pParent)
	{		
		if (!pParent->getInstalledModId().isOk() || pParent->getInstalledModId() != pItem->getId())
		{
			if (completeMcf)
				setResult(RES_COMPLETE);
			else
				setResult(RES_DOWNLOADMISSING);

			return true;
		}
	}
	else if (pItem->getInstalledModId().isOk())
	{
		setResult(RES_COMPLETE);
		return true;
	}

	return false;
}
Ejemplo n.º 2
0
bool VSDownloadMissing::checkComplex()
{
	if (HasAnyFlags(getItemInfo()->getStatus(), UserCore::Item::ItemInfoI::STATUS_INSTALLCOMPLEX))
	{
		UserCore::Item::ItemInfoI* par = getParentItemInfo();

		if (par && (!par->getInstalledModId().isOk() || par->getInstalledModId() != getItemId()))
		{		
			setResult(RES_COMPLETE);
		}
		else if (getItemInfo()->getInstalledModId().isOk())
		{
			setResult(RES_COMPLETE);
		}

		return false;
	}

	return true;
}