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

Function On_TSPELLXY

Source/msg.cpp:1795–1814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1793}
1794
1795DWORD On_TSPELLXY(TCmd *pCmd, int pnum)
1796{
1797 TCmdLocParam2 *p = (TCmdLocParam2 *)pCmd;
1798
1799 if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) {
1800 if (currlevel != 0 || spelldata[p->wParam1].sTownSpell) {
1801 ClrPlrPath(pnum);
1802 plr[pnum].destAction = ACTION_SPELL;
1803 plr[pnum].destParam1 = p->x;
1804 plr[pnum].destParam2 = p->y;
1805 plr[pnum].destParam3 = p->wParam2;
1806 plr[pnum]._pSpell = p->wParam1;
1807 plr[pnum]._pSplType = plr[pnum]._pTSplType;
1808 plr[pnum]._pSplFrom = 2;
1809 } else
1810 msg_errorf("%s has cast an illegal spell.", plr[pnum]._pName);
1811 }
1812
1813 return sizeof(*p);
1814}
1815
1816DWORD On_OPOBJXY(TCmd *pCmd, int pnum)
1817{

Callers 1

ParseCmdFunction · 0.85

Calls 2

ClrPlrPathFunction · 0.85
msg_errorfFunction · 0.85

Tested by

no test coverage detected