MCPcopy Create free account
hub / github.com/TurningWheel/Barony / countCustomItems

Function countCustomItems

src/entity.cpp:20095–20109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20093}
20094
20095int countCustomItems(Stat* stats)
20096{
20097 int x = 0;
20098 int customItemSlotCount = 0;
20099
20100 for ( x = ITEM_SLOT_INV_1; x <= ITEM_SLOT_INV_6; x = x + ITEM_SLOT_NUMPROPERTIES )
20101 {
20102 if ( stats->EDITOR_ITEMS[x] != 1 || (stats->EDITOR_ITEMS[x] == 1 && stats->EDITOR_ITEMS[x + ITEM_SLOT_CATEGORY] != 0) )
20103 {
20104 ++customItemSlotCount; //found a custom item in inventory
20105 }
20106 }
20107
20108 return customItemSlotCount; //use custom items from editor instead of default generation
20109}
20110
20111int countDefaultItems(Stat* stats)
20112{

Callers 15

initMonsterSFunction · 0.85
initMonsterMFunction · 0.85
initMonsterGFunction · 0.85
initGoblinFunction · 0.85
initImpFunction · 0.85
initMinotaurFunction · 0.85
initVampireFunction · 0.85
initSentryBotFunction · 0.85
initGyroBotFunction · 0.85
initDummyBotFunction · 0.85
initScorpionFunction · 0.85
initAutomatonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected