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

Function IsPrefixValidForItemType

Source/items.cpp:358–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356};
357
358bool IsPrefixValidForItemType(int i, AffixItemType flgs, bool hellfireItem)
359{
360 AffixItemType itemTypes = ItemPrefixes[i].PLIType;
361
362 if (!hellfireItem) {
363 if (i > 82)
364 return false;
365
366 if (i >= 12 && i <= 20)
367 itemTypes &= ~AffixItemType::Staff;
368 }
369
370 return HasAnyOf(flgs, itemTypes);
371}
372
373bool IsSuffixValidForItemType(int i, AffixItemType flgs, bool hellfireItem)
374{

Callers 2

GetStaffPrefixIdFunction · 0.85

Calls 1

HasAnyOfFunction · 0.85

Tested by

no test coverage detected