Returns the number of locked items of the current type
| 186 | |
| 187 | // Returns the number of locked items of the current type |
| 188 | int CWorldObjectsGenericDialog::CountLockedItems() { |
| 189 | int lock_count = 0; |
| 190 | int first, n; |
| 191 | |
| 192 | first = n = GetObjectID(m_type); |
| 193 | |
| 194 | if (first == -1) |
| 195 | return 0; |
| 196 | |
| 197 | do { |
| 198 | if (IsLocked(n)) |
| 199 | lock_count++; |
| 200 | n = GetNextObjectID(n); |
| 201 | } while (n != first); |
| 202 | |
| 203 | return lock_count; |
| 204 | } |
| 205 | |
| 206 | #define NULL_NAME "<none>" |
| 207 |
nothing calls this directly
no test coverage detected