mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
spellbook fix pages
This commit is contained in:
parent
4cd910a4ce
commit
9066dbcbd4
@ -322,10 +322,10 @@ void CSpellWindow::processSpells()
|
|||||||
sitesPerTabAdv[v] = 1;
|
sitesPerTabAdv[v] = 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((sitesPerTabAdv[v] - spellsPerPage - 2) % spellsPerPage == 0)
|
if((sitesPerTabAdv[v] - (spellsPerPage - 2)) % spellsPerPage == 0)
|
||||||
sitesPerTabAdv[v] = (sitesPerTabAdv[v] - spellsPerPage - 2) / spellsPerPage + 1;
|
sitesPerTabAdv[v] = (sitesPerTabAdv[v] - (spellsPerPage - 2)) / spellsPerPage + 1;
|
||||||
else
|
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;
|
sitesPerTabBattle[v] = 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((sitesPerTabBattle[v] - spellsPerPage - 2) % spellsPerPage == 0)
|
if((sitesPerTabBattle[v] - (spellsPerPage - 2)) % spellsPerPage == 0)
|
||||||
sitesPerTabBattle[v] = (sitesPerTabBattle[v] - spellsPerPage - 2) / spellsPerPage + 1;
|
sitesPerTabBattle[v] = (sitesPerTabBattle[v] - (spellsPerPage - 2)) / spellsPerPage + 1;
|
||||||
else
|
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