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

Function StatFindObject

BG3Extender/GameDefinitions/Stats/Stats.cpp:625–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625Object * StatFindObject(char const * name, bool warnOnError)
626{
627 auto stats = GetStaticSymbols().GetStats();
628 if (stats == nullptr) {
629 OsiError("RPGStats not available");
630 return nullptr;
631 }
632
633 auto object = stats->Objects.GetByName(FixedString(name));
634 if (object == nullptr) {
635 if (warnOnError) {
636 OsiError("Stat object '" << name << "' does not exist");
637 }
638 return nullptr;
639 }
640
641 return object;
642}
643
644Object * StatFindObject(int index)
645{

Callers 1

GetStatsMethod · 0.85

Calls 4

FixedStringClass · 0.85
GetByNameMethod · 0.80
GetByHandleMethod · 0.80
GetStatsMethod · 0.45

Tested by

no test coverage detected