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

feat(Core/Entities): Add OnPlayerSendListInventory script hook #21676

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

VincentVanclef
Copy link
Contributor

Changes Proposed:

Simply adds a new script hook

  • Would like to know when a player interacts with a vendor. Going to need this for a custom auction module.

@github-actions github-actions bot added CORE Related to the core file-cpp Used to trigger the matrix build labels Mar 9, 2025
@sudlud sudlud changed the title Add OnPlayerSendInventoryList script hook feat(Corfe/Entities): Add OnPlayerSendInventoryList script hook Mar 10, 2025
@sudlud
Copy link
Member

sudlud commented Mar 10, 2025

please update with latest master and resolve the conflicts

@VincentVanclef VincentVanclef requested a review from sudlud March 10, 2025 08:04
@sudlud sudlud changed the title feat(Corfe/Entities): Add OnPlayerSendInventoryList script hook feat(Core/Entities): Add OnPlayerSendInventoryList script hook Mar 10, 2025
@sudlud sudlud changed the title feat(Core/Entities): Add OnPlayerSendInventoryList script hook feat(Core/Entities): Add OnPlayerSendListInventory script hook Mar 10, 2025
@@ -920,6 +920,11 @@ bool ScriptMgr::OnPlayerCanGiveLevel(Player* player, uint8 newLevel)
CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_CAN_GIVE_LEVEL, !script->OnPlayerCanGiveLevel(player, newLevel));
}

void ScriptMgr::OnPlayerSendListInventory(Player* player, ObjectGuid vendorGuid, uint32 vendorEntry)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about changing it to uint32& vendorEntry so that it can be manipulated in the hook? to my understanding this could be used to swap out the vendor lists of vendors maybe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE Related to the core file-cpp Used to trigger the matrix build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants