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

Function On_SPELLXY

Source/msg.cpp:1774–1793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1772}
1773
1774DWORD On_SPELLXY(TCmd *pCmd, int pnum)
1775{
1776 TCmdLocParam2 *p = (TCmdLocParam2 *)pCmd;
1777
1778 if (gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel) {
1779 if (currlevel != 0 || spelldata[p->wParam1].sTownSpell) {
1780 ClrPlrPath(pnum);
1781 plr[pnum].destAction = ACTION_SPELL;
1782 plr[pnum].destParam1 = p->x;
1783 plr[pnum].destParam2 = p->y;
1784 plr[pnum].destParam3 = p->wParam2;
1785 plr[pnum]._pSpell = p->wParam1;
1786 plr[pnum]._pSplType = plr[pnum]._pRSplType;
1787 plr[pnum]._pSplFrom = 0;
1788 } else
1789 msg_errorf("%s has cast an illegal spell.", plr[pnum]._pName);
1790 }
1791
1792 return sizeof(*p);
1793}
1794
1795DWORD On_TSPELLXY(TCmd *pCmd, int pnum)
1796{

Callers 1

ParseCmdFunction · 0.85

Calls 2

ClrPlrPathFunction · 0.85
msg_errorfFunction · 0.85

Tested by

no test coverage detected