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

Function On_TSPELLPID

Source/msg.cpp:1975–1993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1973}
1974
1975DWORD On_TSPELLPID(TCmd *pCmd, int pnum)
1976{
1977 TCmdParam3 *p = (TCmdParam3 *)pCmd;
1978
1979 if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) {
1980 if (currlevel != 0 || spelldata[p->wParam2].sTownSpell) {
1981 ClrPlrPath(pnum);
1982 plr[pnum].destAction = ACTION_SPELLPLR;
1983 plr[pnum].destParam1 = p->wParam1;
1984 plr[pnum].destParam2 = p->wParam3;
1985 plr[pnum]._pSpell = p->wParam2;
1986 plr[pnum]._pSplType = plr[pnum]._pTSplType;
1987 plr[pnum]._pSplFrom = 2;
1988 } else
1989 msg_errorf("%s has cast an illegal spell.", plr[pnum]._pName);
1990 }
1991
1992 return sizeof(*p);
1993}
1994
1995DWORD On_KNOCKBACK(TCmd *pCmd, int pnum)
1996{

Callers 1

ParseCmdFunction · 0.85

Calls 2

ClrPlrPathFunction · 0.85
msg_errorfFunction · 0.85

Tested by

no test coverage detected