| 247 | } |
| 248 | |
| 249 | void CustomFunctionLibrary::RegisterPlayerFunctions() |
| 250 | { |
| 251 | auto & functionMgr = osiris_.GetCustomFunctionManager(); |
| 252 | auto skillGetCooldown = std::make_unique<CustomQuery>( |
| 253 | "NRD_SkillGetCooldown", |
| 254 | std::vector<CustomFunctionParam>{ |
| 255 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 256 | { "SkillId", ValueType::String, FunctionArgumentDirection::In }, |
| 257 | { "Cooldown", ValueType::Real, FunctionArgumentDirection::Out } |
| 258 | }, |
| 259 | &func::SkillGetCooldown |
| 260 | ); |
| 261 | functionMgr.Register(std::move(skillGetCooldown)); |
| 262 | |
| 263 | auto skillSetCooldown = std::make_unique<CustomCall>( |
| 264 | "NRD_SkillSetCooldown", |
| 265 | std::vector<CustomFunctionParam>{ |
| 266 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 267 | { "SkillId", ValueType::String, FunctionArgumentDirection::In }, |
| 268 | { "Cooldown", ValueType::Real, FunctionArgumentDirection::In } |
| 269 | }, |
| 270 | &func::SkillSetCooldown |
| 271 | ); |
| 272 | functionMgr.Register(std::move(skillSetCooldown)); |
| 273 | |
| 274 | |
| 275 | auto skillBarGetItem = std::make_unique<CustomQuery>( |
| 276 | "NRD_SkillBarGetItem", |
| 277 | std::vector<CustomFunctionParam>{ |
| 278 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 279 | { "Slot", ValueType::Integer, FunctionArgumentDirection::In }, |
| 280 | { "Item", ValueType::ItemGuid, FunctionArgumentDirection::Out } |
| 281 | }, |
| 282 | &func::SkillBarGetItem |
| 283 | ); |
| 284 | functionMgr.Register(std::move(skillBarGetItem)); |
| 285 | |
| 286 | auto skillBarGetSkill = std::make_unique<CustomQuery>( |
| 287 | "NRD_SkillBarGetSkill", |
| 288 | std::vector<CustomFunctionParam>{ |
| 289 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 290 | { "Slot", ValueType::Integer, FunctionArgumentDirection::In }, |
| 291 | { "Skill", ValueType::String, FunctionArgumentDirection::Out } |
| 292 | }, |
| 293 | &func::SkillBarGetSkill |
| 294 | ); |
| 295 | functionMgr.Register(std::move(skillBarGetSkill)); |
| 296 | |
| 297 | auto skillBarFindSkill = std::make_unique<CustomQuery>( |
| 298 | "NRD_SkillBarFindSkill", |
| 299 | std::vector<CustomFunctionParam>{ |
| 300 | { "Character", ValueType::CharacterGuid, FunctionArgumentDirection::In }, |
| 301 | { "Skill", ValueType::String, FunctionArgumentDirection::In }, |
| 302 | { "Slot", ValueType::Integer, FunctionArgumentDirection::Out } |
| 303 | }, |
| 304 | &func::SkillBarFindSkill |
| 305 | ); |
| 306 | functionMgr.Register(std::move(skillBarFindSkill)); |