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_AREA_SPIRIT_HEALER_QUERY
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 bb5faca commit 0d59396
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/server/game/Handlers/MiscHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2048,9 +2048,14 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recvData)
SF_LOG_DEBUG("network", "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");

Battleground* bg = _player->GetBattleground();

ObjectGuid guid;

recvData.ReadGuidMask(guid, 5, 6, 0, 4, 1, 2, 7, 3);
uint8 bitOrder[8] = { 5, 6, 0, 4, 1, 2, 7, 3 };
recvData.ReadBitInOrder(guid, bitOrder);

This comment has been minimized.

Copy link
@AriDEV3

AriDEV3 Nov 23, 2023

Contributor

ReadGuidMask is exactly the same you wrote in 2 lines.


recvData.FlushBits();

This comment has been minimized.

Copy link
@AriDEV3

AriDEV3 Nov 23, 2023

Contributor

no need to flush because we dont have extra bits that would need to be flushed, and only in server messages we need flush.


recvData.ReadGuidBytes(guid, 0, 2, 6, 7, 1, 5, 3, 4);

Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
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 @@ -55,6 +55,7 @@ void OpcodeTable::InitializeClientTable()
DEFINE_OPCODE_HANDLER(CMSG_ADD_IGNORE, 0x0D20, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAddIgnoreOpcode ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_ALTER_APPEARANCE, 0x07F0, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAlterAppearance ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_AREATRIGGER, 0x1C44, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAreaTriggerOpcode ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_AREA_SPIRIT_HEALER_QUERY, 0x03F1, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleAreaSpiritHealerQueryOpcode);

This comment has been minimized.

Copy link
@AriDEV3

AriDEV3 Nov 23, 2023

Contributor

STATUS_LOGGEDIN

DEFINE_OPCODE_HANDLER(CMSG_AREA_SPIRIT_HEALER_QUEUE, 0x12D8, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAreaSpiritHealerQueueOpcode ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_ATTACKSTOP, 0x0345, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleAttackStopOpcode ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(CMSG_ATTACKSWING, 0x02E7, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleAttackSwingOpcode ); // 5.4.8 18414
Expand Down Expand Up @@ -459,7 +460,6 @@ void OpcodeTable::InitializeClientTable()

/*
//UNHANDLED
DEFINE_OPCODE_HANDLER(CMSG_AREA_SPIRIT_HEALER_QUERY, 0x03F1, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleAreaSpiritHealerQueryOpcode);
DEFINE_OPCODE_HANDLER(CMSG_AUCTION_LIST_PENDING_SALES, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleAuctionListPendingSales);
DEFINE_OPCODE_HANDLER(CMSG_BATTLEGROUND_PLAYER_POSITIONS, 0x0000, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::HandleBattlegroundPlayerPositionsOpcode);
DEFINE_OPCODE_HANDLER(CMSG_BUG, 0x0000, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleBugOpcode);
Expand Down
6 changes: 6 additions & 0 deletions src/server/shared/Packets/ByteBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ class ByteBuffer
return (bit != 0);
}

void ReadBitInOrder(ObjectGuid& guid, uint8 order[8])

This comment has been minimized.

Copy link
@AriDEV3

AriDEV3 Nov 23, 2023

Contributor

no need for this we allready have ReadGuidMask

This comment has been minimized.

Copy link
@SkyFire

SkyFire Nov 23, 2023

Author Member

Was having an overload issue with ReadGuidMask

{
for (uint8 i = 0; i < 8; ++i)
guid[order[i]] = ReadBit();
}

bool ReadBit()
{
++_bitpos;
Expand Down

0 comments on commit 0d59396

Please sign in to comment.