View Single Post
03/29/24, 04:28 PM   #6
SSM24
 
SSM24's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2023
Posts: 4
Originally Posted by ZOS_DanBatson View Post
If you call a function with CallSecureProtected and the function is not a protected function, then it will fail. You don't specifically have to check if it's protected if you already know from the documentation that it's protected, although if you just assume it is and we change it later to no longer be protected your code will suddenly break if you're not checking first. So, you know, caveat emptor. CallSecureProtected returns a bool telling you if it worked, and if it didn't, it returns a string explaining what what wrong.

Also just as a reminder, protected just means you can't call it during combat. Private means you can't call it at all.
So essentially I was correct then, the only real benefit of doing it this way is potential forward compatibility. It sounds like this would also apply equally to unprotected functions if they become protected in the future, at which point stuff would break anyway (and probably in an even more widespread way), so probably not worth worrying too much about. Thanks!
  Reply With Quote