MCPcopy Create free account
hub / github.com/Norbyte/bg3se / GetOrCreateInt64

Method GetOrCreateInt64

BG3Extender/GameDefinitions/Stats/Stats.cpp:411–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411int64_t* RPGStats::GetOrCreateInt64(int& attributeId)
412{
413 if (attributeId < 0) {
414 attributeId = (int)Int64s.Size();
415 auto val = GameAlloc<int64_t>();
416 *val = (int64_t)0;
417 Int64s.push_back(val);
418 }
419
420 return Int64s[attributeId];
421}
422
423std::optional<float*> RPGStats::GetFloat(int attributeId)
424{

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected