|
|
|
@ -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_None // end marker
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Function function = getFunction();
|
|
|
|
|
|
|
|
|
|
for (int i=0; integerFunctions[i]!=Function_None; ++i)
|
|
|
|
@ -245,14 +251,11 @@ 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
|
|
|
|
@ -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
|
|
|
|
|