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

Method RegisterStatFunctions

OsiInterface/Functions/StatFunctions.cpp:119–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118
119 void CustomFunctionLibrary::RegisterStatFunctions()
120 {
121 auto & functionMgr = osiris_.GetCustomFunctionManager();
122
123 auto statExists = std::make_unique<CustomQuery>(
124 "NRD_StatExists",
125 std::vector<CustomFunctionParam>{
126 { "StatsId", ValueType::String, FunctionArgumentDirection::In }
127 },
128 &func::StatExists
129 );
130 functionMgr.Register(std::move(statExists));
131
132 auto statAttributeExists = std::make_unique<CustomQuery>(
133 "NRD_StatAttributeExists",
134 std::vector<CustomFunctionParam>{
135 { "StatsId", ValueType::String, FunctionArgumentDirection::In },
136 { "Attribute", ValueType::String, FunctionArgumentDirection::In },
137 },
138 &func::StatAttributeExists
139 );
140 functionMgr.Register(std::move(statAttributeExists));
141
142 auto getStatAttributeInt = std::make_unique<CustomQuery>(
143 "NRD_StatGetAttributeInt",
144 std::vector<CustomFunctionParam>{
145 { "StatsId", ValueType::String, FunctionArgumentDirection::In },
146 { "Attribute", ValueType::String, FunctionArgumentDirection::In },
147 { "Value", ValueType::Integer, FunctionArgumentDirection::Out },
148 },
149 &func::StatGetAttributeInt
150 );
151 functionMgr.Register(std::move(getStatAttributeInt));
152
153 auto getStatAttributeString = std::make_unique<CustomQuery>(
154 "NRD_StatGetAttributeString",
155 std::vector<CustomFunctionParam>{
156 { "StatsId", ValueType::String, FunctionArgumentDirection::In },
157 { "Attribute", ValueType::String, FunctionArgumentDirection::In },
158 { "Value", ValueType::String, FunctionArgumentDirection::Out },
159 },
160 &func::StatGetAttributeString
161 );
162 functionMgr.Register(std::move(getStatAttributeString));
163
164 auto getStatType = std::make_unique<CustomQuery>(
165 "NRD_StatGetType",
166 std::vector<CustomFunctionParam>{
167 { "StatsId", ValueType::String, FunctionArgumentDirection::In },
168 { "Type", ValueType::String, FunctionArgumentDirection::Out },
169 },
170 &func::StatGetType
171 );
172 functionMgr.Register(std::move(getStatType));
173 }
174
175}

Callers

nothing calls this directly

Calls 1

RegisterMethod · 0.45

Tested by

no test coverage detected