[DiscordArchive] What does that do exactly in c++?
[DiscordArchive] What does that do exactly in c++?
Archived author: Revision • Posted: 2022-06-14T14:38:31.190000+00:00
Original source
I'm almost sure it wouldn't work since it's an event, but wanted to ask xD
Archived author: Revision • Posted: 2022-06-14T14:39:04.613000+00:00
Original source
I know it needs `player:LearnRiding()` as an example
Archived author: Foe • Posted: 2022-06-14T14:39:06.117000+00:00
Original source
Your own functions to do something other than a hook register can be exposed as object method extensions
Archived author: Foe • Posted: 2022-06-14T14:39:27.619000+00:00
Original source
But hook register functions can not be methods
Archived author: Revision • Posted: 2022-06-14T14:40:01.062000+00:00
Original source
I mean like this:
```
local function LearnSpellsOnLogin(event, player)
if (Config.ClassSpells) then
player:LearnClassSpells()
end
```
Archived author: Foe • Posted: 2022-06-14T14:40:09.701000+00:00
Original source
Yep
Archived author: Foe • Posted: 2022-06-14T14:41:01.201000+00:00
Original source
Those shouldn't be declared as player methods, the hook wouldn't pass the correct "self" object so to speak
Archived author: Foe • Posted: 2022-06-14T14:41:10.329000+00:00
Original source
It's possible but it would be super hacky
Archived author: Revision • Posted: 2022-06-14T14:41:58.176000+00:00
Original source
Yeah, I would think it would be hacky. That's not a good thing.
Archived author: Revision • Posted: 2022-06-14T14:42:53.097000+00:00
Original source
I really appreciate the information, best if I try to do it somewhat properly to begin with.