| 1353 | } |
| 1354 | |
| 1355 | DWORD On_SBSPELL(TCmd *pCmd, int pnum) |
| 1356 | { |
| 1357 | TCmdParam1 *p = (TCmdParam1 *)pCmd; |
| 1358 | |
| 1359 | if (gbBufferMsgs != 1) { |
| 1360 | if (currlevel != 0 || spelldata[p->wParam1].sTownSpell) { |
| 1361 | plr[pnum]._pSpell = p->wParam1; |
| 1362 | plr[pnum]._pSplType = plr[pnum]._pSBkSplType; |
| 1363 | plr[pnum]._pSplFrom = 1; |
| 1364 | plr[pnum].destAction = ACTION_SPELL; |
| 1365 | } else |
| 1366 | msg_errorf("%s has cast an illegal spell.", plr[pnum]._pName); |
| 1367 | } |
| 1368 | |
| 1369 | return sizeof(*p); |
| 1370 | } |
| 1371 | |
| 1372 | void msg_errorf(const char *pszFmt, ...) |
| 1373 | { |
no test coverage detected