[DiscordArchive] what's the underlying design for that? smartptr with custom return operators?
[DiscordArchive] what's the underlying design for that? smartptr with custom return operators?
Archived author: Northstrider • Posted: 2024-01-16T15:53:19.918000+00:00
Original source
that's the whole point of mutual references. if you change the map, the first object invokes a dtor which will then grab the 2nd reference and set it to nullptr
Archived author: Northstrider • Posted: 2024-01-16T15:53:55.575000+00:00
Original source
so I can imagine it being some kind of reference holder inside of maps
Archived author: jackpoz • Posted: 2024-01-16T15:54:46.336000+00:00
Original source
or, you just do a ObjectAccessor::GetX() once per map update when needed in the wrapper
Archived author: jackpoz • Posted: 2024-01-16T15:54:54.190000+00:00
Original source
and never expose the return object to the caller
Archived author: jackpoz • Posted: 2024-01-16T15:55:13.291000+00:00
Original source
and decide what to do if invalid (probably nothing, just log a warning)
Archived author: jackpoz • Posted: 2024-01-16T15:55:26.090000+00:00
Original source
or throw a C++ exception handled by game
Archived author: jackpoz • Posted: 2024-01-16T15:55:32.838000+00:00
Original source
so no crash
Archived author: Northstrider • Posted: 2024-01-16T16:10:42.991000+00:00
Original source
is PLAYER_FIELD_BYTE_HIDE_PET_BAR = 0x00000020 still valid for master client? (does the client support it? will be a important feature for cata pets later)