1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

spellbook fix pages

This commit is contained in:
Laserlicht
2024-01-01 14:57:55 +01:00
committed by GitHub
parent 4cd910a4ce
commit 9066dbcbd4

View File

@@ -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;
}
}
}