mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
spellbook fix pages
This commit is contained in:
parent
4cd910a4ce
commit
9066dbcbd4
@ -322,10 +322,10 @@ void CSpellWindow::processSpells()
|
||||
sitesPerTabAdv[v] = 1;
|
||||
else
|
||||
{
|
||||
if((sitesPerTabAdv[v] - spellsPerPage - 2) % spellsPerPage == 0)
|
||||
sitesPerTabAdv[v] = (sitesPerTabAdv[v] - spellsPerPage - 2) / spellsPerPage + 1;
|
||||
if((sitesPerTabAdv[v] - (spellsPerPage - 2)) % spellsPerPage == 0)
|
||||
sitesPerTabAdv[v] = (sitesPerTabAdv[v] - (spellsPerPage - 2)) / spellsPerPage + 1;
|
||||
else
|
||||
sitesPerTabAdv[v] = (sitesPerTabAdv[v] - spellsPerPage - 2) / spellsPerPage + 2;
|
||||
sitesPerTabAdv[v] = (sitesPerTabAdv[v] - (spellsPerPage - 2)) / spellsPerPage + 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -340,10 +340,10 @@ void CSpellWindow::processSpells()
|
||||
sitesPerTabBattle[v] = 1;
|
||||
else
|
||||
{
|
||||
if((sitesPerTabBattle[v] - spellsPerPage - 2) % spellsPerPage == 0)
|
||||
sitesPerTabBattle[v] = (sitesPerTabBattle[v] - spellsPerPage - 2) / spellsPerPage + 1;
|
||||
if((sitesPerTabBattle[v] - (spellsPerPage - 2)) % spellsPerPage == 0)
|
||||
sitesPerTabBattle[v] = (sitesPerTabBattle[v] - (spellsPerPage - 2)) / spellsPerPage + 1;
|
||||
else
|
||||
sitesPerTabBattle[v] = (sitesPerTabBattle[v] - spellsPerPage - 2) / spellsPerPage + 2;
|
||||
sitesPerTabBattle[v] = (sitesPerTabBattle[v] - (spellsPerPage - 2)) / spellsPerPage + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user