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

Function On_SPELLPID

Source/msg.cpp:1935–1953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1933}
1934
1935DWORD On_SPELLPID(TCmd *pCmd, int pnum)
1936{
1937 TCmdParam3 *p = (TCmdParam3 *)pCmd;
1938
1939 if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) {
1940 if (currlevel != 0 || spelldata[p->wParam2].sTownSpell) {
1941 ClrPlrPath(pnum);
1942 plr[pnum].destAction = ACTION_SPELLPLR;
1943 plr[pnum].destParam1 = p->wParam1;
1944 plr[pnum].destParam2 = p->wParam3;
1945 plr[pnum]._pSpell = p->wParam2;
1946 plr[pnum]._pSplType = plr[pnum]._pRSplType;
1947 plr[pnum]._pSplFrom = 0;
1948 } else
1949 msg_errorf("%s has cast an illegal spell.", plr[pnum]._pName);
1950 }
1951
1952 return sizeof(*p);
1953}
1954
1955DWORD On_TSPELLID(TCmd *pCmd, int pnum)
1956{

Callers 1

ParseCmdFunction · 0.85

Calls 2

ClrPlrPathFunction · 0.85
msg_errorfFunction · 0.85

Tested by

no test coverage detected