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

Function CharacterGetComputedStat

OsiInterface/Functions/CharacterFunctions.cpp:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 bool CharacterGetComputedStat(OsiArgumentDesc & args)
34 {
35 auto character = FindCharacterByNameGuid(args[0].String);
36 auto statName = args[1].String;
37 auto baseStats = args[2].Int32 == 1;
38 auto & statValue = args[3].Int32;
39 if (character == nullptr || character->Stats == nullptr) return false;
40
41 auto value = character->Stats->GetStat(statName, baseStats);
42 if (value) {
43 statValue = *value;
44 return true;
45 } else {
46 return false;
47 }
48 }
49
50 template <OsiPropertyMapType Type>
51 bool CharacterGetStat(OsiArgumentDesc & args)

Callers

nothing calls this directly

Calls 2

FindCharacterByNameGuidFunction · 0.85
GetStatMethod · 0.80

Tested by

no test coverage detected