| 1604 | } |
| 1605 | |
| 1606 | void GameMode::refreshSpellButtonCoolDowns() |
| 1607 | { |
| 1608 | Player* player = mGameMap->getLocalPlayer(); |
| 1609 | if (player == nullptr) |
| 1610 | { |
| 1611 | OD_LOG_ERR("No local player"); |
| 1612 | return; |
| 1613 | } |
| 1614 | |
| 1615 | // We show/hide each icon depending on available skills |
| 1616 | SkillManager::listAllSpellsProgressBars([this, player](SpellType spellType, const std::string& castProgressBarName) |
| 1617 | { |
| 1618 | CEGUI::ProgressBar* progressBar = static_cast<CEGUI::ProgressBar*>(mRootWindow->getChild(castProgressBarName)); |
| 1619 | float progress = player->getSpellCooldownSmooth(spellType); |
| 1620 | if (progress > 0.0) |
| 1621 | { |
| 1622 | progressBar->show(); |
| 1623 | progressBar->setProgress(progress); |
| 1624 | } |
| 1625 | else |
| 1626 | { |
| 1627 | progressBar->hide(); |
| 1628 | } |
| 1629 | }); |
| 1630 | } |
| 1631 | |
| 1632 | void GameMode::selectSquaredTiles(int tileX1, int tileY1, int tileX2, int tileY2) |
| 1633 | { |
nothing calls this directly
no test coverage detected