azerothcore / mod-aoe-loot

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

chore. Add group loot #30

Closed pangolp closed 6 months ago

pangolp commented 6 months ago

Changes Proposed:

Issues Addressed:

SOURCE:

Tests Performed:

How to Test the Changes:

  1. There is nothing to test yet, I am only uploading the code, in case someone finds the error, because I have tried many alternatives, and I cannot manage to correct the error.
pangolp commented 6 months ago

The idea would basically be. 2 or more people in a group, kill a series of NPCs and by looting 1 body, they can obtain the item from all the nearby bodies (but only those that belong to that player). Upon obtaining them, the npc would have to be inaccessible to the player who obtained the items, and available to the rest of the group. Until a point has been reached, in which all the people have obtained their corresponding items, the NPC is free, can be skinned (if it has said flag) and finally disappears.

pangolp commented 6 months ago

Another thing I'm suspecting is that I may be invoking the hook more. That in reality, it should go somewhere else, or create some other place, and that is why logic works in an erroneous way. The original module was designed to work only if the person was not in a group, but that would greatly affect the gameplay, not only of the people who are in the open world, but also in a group of dungeons or with the module. . to score alone.

pangolp commented 6 months ago

I have to make several changes to this pull request, because I realized that I am actually using the hook wrong. So I will first test all the changes in the emulator, and then I will edit the module, once the hook or hooks are merged into it.

pangolp commented 6 months ago

I forgot to add the gold to the player or group. I'm only missing that, the rest, everything seems to work.