QTfrontend/selectWeapon.cpp
changeset 2371 a20b6e26044b
parent 2369 c3eb11f1ab3a
child 2377 f3fab2b09e0c
equal deleted inserted replaced
2370:2ff8fce5e06f 2371:a20b6e26044b
   155 	QString state1;
   155 	QString state1;
   156 	QString state2;
   156 	QString state2;
   157 	
   157 	
   158 	for(int i = 0; i < m_numItems; ++i) {
   158 	for(int i = 0; i < m_numItems; ++i) {
   159 		twi::const_iterator it = weaponItems.find(i);
   159 		twi::const_iterator it = weaponItems.find(i);
   160 		int num = it == weaponItems.end() ? 0 : it.value()[0]->getItemsNum();
   160 		int num = it == weaponItems.end() ? 9 : it.value()[0]->getItemsNum(); // 9 is for 'skip turn'
   161 		state1.append(QString::number(num));
   161 		state1.append(QString::number(num));
   162 		int prob = it == weaponItems.end() ? 0 : it.value()[1]->getItemsNum();
   162 		int prob = it == weaponItems.end() ? 0 : it.value()[1]->getItemsNum();
   163 		state2.append(QString::number(prob));
   163 		state2.append(QString::number(prob));
   164 	}
   164 	}
   165 	if (curWeaponsName != "") {
   165 	if (curWeaponsName != "") {