mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/LFG: updated remaining lfg packets to packet class
This commit is contained in:
@@ -1393,7 +1393,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
|
||||
{
|
||||
TC_LOG_DEBUG("lfg.teleport", "Player %s not in group/lfggroup or dungeon not found!",
|
||||
player->GetName().c_str());
|
||||
player->GetSession()->SendLfgTeleportError(uint8(LFG_TELEPORT_RESULT_NO_RETURN_LOCATION));
|
||||
player->GetSession()->SendLfgTeleportError(LFG_TELEPORT_RESULT_NO_RETURN_LOCATION);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1480,7 +1480,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
|
||||
}
|
||||
|
||||
if (error != LFG_TELEPORT_RESULT_NONE)
|
||||
player->GetSession()->SendLfgTeleportError(uint8(error));
|
||||
player->GetSession()->SendLfgTeleportError(error);
|
||||
|
||||
TC_LOG_DEBUG("lfg.teleport", "Player %s is being teleported in to map %u "
|
||||
"(x: %f, y: %f, z: %f) Result: %u", player->GetName().c_str(), dungeon->map,
|
||||
|
||||
@@ -564,3 +564,17 @@ WorldPacket const* WorldPackets::LFG::LFGProposalUpdate::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::LFG::LFGOfferContinue::Write()
|
||||
{
|
||||
_worldPacket << uint32(Slot);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::LFG::LFGTeleportDenied::Write()
|
||||
{
|
||||
_worldPacket << uint32(Reason);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -383,9 +383,35 @@ namespace WorldPackets
|
||||
bool ProposalSilent = false;
|
||||
std::vector<LFGProposalUpdatePlayer> Players;
|
||||
};
|
||||
|
||||
class LFGDisabled final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGDisabled() : ServerPacket(SMSG_LFG_DISABLED, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
|
||||
class LFGOfferContinue final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGOfferContinue(uint32 slot) : ServerPacket(SMSG_LFG_OFFER_CONTINUE, 4), Slot(slot) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint32 Slot = 0;
|
||||
};
|
||||
|
||||
class LFGTeleportDenied final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGTeleportDenied(lfg::LfgTeleportResult reason) : ServerPacket(SMSG_LFG_TELEPORT_DENIED, 4), Reason(reason) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
lfg::LfgTeleportResult Reason;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // LFGPackets_h__
|
||||
|
||||
@@ -87,8 +87,6 @@ namespace WorldPackets
|
||||
class LFGBootPlayerVote;
|
||||
class LFGTeleport;
|
||||
class LFGGetSystemInfo;
|
||||
class LFGPlayerInfo;
|
||||
class LFGPartyInfo;
|
||||
class LFGUpdateStatus;
|
||||
class RoleChosen;
|
||||
class LFGRoleCheckUpdate;
|
||||
@@ -96,7 +94,7 @@ namespace WorldPackets
|
||||
class LFGQueueStatus;
|
||||
class LFGPlayerReward;
|
||||
class LfgBootPlayer;
|
||||
class LFGProposalUpdate;
|
||||
class LFGOfferContinue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -986,7 +984,7 @@ class TC_GAME_API WorldSession
|
||||
void SendLfgUpdateProposal(lfg::LfgProposal const& proposal);
|
||||
void SendLfgDisabled();
|
||||
void SendLfgOfferContinue(uint32 dungeonEntry);
|
||||
void SendLfgTeleportError(uint8 err);
|
||||
void SendLfgTeleportError(lfg::LfgTeleportResult err);
|
||||
|
||||
// Arena Team
|
||||
void HandleInspectArenaTeamsOpcode(WorldPacket& recvData);
|
||||
|
||||
Reference in New Issue
Block a user