| 1716 | } |
| 1717 | |
| 1718 | char GetSBookTrans(int ii, BOOL townok) |
| 1719 | { |
| 1720 | char st; |
| 1721 | |
| 1722 | st = RSPLTYPE_SPELL; |
| 1723 | if (plr[myplr]._pISpells & (__int64)1 << (ii - 1)) { |
| 1724 | st = RSPLTYPE_CHARGES; |
| 1725 | } |
| 1726 | if (plr[myplr]._pAblSpells & 1 << (ii - 1)) { /// BUGFIX: missing (__int64) |
| 1727 | st = RSPLTYPE_SKILL; |
| 1728 | } |
| 1729 | if (st == RSPLTYPE_SPELL) { |
| 1730 | if (!CheckSpell(myplr, ii, RSPLTYPE_SPELL, TRUE)) { |
| 1731 | st = RSPLTYPE_INVALID; |
| 1732 | } |
| 1733 | if ((char)(plr[myplr]._pSplLvl[ii] + plr[myplr]._pISplLvlAdd) <= 0) { |
| 1734 | st = RSPLTYPE_INVALID; |
| 1735 | } |
| 1736 | } |
| 1737 | if (townok && currlevel == 0 && st != RSPLTYPE_INVALID && !spelldata[ii].sTownSpell) { |
| 1738 | st = RSPLTYPE_INVALID; |
| 1739 | } |
| 1740 | |
| 1741 | return st; |
| 1742 | } |
| 1743 | |
| 1744 | void DrawSpellBook() |
| 1745 | { |
no test coverage detected