Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Update and enable CMSG_ITEM_REFUND
Browse files Browse the repository at this point in the history
Signed-off-by: AlterEgo <[email protected]>
  • Loading branch information
SkyFire committed Nov 23, 2023
1 parent 9b52140 commit 7c5a246
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/server/game/Handlers/ItemHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1580,11 +1580,12 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
GetPlayer()->RefundItem(item);
}
*/
void WorldSession::HandleItemRefund(WorldPacket &recvData)
void WorldSession::HandleItemRefund(WorldPacket& recvData)
{
SF_LOG_DEBUG("network", "WORLD: CMSG_ITEM_REFUND");
uint64 guid;
recvData >> guid; // item guid
ObjectGuid guid;
recvData.ReadGuidMask(guid, 2, 4, 1, 6, 3, 0, 5, 7);
recvData.ReadGuidBytes(guid, 3, 5, 6, 2, 7, 0, 1, 4);

Item* item = _player->GetItemByGuid(guid);
if (!item)
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Server/Protocol/Opcodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ void OpcodeTable::InitializeClientTable()
DEFINE_OPCODE_HANDLER(CMSG_INSPECT, 0x1259, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleInspectOpcode ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_INSPECT_HONOR_STATS, 0x19C3, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleInspectHonorStatsOpcode ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_INSTANCE_LOCK_WARNING_RESPONSE, 0x12C0, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleInstanceLockResponse ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_ITEM_REFUND, 0x074B, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleItemRefund ); // 5.4.8 18414

This comment has been minimized.

Copy link
@AriDEV3

AriDEV3 Nov 23, 2023

Contributor

STATUS_LOGGEDIN

This comment has been minimized.

Copy link
@SkyFire

SkyFire Nov 23, 2023

Author Member

QQ Alread caught it. Your too slow :)

DEFINE_OPCODE_HANDLER(CMSG_ITEM_TEXT_QUERY, 0x0123, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleItemTextQuery ); // 5.4.8 18414 // LEGACY CMSG sub_600632
//DEFINE_OPCODE_HANDLER(CMSG_GET_ITEM_PURCHASE_DATA, 0x1258, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleItemRefundInfoRequest ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_KEEP_ALIVE, 0x1A87, STATUS_AUTHED, PROCESS_INPLACE, &WorldSession::Handle_EarlyProccess ); // 5.4.8 18414
Expand Down Expand Up @@ -478,7 +479,6 @@ void OpcodeTable::InitializeClientTable()
DEFINE_OPCODE_HANDLER(CMSG_GROUP_SWAP_SUB_GROUP, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleGroupSwapSubGroupOpcode);
DEFINE_OPCODE_HANDLER(CMSG_GUILD_REQUEST_MAX_DAILY_XP, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleGuildRequestMaxDailyXP);
DEFINE_OPCODE_HANDLER(CMSG_HEARTH_AND_RESURRECT, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleHearthAndResurrect);
DEFINE_OPCODE_HANDLER(CMSG_ITEM_REFUND, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleItemRefund);
DEFINE_OPCODE_HANDLER(CMSG_LEARN_PREVIEW_TALENTS, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleLearnPreviewTalents);
DEFINE_OPCODE_HANDLER(CMSG_LEARN_PREVIEW_TALENTS_PET, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleLearnPreviewTalentsPet);
DEFINE_OPCODE_HANDLER(CMSG_LFG_GET_STATUS, 0x0000, STATUS_UNHANDLED, PROCESS_THREADSAFE, &WorldSession::HandleLfgGetStatus );
Expand Down

0 comments on commit 7c5a246

Please sign in to comment.