1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 20:53:50 +00:00

better filters

This commit is contained in:
gugus 2012-03-18 17:58:14 +01:00
parent 8740354c80
commit 34b33b78d2

View file

@ -168,6 +168,14 @@ namespace MWDialogue
if(!selectCompare<int,int>(comp,0,select.i)) return false;
break;
case 40://PC Common Disease
if(!selectCompare<int,int>(comp,0,select.i)) return false;
break;
case 41://PC Blight Disease
if(!selectCompare<int,int>(comp,0,select.i)) return false;
break;
case 43://PC Crime level
if(!selectCompare<int,int>(comp,0,select.i)) return false;
break;
@ -333,15 +341,17 @@ namespace MWDialogue
return true;
case '5'://item
{
MWWorld::Ptr player = mEnvironment.mWorld->getPlayer().getPlayer();
MWWorld::ContainerStore& store = MWWorld::Class::get (player).getContainerStore (player);
Interpreter::Type_Integer sum = 0;
int sum = 0;
for (MWWorld::ContainerStoreIterator iter (store.begin()); iter!=store.end(); ++iter)
if (iter->getCellRef().refID==name)
sum += iter->getRefData().getCount();
if(!selectCompare<int,int>(comp,sum,select.i)) return false;
}
case '7':// not ID
if(select.type==ESM::VT_String ||select.type==ESM::VT_Int)//bug in morrowind here? it's not a short, it's a string