diff options
| author | Spp <spp@jorge.gr> | 2012-11-02 22:23:14 +0100 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2012-11-02 22:26:10 +0100 |
| commit | 58ec4e531914121144b6f852e3abf27cbb2f6fc4 (patch) | |
| tree | eb1aab08bb3dc4d23482e074ce7b8fdf5857672d /src/server/game/Handlers/LFGHandler.cpp | |
| parent | 3ee840a9beb305ec6ed61acf87078206562e3626 (diff) | |
Core/Guild: Code Refactor
- Send correct events when modifiying Ranks (Add, modify, delete)
- Store money/slots withdraw, not remaining slots. This will update remaining slots/money properly.
- Reset daily slots/money withdraw for all members at same time, configurable
- Better debug messages
Diffstat (limited to 'src/server/game/Handlers/LFGHandler.cpp')
| -rwxr-xr-x | src/server/game/Handlers/LFGHandler.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index d3dc96a801b..9926c75eb2a 100755 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -44,13 +44,13 @@ void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMa } } -void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData) { if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER) || (GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID() && (GetPlayer()->GetGroup()->GetMembersCount() == MAXGROUPSIZE || !GetPlayer()->GetGroup()->isLFGGroup()))) { - recv_data.rfinish(); + recvData.rfinish(); return; } @@ -58,32 +58,32 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data) uint32 dungeon; uint32 roles; - recv_data >> roles; - recv_data.read_skip<uint16>(); // uint8 (always 0) - uint8 (always 0) - recv_data >> numDungeons; + recvData >> roles; + recvData.read_skip<uint16>(); // uint8 (always 0) - uint8 (always 0) + recvData >> numDungeons; if (!numDungeons) { sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID()); - recv_data.rfinish(); + recvData.rfinish(); return; } LfgDungeonSet newDungeons; for (int8 i = 0; i < numDungeons; ++i) { - recv_data >> dungeon; + recvData >> dungeon; newDungeons.insert((dungeon & 0x00FFFFFF)); // remove the type from the dungeon entry } - recv_data.read_skip<uint32>(); // for 0..uint8 (always 3) { uint8 (always 0) } + recvData.read_skip<uint32>(); // for 0..uint8 (always 3) { uint8 (always 0) } std::string comment; - recv_data >> comment; + recvData >> comment; sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str()); sLFGMgr->JoinLfg(GetPlayer(), uint8(roles), newDungeons, comment); } -void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/) +void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/) { Group* grp = GetPlayer()->GetGroup(); uint64 guid = GetPlayer()->GetGUID(); @@ -96,21 +96,21 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/) sLFGMgr->LeaveLfg(gguid); } -void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData) { uint32 lfgGroupID; // Internal lfgGroupID bool accept; // Accept to join? - recv_data >> lfgGroupID; - recv_data >> accept; + recvData >> lfgGroupID; + recvData >> accept; sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0); sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept); } -void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData) { uint8 roles; - recv_data >> roles; // Player Group Roles + recvData >> roles; // Player Group Roles uint64 guid = GetPlayer()->GetGUID(); Group* grp = GetPlayer()->GetGroup(); if (!grp) @@ -123,36 +123,36 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data) sLFGMgr->UpdateRoleCheck(gguid, guid, roles); } -void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recvData) { std::string comment; - recv_data >> comment; + recvData >> comment; uint64 guid = GetPlayer()->GetGUID(); sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str()); sLFGMgr->SetComment(guid, comment); } -void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData) { bool agree; // Agree to kick player - recv_data >> agree; + recvData >> agree; uint64 guid = GetPlayer()->GetGUID(); sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", guid, agree ? 1 : 0); sLFGMgr->UpdateBoot(guid, agree); } -void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData) { bool out; - recv_data >> out; + recvData >> out; sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0); sLFGMgr->TeleportPlayer(GetPlayer(), out, true); } -void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data*/) +void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/) { uint64 guid = GetPlayer()->GetGUID(); sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid); @@ -231,7 +231,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data SendPacket(&data); } -void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data*/) +void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/) { uint64 guid = GetPlayer()->GetGUID(); sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid); @@ -265,18 +265,18 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data SendPacket(&data); } -void WorldSession::HandleLfrJoinOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfrJoinOpcode(WorldPacket& recvData) { uint32 entry; // Raid id to search - recv_data >> entry; + recvData >> entry; sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_JOIN [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), entry); //SendLfrUpdateListOpcode(entry); } -void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recv_data) +void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recvData) { uint32 dungeonId; // Raid id queue to leave - recv_data >> dungeonId; + recvData >> dungeonId; sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId); //sLFGMgr->LeaveLfr(GetPlayer(), dungeonId); } @@ -617,7 +617,7 @@ void WorldSession::SendLfgTeleportError(uint8 err) SendPacket(&data); } -void WorldSession::HandleLfgGetStatus(WorldPacket& /*recv_data*/) +void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/) { uint64 guid = GetPlayer()->GetGUID(); sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_GET_STATUS [" UI64FMTD "]", guid); |
