Welcome to the Builder Academy

Question Corpses stack incorrectly - no autoloot

More
03 Jan 2025 16:00 #10502 by zi
Hello and happy new year!

I've run into this problem, and I've seen it on another mud running TBA as well.

Problem: Kill a mob. Great, autoloot gives 10 gold. Kill another of that same exact mob and get "seems to be empty." And it is! Because the 2nd mob I just killed is 2.corpse and I'm autolooting from the first mob.

I'd like to investigate - any tips on where things are stacked? I'm running a fairly clean version of TBA (just dropped in my world files and didn't mess around with fight.c or act.items.c).

Thanks!

Please Log in or Create an account to join the conversation.

More
03 Jan 2025 23:16 #10503 by thomas
I think this happens because obj_to_room will add the corpse to the _end_ of the object list.here : github.com/tbamud/tbamud/blob/1ccb6adaee...89c/src/fight.c#L231

Quite a lot of functionality might break if this is changed and the order would be strange for the players, but you _could_ try out switching the order here: github.com/tbamud/tbamud/blob/1ccb6adaee.../handler.c#L679-L686

Otherwise, the autoloot code could try to find the last corpse instead of the first, here github.com/tbamud/tbamud/blob/1ccb6adaee.../handler.c#L679-L686
[]
The following user(s) said Thank You: zi

Please Log in or Create an account to join the conversation.

Time to create page: 0.168 seconds