equal
deleted
inserted
replaced
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 != "") { |