azerothcore / mod-aoe-loot

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

Bug: Doesn't Work in Solo Dungeons #17

Closed Binarynova closed 9 months ago

Binarynova commented 1 year ago

Current Behaviour

I don't know if this is really a "bug" per se or a new feature to be requested, but while this mod works in open world content while playing solo, it does not seem to work in dungeons (at least while using mod-autobalance and mod-solo-lfg). When looting a corpse nearby corpses are not looted.

Expected Behaviour

It should work the same as in open world content: loot a corpse should loot all nearby corpses.

Steps to reproduce the problem

  1. Solo queue into Ragefire Chasm.
  2. Pull the first several mobs.
  3. AoE them down.
  4. Loot

Extra Notes

No response

AC rev. hash/commit

https://github.com/azerothcore/azerothcore-wotlk/commit/4d68c79edfac

Operating system

Ubuntu 23.04 x64

Custom changes or Modules

mod-autobalance mod-solo-lfg

pangolp commented 1 year ago

In a group it is canceled, and it has to be done 1 on 1, but if you are alone it works. The idea of ​​group area loot requires other implementations. At the moment, it is only used more than anything, for people who are alone in farming mode. Maybe later the loot in the area can be made to work in a group way.

if (player->GetGroup() || !_enable)
    return;
Binarynova commented 1 year ago

I was alone in the dungeon though. Is being in a dungeon always treated like being in a group?

pangolp commented 1 year ago

I was alone in the dungeon though. Is being in a dungeon always treated like being in a group?

A no, if you're outside the group, it should work. I misunderstood. If you're not in a group, it should always work, whether inside the dungeon or in the outside world.

pangolp commented 1 year ago

What dungeon did I find you in? So I try to reproduce the error. At the time, I tried the stormwind dungeon, and it had worked.

Binarynova commented 1 year ago

I was in Ragefire Chasm.

cdenq commented 1 year ago

It's possible that Binarynova is using some combination of the solo-autobalance + solo-lfg modules!

Can confirm that walking into a dungeon solo, the AoE Loot still works. Otherwise, if in group or using the solo-lfg, AoE turns off.

However, would be very nice if this worked if the Free-For-All loot option was selected in a group. It's along the same dimension of helping dungeon farmers, but it just also helps those that duo+.

pangolp commented 1 year ago

The module is very new, in fact, it was abandoned for years, because it was necessary to create some hooks in the emulator that I didn't know how to do. When I learned how to make them, I started working on the module, but it still requires a lot of things to be a perfect tool. Little by little we will improve it.

imevul commented 9 months ago

I did a hacky thing to kinda get aoe looting working in solo lfg. (That is, via dungeon finder)

Before the FFA check, I check if the player is in a solo lfg, and if the player count is 1, and if so I just force FFA to be enabled:

if (_enable && player->GetGroup() && sLFGMgr->GetPlayerCount(player->GetGroup()->GetGUID()) == 1 && sLFGMgr->IsTesting() && player->GetGroup()->GetLootMethod() != FREE_FOR_ALL) {
                player->GetGroup()->SetLootMethod(FREE_FOR_ALL);
        }

Doesn't work on the very first loot you do though, and it rarely fails anyways for some reason. As I said, this is very hacky and could definitely be done better (for example when entering the instance). Just throwing some ideas out there. (I'm using mod-solocraft and mod-solo-lfg, but not mod-autobalance.)

pangolp commented 9 months ago

Evidently, he had misunderstood what the problem was. Without interpretation, which was through the use of the Dungeons Annotation Module. Anyway, the module still needs several changes, we need to make many improvements for it to work the way we want it to, but at least it is functional. With its flaws, but functional. Being free code, the idea is to debate and improve it together.

pangolp commented 9 months ago

Have you tried making the loot free? That was a change I made recently, because I realized that despite being in a group, if we set the loot as free, we could still obtain the elements of any form. Perhaps, what the scoring module does alone is generate a group, and that is why loot not in the area does not work. Anyway, I would have to download the module and use both together to test. But I had misunderstood the cause of the problem. In all the dungeons where I had tried, I did so by entering through the door, not by scoring through the dungeon finder, because I knew that it doesn't work in groups, so I didn't even try it.

pangolp commented 9 months ago

I was doing some testing, and it seems that area loot is canceled when the first thing taken is gold, instead of an item. If you take an item, it works fine, but the problem is that if you take the money, then it doesn't work, and as usually, the first thing on the list is money, having the option to "spoil ". "automatically", it may not work for you.

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/28196993-0d85-4691-a7a6-7b0352e0dc3b

pangolp commented 9 months ago

I've had a little progress

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/3bdf87d6-bcd1-477e-a32e-aea68f2743e4

pangolp commented 9 months ago

Here's an example of group loot.

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/707b3550-0953-48d9-9f1c-150d988676bc

pangolp commented 9 months ago

https://github.com/azerothcore/mod-aoe-loot/pull/21 Some of the changes are in that pull request, but I'm not done with all the issues yet, I need to make changes to the emulator as well.

pangolp commented 9 months ago

The final touches, for now

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/f9817806-69b9-4ad0-bb8f-930706639eaf

https://github.com/azerothcore/mod-aoe-loot/assets/2810187/1cb5e7a5-1529-4b16-ae86-e444df2df9da

pangolp commented 9 months ago

Update the module and review the current changes. If it continues to fail, we open another topic or reopen this one.