| 97 | {} |
| 98 | |
| 99 | void CustomFunctionLibrary::Register() |
| 100 | { |
| 101 | RegisterHelperFunctions(); |
| 102 | RegisterMathFunctions(); |
| 103 | RegisterStatFunctions(); |
| 104 | RegisterStatusFunctions(); |
| 105 | RegisterGameActionFunctions(); |
| 106 | RegisterProjectileFunctions(); |
| 107 | RegisterHitFunctions(); |
| 108 | RegisterPlayerFunctions(); |
| 109 | RegisterItemFunctions(); |
| 110 | RegisterCharacterFunctions(); |
| 111 | RegisterCustomStatFunctions(); |
| 112 | |
| 113 | auto & functionMgr = osiris_.GetCustomFunctionManager(); |
| 114 | |
| 115 | auto breakOnCharacter = std::make_unique<CustomCall>( |
| 116 | "NRD_BreakOnCharacter", |
| 117 | std::vector<CustomFunctionParam>{ |
| 118 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In } |
| 119 | }, |
| 120 | &func::BreakOnCharacter |
| 121 | ); |
| 122 | functionMgr.Register(std::move(breakOnCharacter)); |
| 123 | |
| 124 | auto breakOnItem = std::make_unique<CustomCall>( |
| 125 | "NRD_BreakOnItem", |
| 126 | std::vector<CustomFunctionParam>{ |
| 127 | { "Item", ValueType::ItemGuid, FunctionArgumentDirection::In } |
| 128 | }, |
| 129 | &func::BreakOnItem |
| 130 | ); |
| 131 | functionMgr.Register(std::move(breakOnItem)); |
| 132 | |
| 133 | auto experiment = std::make_unique<CustomCall>( |
| 134 | "NRD_Experiment", |
| 135 | std::vector<CustomFunctionParam>{ |
| 136 | { "Arg1", ValueType::String, FunctionArgumentDirection::In }, |
| 137 | { "Arg2", ValueType::String, FunctionArgumentDirection::In }, |
| 138 | { "Arg3", ValueType::String, FunctionArgumentDirection::In }, |
| 139 | }, |
| 140 | &func::DoExperiment |
| 141 | ); |
| 142 | functionMgr.Register(std::move(experiment)); |
| 143 | |
| 144 | auto luaReset = std::make_unique<CustomCall>( |
| 145 | "NRD_LuaReset", |
| 146 | std::vector<CustomFunctionParam>{}, |
| 147 | &func::OsiLuaReset |
| 148 | ); |
| 149 | functionMgr.Register(std::move(luaReset)); |
| 150 | |
| 151 | auto luaLoad = std::make_unique<CustomCall>( |
| 152 | "NRD_LuaLoad", |
| 153 | std::vector<CustomFunctionParam>{ |
| 154 | { "Path", ValueType::String, FunctionArgumentDirection::In } |
| 155 | }, |
| 156 | &func::OsiLuaLoad |
no outgoing calls
no test coverage detected