mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
fix(loot): send GAMEOBJ_REPORT_USE when supported
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
This commit is contained in:
parent
5a63d3799c
commit
251ed7733b
1 changed files with 9 additions and 5 deletions
|
|
@ -18372,12 +18372,16 @@ void GameHandler::performGameObjectInteractionNow(uint64_t guid) {
|
||||||
lower.find("coffer") != std::string::npos ||
|
lower.find("coffer") != std::string::npos ||
|
||||||
lower.find("cache") != std::string::npos);
|
lower.find("cache") != std::string::npos);
|
||||||
}
|
}
|
||||||
// For WotLK, CMSG_GAMEOBJ_REPORT_USE is required for chests (and is harmless for others).
|
// Some servers require CMSG_GAMEOBJ_REPORT_USE for lootable gameobjects.
|
||||||
if (!isMailbox && isActiveExpansion("wotlk")) {
|
// Only send it when the active opcode table actually supports it.
|
||||||
|
if (!isMailbox) {
|
||||||
|
const auto* table = getActiveOpcodeTable();
|
||||||
|
if (table && table->hasOpcode(Opcode::CMSG_GAMEOBJ_REPORT_USE)) {
|
||||||
network::Packet reportUse(wireOpcode(Opcode::CMSG_GAMEOBJ_REPORT_USE));
|
network::Packet reportUse(wireOpcode(Opcode::CMSG_GAMEOBJ_REPORT_USE));
|
||||||
reportUse.writeUInt64(guid);
|
reportUse.writeUInt64(guid);
|
||||||
socket->send(reportUse);
|
socket->send(reportUse);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (shouldSendLoot) {
|
if (shouldSendLoot) {
|
||||||
lootTarget(guid);
|
lootTarget(guid);
|
||||||
// Some servers/scripts only make certain quest/chest GOs lootable after a short delay
|
// Some servers/scripts only make certain quest/chest GOs lootable after a short delay
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue