MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / CleanupItems

Function CleanupItems

Source/inv.cpp:919–943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919void CleanupItems(int ii)
920{
921 auto &item = Items[ii];
922 dItem[item.position.x][item.position.y] = 0;
923
924 if (CornerStone.isAvailable() && item.position == CornerStone.position) {
925 CornerStone.item.clear();
926 CornerStone.item._iSelFlag = 0;
927 CornerStone.item.position = { 0, 0 };
928 CornerStone.item._iAnimFlag = false;
929 CornerStone.item._iIdentified = false;
930 CornerStone.item._iPostDraw = false;
931 }
932
933 int i = 0;
934 while (i < ActiveItemCount) {
935 if (ActiveItems[i] == ii) {
936 DeleteItem(i);
937 i = 0;
938 continue;
939 }
940
941 i++;
942 }
943}
944
945bool CanUseStaff(Item &staff, SpellID spell)
946{

Callers 3

InvGetItemFunction · 0.85
AutoGetItemFunction · 0.85
SyncGetItemFunction · 0.85

Calls 3

DeleteItemFunction · 0.85
isAvailableMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected