|
|
|
@ -117,7 +117,7 @@ MWDialogue::SelectWrapper::Function MWDialogue::SelectWrapper::getFunction() con
|
|
|
|
|
case '9': return Function_NotClass;
|
|
|
|
|
case 'A': return Function_NotRace;
|
|
|
|
|
case 'B': return Function_NotCell;
|
|
|
|
|
case 'C': return Function_Local;
|
|
|
|
|
case 'C': return Function_NotLocal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Function_None;
|
|
|
|
@ -219,7 +219,6 @@ MWDialogue::SelectWrapper::Type MWDialogue::SelectWrapper::getType() const
|
|
|
|
|
static const Function booleanFunctions[] =
|
|
|
|
|
{
|
|
|
|
|
Function_False,
|
|
|
|
|
Function_NotId, Function_NotFaction, Function_NotClass, Function_NotRace, Function_NotCell,
|
|
|
|
|
Function_SameGender, Function_SameRace, Function_SameFaction,
|
|
|
|
|
Function_PcCommonDisease, Function_PcBlightDisease, Function_PcCorprus,
|
|
|
|
|
Function_PcExpelled,
|
|
|
|
@ -231,6 +230,13 @@ MWDialogue::SelectWrapper::Type MWDialogue::SelectWrapper::getType() const
|
|
|
|
|
Function_None // end marker
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const Function invertedBooleanFunctions[] =
|
|
|
|
|
{
|
|
|
|
|
Function_NotId, Function_NotFaction, Function_NotClass,
|
|
|
|
|
Function_NotRace, Function_NotCell, Function_NotLocal,
|
|
|
|
|
Function_None // end marker
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Function function = getFunction();
|
|
|
|
|
|
|
|
|
|
for (int i=0; integerFunctions[i]!=Function_None; ++i)
|
|
|
|
@ -245,21 +251,18 @@ MWDialogue::SelectWrapper::Type MWDialogue::SelectWrapper::getType() const
|
|
|
|
|
if (booleanFunctions[i]==function)
|
|
|
|
|
return Type_Boolean;
|
|
|
|
|
|
|
|
|
|
return Type_None;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MWDialogue::SelectWrapper::isInverted() const
|
|
|
|
|
{
|
|
|
|
|
char type = mSelect.mSelectRule[1];
|
|
|
|
|
for (int i=0; invertedBooleanFunctions[i]!=Function_None; ++i)
|
|
|
|
|
if (invertedBooleanFunctions[i]==function)
|
|
|
|
|
return Type_Inverted;
|
|
|
|
|
|
|
|
|
|
return type=='7' || type=='8' || type=='9' || type=='A' || type=='B' || type=='C';
|
|
|
|
|
return Type_None;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MWDialogue::SelectWrapper::isNpcOnly() const
|
|
|
|
|
{
|
|
|
|
|
static const Function functions[] =
|
|
|
|
|
{
|
|
|
|
|
Function_NotFaction, SelectWrapper::Function_NotClass, SelectWrapper::Function_NotRace,
|
|
|
|
|
Function_NotFaction, Function_NotClass, Function_NotRace,
|
|
|
|
|
Function_SameGender, Function_SameRace, Function_SameFaction,
|
|
|
|
|
Function_PcSkill,
|
|
|
|
|
Function_PcExpelled,
|
|
|
|
@ -283,17 +286,17 @@ bool MWDialogue::SelectWrapper::isNpcOnly() const
|
|
|
|
|
|
|
|
|
|
bool MWDialogue::SelectWrapper::selectCompare (int value) const
|
|
|
|
|
{
|
|
|
|
|
return selectCompareImp (mSelect, value)!=isInverted(); // logic XOR
|
|
|
|
|
return selectCompareImp (mSelect, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MWDialogue::SelectWrapper::selectCompare (float value) const
|
|
|
|
|
{
|
|
|
|
|
return selectCompareImp (mSelect, value)!=isInverted(); // logic XOR
|
|
|
|
|
return selectCompareImp (mSelect, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MWDialogue::SelectWrapper::selectCompare (bool value) const
|
|
|
|
|
{
|
|
|
|
|
return selectCompareImp (mSelect, static_cast<int> (value))!=isInverted(); // logic XOR
|
|
|
|
|
return selectCompareImp (mSelect, static_cast<int> (value));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string MWDialogue::SelectWrapper::getName() const
|
|
|
|
|