| 199 | } |
| 200 | |
| 201 | void AbilityRegion::update() |
| 202 | { |
| 203 | m_items.clear(); |
| 204 | m_dirty = true; |
| 205 | |
| 206 | if (mx * my == 0) |
| 207 | return; |
| 208 | |
| 209 | const unsigned int max_abilities = min(get_max_slots(), mx*my); |
| 210 | |
| 211 | vector<talent> talents = your_talents(true); |
| 212 | if (talents.empty()) |
| 213 | return; |
| 214 | |
| 215 | vector<InventoryTile> m_invoc; |
| 216 | |
| 217 | for (const auto &talent : talents) |
| 218 | { |
| 219 | if (talent.is_invocation) |
| 220 | m_invoc.push_back(_tile_for_ability(talent.which)); |
| 221 | else |
| 222 | m_items.push_back(_tile_for_ability(talent.which)); |
| 223 | |
| 224 | if (m_items.size() >= max_abilities) |
| 225 | return; |
| 226 | } |
| 227 | |
| 228 | for (const auto &tile : m_invoc) |
| 229 | { |
| 230 | m_items.push_back(tile); |
| 231 | if (m_items.size() >= max_abilities) |
| 232 | return; |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | #endif |
nothing calls this directly
no test coverage detected