Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore. Add group loot #30

Merged
merged 3 commits into from
Mar 11, 2024
Merged

chore. Add group loot #30

merged 3 commits into from
Mar 11, 2024

Conversation

pangolp
Copy link
Contributor

@pangolp pangolp commented Mar 8, 2024

Changes Proposed:

  • The idea of the pull request is to be able to allow players to loot in the area, if they are also within a group.
  • Currently the code works half-heartedly, and sometimes it generates some errors, allowing players to obtain more items than they should or, on some occasions, not even being able to obtain the quest item, since it has freeforall status.
  • Also, for some reason unknown to me, the bag with the loot, when observing the body, changes, if the first player checks the loot, closes it without taking the items, and then the second player inspects it. When the second player closes the bag, without taking the items, the first player can see that the items have changed.

Issues Addressed:

SOURCE:

Tests Performed:

  • Windows 10
  • In-game

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
Copy link
Contributor Author

pangolp commented Mar 8, 2024

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
Copy link
Contributor Author

pangolp commented Mar 8, 2024

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
Copy link
Contributor Author

pangolp commented Mar 9, 2024

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 pangolp added the Work in progress Currently working on the issue label Mar 9, 2024
@pangolp pangolp marked this pull request as ready for review March 11, 2024 07:15
@pangolp pangolp removed the Work in progress Currently working on the issue label Mar 11, 2024
@pangolp
Copy link
Contributor Author

pangolp commented Mar 11, 2024

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

@pangolp pangolp merged commit d777d18 into azerothcore:master Mar 11, 2024
1 check passed
@pangolp pangolp deleted the group branch March 11, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant