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

Function CtrlUseInvItem

SourceX/controls/plrctrls.cpp:1090–1107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1088}
1089
1090void CtrlUseInvItem()
1091{
1092 ItemStruct *Item;
1093
1094 if (pcursinvitem == -1)
1095 return;
1096
1097 if (pcursinvitem <= INVITEM_INV_LAST)
1098 Item = &plr[myplr].InvList[pcursinvitem - INVITEM_INV_FIRST];
1099 else
1100 Item = &plr[myplr].SpdList[pcursinvitem - INVITEM_BELT_FIRST];
1101
1102 if ((Item->_iMiscId == IMISC_SCROLLT || Item->_iMiscId == IMISC_SCROLL) && spelldata[Item->_iSpell].sTargeted) {
1103 return;
1104 }
1105
1106 UseInvItem(myplr, pcursinvitem);
1107}
1108
1109void PerformSecondaryAction()
1110{

Callers 1

PerformSecondaryActionFunction · 0.85

Calls 1

UseInvItemFunction · 0.85

Tested by

no test coverage detected