mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
fix: misplaced brace included book handlers inside LOOT_CLEAR_MONEY loop
The for-loop over {SMSG_LOOT_CLEAR_MONEY} was missing its closing brace,
so SMSG_READ_ITEM_OK and SMSG_READ_ITEM_FAILED registrations were inside
the loop body. Works by accident (single iteration) but fragile and
misleading — future additions to the loop would re-register book handlers.
This commit is contained in:
parent
020e016853
commit
b9ecc26f50
1 changed files with 1 additions and 1 deletions
|
|
@ -86,6 +86,7 @@ void InventoryHandler::registerOpcodes(DispatchTable& table) {
|
||||||
};
|
};
|
||||||
for (auto op : { Opcode::SMSG_LOOT_CLEAR_MONEY }) {
|
for (auto op : { Opcode::SMSG_LOOT_CLEAR_MONEY }) {
|
||||||
table[op] = [](network::Packet& /*packet*/) {};
|
table[op] = [](network::Packet& /*packet*/) {};
|
||||||
|
}
|
||||||
|
|
||||||
// ---- Read item (books) (moved from GameHandler) ----
|
// ---- Read item (books) (moved from GameHandler) ----
|
||||||
table[Opcode::SMSG_READ_ITEM_OK] = [this](network::Packet& packet) {
|
table[Opcode::SMSG_READ_ITEM_OK] = [this](network::Packet& packet) {
|
||||||
|
|
@ -97,7 +98,6 @@ void InventoryHandler::registerOpcodes(DispatchTable& table) {
|
||||||
owner_.addSystemChatMessage("You cannot read this item.");
|
owner_.addSystemChatMessage("You cannot read this item.");
|
||||||
packet.skipAll();
|
packet.skipAll();
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
// ---- Loot roll start / notifications ----
|
// ---- Loot roll start / notifications ----
|
||||||
table[Opcode::SMSG_LOOT_START_ROLL] = [this](network::Packet& packet) {
|
table[Opcode::SMSG_LOOT_START_ROLL] = [this](network::Packet& packet) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue