mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-01 12:57:51 +02:00
Merge pull request #227 from Chocimier/book
Prevent flipping empty spellbook
This commit is contained in:
commit
a92e820eb4
@ -224,7 +224,7 @@ CSpellWindow::CSpellWindow(const SDL_Rect &, const CGHeroInstance * _myHero, CPl
|
||||
currentPage = battleSpellsOnly ? myInt->spellbookSettings.spellbookLastPageBattle : myInt->spellbookSettings.spellbokLastPageAdvmap;
|
||||
|
||||
// spellbook last page battle index is not reset after battle, so this needs to stay here
|
||||
vstd::abetween(currentPage, 0, pagesWithinCurrentTab() - 1);
|
||||
vstd::abetween(currentPage, 0, std::max(0, pagesWithinCurrentTab() - 1));
|
||||
|
||||
computeSpellsPerArea();
|
||||
addUsedEvents(KEYBOARD);
|
||||
|
Loading…
x
Reference in New Issue
Block a user