azerothcore-wotlk icon indicating copy to clipboard operation
azerothcore-wotlk copied to clipboard

fix(DB/Creature): Galak Windchaser drops mid-high level items

Open podmepodme opened this issue 1 year ago • 8 comments

Changes Proposed:

This PR proposes changes to:

  • [ ] Core (units, players, creatures, game systems).
  • [ ] Scripts (bosses, spell scripts, creature scripts).
  • [x] Database (SAI, creatures, etc).

Issues Addressed:

  • Closes https://github.com/azerothcore/azerothcore-wotlk/issues/16290

SOURCE:

The changes have been validated through:

  • [ ] Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • [ ] Sniffs (remember to share them with the open source community!)
  • [ ] Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • [ ] The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

Tests Performed:

This PR has been:

  • [ ] Tested in-game by the author.
  • [ ] Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • [ ] This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • [x] This pull request can be tested by following the reproduction steps provided in the linked issue
  • [ ] This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

podmepodme avatar Dec 08 '23 20:12 podmepodme

I suggest doing a select query using that join, and then simply doing an delete/insert query on all the rows that show up and make that the PR

elthehablo avatar Jan 18 '24 13:01 elthehablo

Unless I m reading it wrong, we should keep queries compact. https://www.azerothcore.org/wiki/sql-standards#compact-queries

podmepodme avatar Jan 18 '24 16:01 podmepodme

Although that is true in most cases, this mostly goes for simple inserts/deletes/updates and keeping those as short as possible.

One possible issue with this PR is that from the code you can't really see exactly what items are deleted, with deletes it is clear exactly what items are removed which is useful to maintain some level of version control and building a nice history.

elthehablo avatar Jan 19 '24 07:01 elthehablo

Unless I m reading it wrong, we should keep queries compact. https://www.azerothcore.org/wiki/sql-standards#compact-queries

It is good to have compact queries, but so that the testers can test many times and the people watching understand the changes you are providing, we can write the query in another way. At the end of the day, after a while, when a release is made, all the updates are passed to the code base, however, it is good to keep the code clean, making sure to make as many queries as possible, but I am sure that It can be written in another way, that is more understandable at first glance. Also, after testing, I have to revert the code until the pull request is approved.

pangolp avatar Feb 13 '24 22:02 pangolp

If the original author does not want to fix this I will push some changes myself and get this merged. I will just convert the entries taken from the joins into inserts

elthehablo avatar Feb 13 '24 22:02 elthehablo

Ideal series. In any case, it is good to keep the code compact, but I think what the article refers to is that instead of having 20 INSERT INTO, you have only 1, among other examples.

pangolp avatar Feb 13 '24 22:02 pangolp

Yes insert into values and then some neat lines

elthehablo avatar Feb 13 '24 22:02 elthehablo

What status is this pull request in? The author has changed the SQL. And from what I see, it removes 4 items from a creature's loot. I don't know if we need a sniff for this, or if we can merge it...

pangolp avatar May 02 '24 12:05 pangolp

Thanks for the PR!

Closing this as obsolete now with #18796 / 65942555b51c0200fdf962bc968ec9002686417a

sudlud avatar May 18 '24 11:05 sudlud