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

Function On_SPELLXYD

Source/msg.cpp:1752–1772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1750}
1751
1752DWORD On_SPELLXYD(TCmd *pCmd, int pnum)
1753{
1754 TCmdLocParam3 *p = (TCmdLocParam3 *)pCmd;
1755
1756 if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) {
1757 if (currlevel != 0 || spelldata[p->wParam1].sTownSpell) {
1758 ClrPlrPath(pnum);
1759 plr[pnum].destAction = ACTION_SPELLWALL;
1760 plr[pnum].destParam1 = p->x;
1761 plr[pnum].destParam2 = p->y;
1762 plr[pnum].destParam3 = p->wParam2;
1763 plr[pnum].destParam4 = p->wParam3;
1764 plr[pnum]._pSpell = p->wParam1;
1765 plr[pnum]._pSplType = plr[pnum]._pRSplType;
1766 plr[pnum]._pSplFrom = 0;
1767 } else
1768 msg_errorf("%s has cast an illegal spell.", plr[pnum]._pName);
1769 }
1770
1771 return sizeof(*p);
1772}
1773
1774DWORD On_SPELLXY(TCmd *pCmd, int pnum)
1775{

Callers 1

ParseCmdFunction · 0.85

Calls 2

ClrPlrPathFunction · 0.85
msg_errorfFunction · 0.85

Tested by

no test coverage detected