MCPcopy Create free account
hub / github.com/Norbyte/ositools / GetItemDynamicStat

Function GetItemDynamicStat

OsiInterface/Functions/ItemFunctions.cpp:94–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 CDivinityStats_Equipment_Attributes * GetItemDynamicStat(esv::Item * item, uint32_t index)
95 {
96 if (item->StatsDynamic == nullptr) {
97 OsiError("Item has no dynamic stats!");
98 return nullptr;
99 }
100
101 auto numStats = item->StatsDynamic->DynamicAttributes_End - item->StatsDynamic->DynamicAttributes_Start;
102 if (numStats <= 1) {
103 OsiError("Tried to get dynamic stat " << index << ", item only has " << numStats);
104 return nullptr;
105 }
106
107 return item->StatsDynamic->DynamicAttributes_Start[index];
108 }
109
110 template <OsiPropertyMapType Type>
111 bool ItemGetPermanentBoost(OsiArgumentDesc & args)

Callers 2

ItemGetPermanentBoostFunction · 0.85
ItemSetPermanentBoostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected