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

Method GetAttributeInt

OsiInterface/DivInterface.cpp:125–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 std::optional<int> CRPGStatsManager::GetAttributeInt(CRPGStats_Object * object, const char * attributeName)
126 {
127 int attributeIndex;
128 auto typeInfo = GetAttributeInfo(object, attributeName, attributeIndex);
129 if (typeInfo == nullptr) {
130 return {};
131 }
132
133 auto index = object->IndexedProperties[attributeIndex];
134 if (strcmp(typeInfo->Name.Str, "ConstantInt") == 0
135 || typeInfo->Values.ItemCount > 0) {
136 return index;
137 }
138 else {
139 return {};
140 }
141 }
142
143 bool CRPGStatsManager::SetAttributeString(CRPGStats_Object * object, const char * attributeName, const char * value)
144 {

Callers 2

CreateWallFunction · 0.80
StatGetAttributeIntFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected