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

Function On_SPELLID

Source/msg.cpp:1915–1933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1913}
1914
1915DWORD On_SPELLID(TCmd *pCmd, int pnum)
1916{
1917 TCmdParam3 *p = (TCmdParam3 *)pCmd;
1918
1919 if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) {
1920 if (currlevel != 0 || spelldata[p->wParam2].sTownSpell) {
1921 ClrPlrPath(pnum);
1922 plr[pnum].destAction = ACTION_SPELLMON;
1923 plr[pnum].destParam1 = p->wParam1;
1924 plr[pnum].destParam2 = p->wParam3;
1925 plr[pnum]._pSpell = p->wParam2;
1926 plr[pnum]._pSplType = plr[pnum]._pRSplType;
1927 plr[pnum]._pSplFrom = 0;
1928 } else
1929 msg_errorf("%s has cast an illegal spell.", plr[pnum]._pName);
1930 }
1931
1932 return sizeof(*p);
1933}
1934
1935DWORD On_SPELLPID(TCmd *pCmd, int pnum)
1936{

Callers 1

ParseCmdFunction · 0.85

Calls 2

ClrPlrPathFunction · 0.85
msg_errorfFunction · 0.85

Tested by

no test coverage detected