MCPcopy Create free account
hub / github.com/diasurgical/devilution / On_SBSPELL

Function On_SBSPELL

Source/msg.cpp:1355–1370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1353}
1354
1355DWORD 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
1372void msg_errorf(const char *pszFmt, ...)
1373{

Callers 1

ParseCmdFunction · 0.85

Calls 1

msg_errorfFunction · 0.85

Tested by

no test coverage detected