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

feat(Scripting/Hooks): Add OnBeforeOpenItem Hook

Open AnchyDev opened this issue 2 years ago • 0 comments

Changes Proposed:

Issues Addressed:

  • None

SOURCE:

Tests Performed:

  • Tested without any modules to ensure items still open correctly.
  • Tested with custom module that allows certain items to open and others to fail.

How to Test the Changes:

  1. Compile my module with the core.
  2. Enable it in the config.
  3. .additem 21363 - this item should open normally.
  4. .additem 34077 - this item should fail to open and report OnBeforeOpenItem::FAIL
  5. .additem 41426 - this item should succeed to open and report OnBeforeOpenItem::SUCCESS

Known Issues and TODO List:

  • None

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.

AnchyDev avatar Jul 29 '22 12:07 AnchyDev