| 1832 | } |
| 1833 | |
| 1834 | void CheckSBook() |
| 1835 | { |
| 1836 | int sn; |
| 1837 | char st; |
| 1838 | unsigned __int64 spl; |
| 1839 | |
| 1840 | if (MouseX >= RIGHT_PANEL + 11 && MouseX < RIGHT_PANEL + 48 && MouseY >= 18 && MouseY < 314) { |
| 1841 | spl = plr[myplr]._pMemSpells | plr[myplr]._pISpells | plr[myplr]._pAblSpells; |
| 1842 | sn = SpellPages[sbooktab][(MouseY - 18) / 43]; |
| 1843 | if (sn != -1 && spl & (__int64)1 << (sn - 1)) { |
| 1844 | st = RSPLTYPE_SPELL; |
| 1845 | if (plr[myplr]._pISpells & (__int64)1 << (sn - 1)) { |
| 1846 | st = RSPLTYPE_CHARGES; |
| 1847 | } |
| 1848 | if (plr[myplr]._pAblSpells & (__int64)1 << (sn - 1)) { |
| 1849 | st = RSPLTYPE_SKILL; |
| 1850 | } |
| 1851 | plr[myplr]._pRSpell = sn; |
| 1852 | plr[myplr]._pRSplType = st; |
| 1853 | force_redraw = 255; |
| 1854 | } |
| 1855 | } |
| 1856 | if (MouseX >= RIGHT_PANEL + 7 && MouseX < RIGHT_PANEL + 311 && MouseY >= SPANEL_WIDTH && MouseY < 349) { /// BUGFIX: change `< 313` to `< 311` (fixed) |
| 1857 | sbooktab = (MouseX - (RIGHT_PANEL + 7)) / 76; |
| 1858 | } |
| 1859 | } |
| 1860 | |
| 1861 | char *get_pieces_str(int nGold) |
| 1862 | { |