azerothcore / mod-aoe-loot

Loot all bodies at once!
GNU Affero General Public License v3.0
27 stars 26 forks source link

Bug: Sometimes, the loot window is stuck showing gold that cannot be looted #32

Closed imevul closed 6 months ago

imevul commented 6 months ago

Current Behaviour

Sometimes when you loot (with auto-loot) corpses that drop gold, you automatically loot the gold, but you are still presented with a single item in the loot window, which is the gold that you already looted. Clicking on it does nothing. If you move away from the corpse, there's nothing more to loot.

Expected Behaviour

The loot window should not show "ghost" gold.

Steps to reproduce the problem

Not sure, it only happens sometimes.

I've had it happen solo, in a group, and in solo LFG. It has happened both when looting a single corpse, and when looting multiple.

Extra Notes

No response

AC rev. hash/commit

bf17d93727e1

Operating system

Ubuntu 22.04.3 LTS (x64)

Custom changes or Modules

pangolp commented 6 months ago

I tried it, it's true. There was a very big change, regarding the way of writing the code. I have to admit that I tried some topics, but among those that I still have to try, obviously, this one got out of hand. But currently, I am doing tests and I came to the same result that you describe. I think I have a possible solution for that.

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/9521b41f-56d5-47cb-86bb-a4bf2d9087a0

pangolp commented 6 months ago

I think it's resolved. But I have to try it also in a group.

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/c7a5f045-fbdd-4d4c-a9a3-68930f2d27f6

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/1a5637a7-43e1-46fd-98b7-a0f604b6a4b5

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/88a67b28-7371-490b-aa35-426d8c63fe0c

pangolp commented 6 months ago

In a group, it seems to me, that he reviews more money than he owes. Because the body was 11, I don't think the other body had anything, although it may be and we don't know it, but I don't think so. And he gave 8 to each one. I don't know how he makes the division, but it seems to me that the topic is wrong.

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/5180c65c-cfbe-4795-ae56-5ccfc2bd3f6a

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/7c6a2ee6-efb8-4190-945f-c211b7a78c38

Maybe I'm doing the math wrong, I'm checking.

pangolp commented 6 months ago

The gold loot works well. Only as it was with the group loot. She couldn't see that the other npc also had loot. By putting the loot in free mode, you can see that the account is correct.

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/aaf52ca1-2627-4fff-86c9-3cb3cffa6dc2