[DiscordArchive] What am I doing wrong here? Segfaults and crashes the server on that `if` statement. Is sourceGameOb
[DiscordArchive] What am I doing wrong here? Segfaults and crashes the server on that `if` statement. Is sourceGameOb
Archived author: KJack • Posted: 2023-05-31T01:10:17.666000+00:00
Original source
ah! I was making the comment here cover too many lines down.
```
// GUID of container that holds this loot (item_instance.entry), set for items that can be looted
ObjectGuid containerGUID;
ObjectGuid sourceWorldObjectGUID;
GameObject* sourceGameObject{nullptr};
```
Archived author: KJack • Posted: 2023-05-31T01:10:24.011000+00:00
Original source
i see now
Archived author: KJack • Posted: 2023-05-31T01:15:31.445000+00:00
Original source
I don't think I see a method of Loot that would let me figure out what creature it came from. I've got access to Player too, still seeing if anything in there would be helpful.
Archived author: KJack • Posted: 2023-05-31T01:16:10.149000+00:00
Original source
unless the creature gets assigned to `ObjectGuid.containerGUID`
Archived author: KJack • Posted: 2023-05-31T01:25:25.972000+00:00
Original source
nope, still null. didn't think so, but tried anyways.
Archived author: KJack • Posted: 2023-05-31T01:30:35.334000+00:00
Original source
I don't see any way to go from a Loot object back to the originating Creature. an item container is tracked and a gameobject is tracked, but not the creature. open if anyone else has ideas!
Archived author: Kitzunu • Posted: 2023-05-31T01:32:49.866000+00:00
Original source
Add it into the core
Archived author: KJack • Posted: 2023-05-31T01:34:46.482000+00:00
Original source
Ugg, but fair. Hate to add functionality to the core to support a module I'm making, but it is genuinely useful I think.
![[Image: image.png?ex=690bfd64&is=690aabe4&hm=f15...dabebef08&]](https://cdn.discordapp.com/attachments/284323424032129024/1113281712819028019/image.png?ex=690bfd64&is=690aabe4&hm=f1500a841ea95128f797d859399b064a12efe74792206e529e9abd5dabebef08&)
Archived author: KJack • Posted: 2023-05-31T01:44:04.244000+00:00
Original source
hah!
![[Image: image.png?ex=690bfd64&is=690aabe4&hm=f15...dabebef08&]](https://cdn.discordapp.com/attachments/284323424032129024/1113281712819028019/image.png?ex=690bfd64&is=690aabe4&hm=f1500a841ea95128f797d859399b064a12efe74792206e529e9abd5dabebef08&)
Archived author: KJack • Posted: 2023-05-31T01:44:19.780000+00:00
Original source
`sourceWorldObjectGUID` can point to a creature too!