[DiscordArchive] How do you use it?
[DiscordArchive] How do you use it?
Archived author: Honey • Posted: 2024-01-05T20:12:26.429000+00:00
Original source
How do you use it?
Archived author: functorism • Posted: 2024-01-05T20:12:49.777000+00:00
Original source
```
local _ = RegisterUniqueCreatureEvent(creature:GetGUID(), creature:GetInstanceId(), CREATURE_EVENT_ON_REACH_WP, callback, 1)
```
Archived author: functorism • Posted: 2024-01-05T20:13:33.506000+00:00
Original source
If I change guid to 0, I correctly get the error handling in Eluna:Register
Archived author: Honey • Posted: 2024-01-05T20:13:42.265000+00:00
Original source
Not sure if it's codestyle, but `local _ = ` is redundant.
Archived author: functorism • Posted: 2024-01-05T20:14:06.458000+00:00
Original source
Yeah sure, I get that. That's irrelevant : P
Archived author: Honey • Posted: 2024-01-05T20:14:41.852000+00:00
Original source
I don't thing `GetGUID()` returns the guid you're looking for. It probably returns the guid as in current identifier of the creature inside the map. I'm fairly certain that you need to use the DB guid.
Archived author: Honey • Posted: 2024-01-05T20:14:51.858000+00:00
Original source
Often referred to as low guid.
Archived author: Honey • Posted: 2024-01-05T20:15:34.098000+00:00
Original source
<https://www.azerothcore.org/pages/eluna/Object/GetGUIDLow.html>
Archived author: functorism • Posted: 2024-01-05T20:16:14.567000+00:00
Original source
Seems counter intuitive because this is supposed to be a unique reference to the creature? Also, it doesn't work either with low GUID. And the DB ID would be the entry, and that's what you use when you do a non-unique listener, which would use the non-unique bindings and the entry key, as opposed to the uniqueKey with the unique bindings.
Archived author: functorism • Posted: 2024-01-05T20:16:34.617000+00:00
Original source
`CallAllFunctionsBool(CreatureEventBindings, CreatureUniqueBindings, entry_key, unique_key);`
entry_key, vs unique_key