[DiscordArchive] In current server TC/AC architecture could an aura outlast it's owner? Like a creature applying a pe
[DiscordArchive] In current server TC/AC architecture could an aura outlast it's owner? Like a creature applying a pe
Archived author: <o> • Posted: 2022-08-03T19:51:42.161000+00:00
Original source
the script itself is atomic, so nothing can happen while you're executing
Archived author: whatwere • Posted: 2022-08-03T19:52:19.227000+00:00
Original source
I was talking about this to someone, if you have pntr to x and x is deleted isn't the pntr to x pointing to invalid memory? It's just a raw pointer.
Archived author: <o> • Posted: 2022-08-03T19:52:40.652000+00:00
Original source
you will not get dangling pointers, trinitycore handles that for you
Archived author: <o> • Posted: 2022-08-03T19:52:49.615000+00:00
Original source
a nullptr is fine, you can actually check those since the value is null
Archived author: <o> • Posted: 2022-08-03T19:53:07.886000+00:00
Original source
what you're describing is a dangling pointer, not a null pointer
Archived author: <o> • Posted: 2022-08-03T19:53:19.176000+00:00
Original source
those are indeed extremely dangerous
Archived author: whatwere • Posted: 2022-08-03T19:54:03.211000+00:00
Original source
What does it do to handle it? I'm looking at spell.h and it's all just raw pointers to Unit and so on.
Archived author: <o> • Posted: 2022-08-03T19:55:05.953000+00:00
Original source
that's very complicated and you'd need to start looking into how map updates and unloading work, but you can be sure that once the map unloads a creature or player, all references to them through things like auras and other things that the core manages for you
Archived author: <o> • Posted: 2022-08-03T19:55:30.509000+00:00
Original source
if you have _your own_ pointers, trinitycore does not unset those for you or anything, which is why you can never have persistent object pointers
Archived author: robinsch • Posted: 2022-08-03T19:55:31.656000+00:00
Original source
There are a few race conditions with getting casters for auras