| 79 | } |
| 80 | |
| 81 | BOOL CheckSpell(int id, int sn, char st, BOOL manaonly) |
| 82 | { |
| 83 | BOOL result; |
| 84 | |
| 85 | #ifdef _DEBUG |
| 86 | if (debug_mode_key_inverted_v) |
| 87 | return TRUE; |
| 88 | #endif |
| 89 | |
| 90 | result = TRUE; |
| 91 | if (!manaonly && pcurs != 1) { |
| 92 | result = FALSE; |
| 93 | } else { |
| 94 | if (st != RSPLTYPE_SKILL) { |
| 95 | if (GetSpellLevel(id, sn) <= 0) { |
| 96 | result = FALSE; |
| 97 | } else { |
| 98 | result = plr[id]._pMana >= GetManaAmount(id, sn); |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | return result; |
| 104 | } |
| 105 | |
| 106 | void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, int caster, int spllvl) |
| 107 | { |
no test coverage detected