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

Method GetOrCreateConditions

BG3Extender/GameDefinitions/Stats/Stats.cpp:489–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489int RPGStats::GetOrCreateConditions(STDString const& conditions)
490{
491 if (conditions.empty()) {
492 return -1;
493 }
494
495 for (unsigned i = 0; i < Conditions.Size(); i++) {
496 if (Conditions[i] == conditions) {
497 return (int)i;
498 }
499 }
500
501 Conditions.push_back(conditions);
502 return (int)Conditions.Size() - 1;
503}
504
505Modifier * RPGStats::GetModifierInfo(FixedString const& modifierListName, FixedString const& modifierName)
506{

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
SizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected