| 145 | } |
| 146 | |
| 147 | void CustomFunctionLibrary::RegisterCharacterFunctions() |
| 148 | { |
| 149 | auto & functionMgr = osiris_.GetCustomFunctionManager(); |
| 150 | |
| 151 | auto characterGetComputedStat = std::make_unique<CustomQuery>( |
| 152 | "NRD_CharacterGetComputedStat", |
| 153 | std::vector<CustomFunctionParam>{ |
| 154 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 155 | { "Stat", ValueType::String, FunctionArgumentDirection::In }, |
| 156 | { "IsBaseStat", ValueType::Integer, FunctionArgumentDirection::In }, |
| 157 | { "Value", ValueType::Integer, FunctionArgumentDirection::Out }, |
| 158 | }, |
| 159 | &func::CharacterGetComputedStat |
| 160 | ); |
| 161 | functionMgr.Register(std::move(characterGetComputedStat)); |
| 162 | |
| 163 | auto characterGetStatInt = std::make_unique<CustomQuery>( |
| 164 | "NRD_CharacterGetStatInt", |
| 165 | std::vector<CustomFunctionParam>{ |
| 166 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 167 | { "Stat", ValueType::String, FunctionArgumentDirection::In }, |
| 168 | { "Value", ValueType::Integer, FunctionArgumentDirection::Out }, |
| 169 | }, |
| 170 | &func::CharacterGetStat<OsiPropertyMapType::Integer> |
| 171 | ); |
| 172 | functionMgr.Register(std::move(characterGetStatInt)); |
| 173 | |
| 174 | auto characterSetStatInt = std::make_unique<CustomCall>( |
| 175 | "NRD_CharacterSetStatInt", |
| 176 | std::vector<CustomFunctionParam>{ |
| 177 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 178 | { "Stat", ValueType::String, FunctionArgumentDirection::In }, |
| 179 | { "Value", ValueType::Integer, FunctionArgumentDirection::In }, |
| 180 | }, |
| 181 | &func::CharacterSetStatInt |
| 182 | ); |
| 183 | functionMgr.Register(std::move(characterSetStatInt)); |
| 184 | |
| 185 | |
| 186 | auto characterGetPermanentBoostInt = std::make_unique<CustomQuery>( |
| 187 | "NRD_CharacterGetPermanentBoostInt", |
| 188 | std::vector<CustomFunctionParam>{ |
| 189 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 190 | { "Stat", ValueType::String, FunctionArgumentDirection::In }, |
| 191 | { "Value", ValueType::Integer, FunctionArgumentDirection::Out }, |
| 192 | }, |
| 193 | &func::CharacterGetPermanentBoost<OsiPropertyMapType::Integer> |
| 194 | ); |
| 195 | functionMgr.Register(std::move(characterGetPermanentBoostInt)); |
| 196 | |
| 197 | |
| 198 | auto characterSetPermanentBoostInt = std::make_unique<CustomCall>( |
| 199 | "NRD_CharacterSetPermanentBoostInt", |
| 200 | std::vector<CustomFunctionParam>{ |
| 201 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 202 | { "Stat", ValueType::String, FunctionArgumentDirection::In }, |
| 203 | { "Value", ValueType::Integer, FunctionArgumentDirection::In }, |
| 204 | }, |