本文整理汇总了C++中CCard::getSet方法的典型用法代码示例。如果您正苦于以下问题:C++ CCard::getSet方法的具体用法?C++ CCard::getSet怎么用?C++ CCard::getSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCard
的用法示例。
在下文中一共展示了CCard::getSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkCard
bool CCardFilterParameters::checkCard(const CCard &card, int &num) const
{
if (mIsCompletionEnabled)
{
switch (card.getSet())
{
case EEnclaveSet: num = qMax(num, mComplement[1]); break;
case ENexusSet: num = qMax(num, mComplement[2]); break;
case EBlightSet: num = qMax(num, mComplement[3]); break;
case EPuritySet: num = qMax(num, mComplement[4]); break;
case EHomeWorldSet: num = qMax(num, mComplement[5]); break;
case EPhobosSet: num = qMax(num, mComplement[6]); break;
case EPhobosAftermathSet: num = qMax(num, mComplement[7]); break;
case EAwakeningSet: num = qMax(num, mComplement[8]); break;
case ETerminusSet: num = qMax(num, mComplement[9]); break;
case EOccupationSet: num = qMax(num, mComplement[10]); break;
case EWorldshipSet: num = qMax(num, mComplement[11]); break;
case EFlashpointSet: num = qMax(num, mComplement[12]); break;
case EStandardSet: num = qMax(num, mComplement[0]); break;
case ERewardSet: num = qMax(num, mComplement[13]); break;
case EPromotionalSet: num = qMax(num, mComplement[14]); break;
case EUpgradedSet: num = qMax(num, mComplement[15]); break;
default: break;
}
}
if (mIsBlackListEnabled)
{
if (mBlackList.contains(card.getName()))
{
return false;
}
}
if (mIsBlockListEnabled)
{
QHash<QString, int>::const_iterator iBlock = mBlockList.find(card.getName());
if (iBlock != mBlockList.end())
{
num = qMax(0, num - iBlock.value());
}
if (num < 1)
{
return false;
}
}
if (mIsWhiteListEnabled)
{
if (mWhiteList.contains(card.getName()))
{
return true;
}
}
if (mIsFilterOptionEnabled)
{
bool passRarity(true);
switch (card.getType())
{
case EAssaultType:
switch (card.getRarity())
{
case ECommonRarity: passRarity = mIsAssaultAllowed[3]; break;
case EUncommonRarity: passRarity = mIsAssaultAllowed[2]; break;
case ERareRarity: passRarity = mIsAssaultAllowed[1]; break;
case ELegendaryRarity: passRarity = mIsAssaultAllowed[0]; break;
default: break;
}
break;
case ECommanderType:
switch (card.getRarity())
{
case ECommonRarity: passRarity = mIsCommanderAllowed[3]; break;
case EUncommonRarity: passRarity = mIsCommanderAllowed[2]; break;
case ERareRarity: passRarity = mIsCommanderAllowed[1]; break;
case ELegendaryRarity: passRarity = mIsCommanderAllowed[0]; break;
default: break;
}
break;
case EStructureType:
switch (card.getRarity())
{
case ECommonRarity: passRarity = mIsStructureAllowed[3]; break;
case EUncommonRarity: passRarity = mIsStructureAllowed[2]; break;
case ERareRarity: passRarity = mIsStructureAllowed[1]; break;
case ELegendaryRarity: passRarity = mIsStructureAllowed[0]; break;
default: break;
}
break;
case EActionType:
switch (card.getRarity())
{
case ECommonRarity: passRarity = mIsActionAllowed[3]; break;
case EUncommonRarity: passRarity = mIsActionAllowed[2]; break;
case ERareRarity: passRarity = mIsActionAllowed[1]; break;
case ELegendaryRarity: passRarity = mIsActionAllowed[0]; break;
default: break;
}
break;
//.........这里部分代码省略.........