aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/DungeonFinding/LFGMgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/DungeonFinding/LFGMgr.h')
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.h79
1 files changed, 50 insertions, 29 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index a8834046760..10eaca4a8b3 100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -32,6 +32,14 @@ class Quest;
struct LfgDungeonsEntry;
enum Difficulty : uint8;
+namespace WorldPackets
+{
+ namespace LFG
+ {
+ struct RideTicket;
+ }
+}
+
namespace lfg
{
@@ -80,40 +88,51 @@ enum LfgProposalState
};
/// Teleport errors
-enum LfgTeleportError
+enum LfgTeleportResult : uint8
{
// 7 = "You can't do that right now" | 5 = No client reaction
- LFG_TELEPORTERROR_OK = 0, // Internal use
- LFG_TELEPORTERROR_PLAYER_DEAD = 1,
- LFG_TELEPORTERROR_FALLING = 2,
- LFG_TELEPORTERROR_IN_VEHICLE = 3,
- LFG_TELEPORTERROR_FATIGUE = 4,
- LFG_TELEPORTERROR_INVALID_LOCATION = 6,
- LFG_TELEPORTERROR_CHARMING = 8 // FIXME - It can be 7 or 8 (Need proper data)
+ LFG_TELEPORT_RESULT_NONE = 0, // Internal use
+ LFG_TELEPORT_RESULT_DEAD = 1,
+ LFG_TELEPORT_RESULT_FALLING = 2,
+ LFG_TELEPORT_RESULT_ON_TRANSPORT = 3,
+ LFG_TELEPORT_RESULT_EXHAUSTION = 4,
+ LFG_TELEPORT_RESULT_NO_RETURN_LOCATION = 6,
+ LFG_TELEPORT_RESULT_IMMUNE_TO_SUMMONS = 8 // FIXME - It can be 7 or 8 (Need proper data)
+
+ // unknown values
+ //LFG_TELEPORT_RESULT_NOT_IN_DUNGEON,
+ //LFG_TELEPORT_RESULT_NOT_ALLOWED,
+ //LFG_TELEPORT_RESULT_ALREADY_IN_DUNGEON
};
/// Queue join results
enum LfgJoinResult
{
// 3 = No client reaction | 18 = "Rolecheck failed"
- LFG_JOIN_OK = 0x00, // Joined (no client msg)
- LFG_JOIN_FAILED = 0x1B, // RoleCheck Failed
- LFG_JOIN_GROUPFULL = 0x1C, // Your group is full
- LFG_JOIN_INTERNAL_ERROR = 0x1E, // Internal LFG Error
- LFG_JOIN_NOT_MEET_REQS = 0x1F, // You do not meet the requirements for the chosen dungeons
- LFG_JOIN_PARTY_NOT_MEET_REQS = 6, // One or more party members do not meet the requirements for the chosen dungeons (FIXME)
- LFG_JOIN_MIXED_RAID_DUNGEON = 0x20, // You cannot mix dungeons, raids, and random when picking dungeons
- LFG_JOIN_MULTI_REALM = 0x21, // The dungeon you chose does not support players from multiple realms
- LFG_JOIN_DISCONNECTED = 0x22, // One or more party members are pending invites or disconnected
- LFG_JOIN_PARTY_INFO_FAILED = 0x23, // Could not retrieve information about some party members
- LFG_JOIN_DUNGEON_INVALID = 0x24, // One or more dungeons was not valid
- LFG_JOIN_DESERTER = 0x25, // You can not queue for dungeons until your deserter debuff wears off
- LFG_JOIN_PARTY_DESERTER = 0x26, // One or more party members has a deserter debuff
- LFG_JOIN_RANDOM_COOLDOWN = 0x27, // You can not queue for random dungeons while on random dungeon cooldown
- LFG_JOIN_PARTY_RANDOM_COOLDOWN = 0x28, // One or more party members are on random dungeon cooldown
- LFG_JOIN_TOO_MUCH_MEMBERS = 0x29, // You can not enter dungeons with more that 5 party members
- LFG_JOIN_USING_BG_SYSTEM = 0x2A, // You can not use the dungeon system while in BG or arenas
- LFG_JOIN_ROLE_CHECK_FAILED = 0x2B // Role check failed, client shows special error
+ LFG_JOIN_OK = 0x00, // Joined (no client msg)
+ LFG_JOIN_GROUP_FULL = 0x1F, // Your group is already full.
+ LFG_JOIN_NO_LFG_OBJECT = 0x21, // Internal LFG Error.
+ LFG_JOIN_NO_SLOTS_PLAYER = 0x22, // You do not meet the requirements for the chosen dungeons.
+ LFG_JOIN_MISMATCHED_SLOTS = 0x23, // You cannot mix dungeons, raids, and random when picking dungeons.
+ LFG_JOIN_PARTY_PLAYERS_FROM_DIFFERENT_REALMS = 0x24, // The dungeon you chose does not support players from multiple realms.
+ LFG_JOIN_MEMBERS_NOT_PRESENT = 0x25, // One or more group members are pending invites or disconnected.
+ LFG_JOIN_GET_INFO_TIMEOUT = 0x26, // Could not retrieve information about some party members.
+ LFG_JOIN_INVALID_SLOT = 0x27, // One or more dungeons was not valid.
+ LFG_JOIN_DESERTER_PLAYER = 0x28, // You can not queue for dungeons until your deserter debuff wears off.
+ LFG_JOIN_DESERTER_PARTY = 0x29, // One or more party members has a deserter debuff.
+ LFG_JOIN_RANDOM_COOLDOWN_PLAYER = 0x2A, // You can not queue for random dungeons while on random dungeon cooldown.
+ LFG_JOIN_RANDOM_COOLDOWN_PARTY = 0x2B, // One or more party members are on random dungeon cooldown.
+ LFG_JOIN_TOO_MANY_MEMBERS = 0x2C, // You have too many group members to queue for that.
+ LFG_JOIN_CANT_USE_DUNGEONS = 0x2D, // You cannot queue for a dungeon or raid while using battlegrounds or arenas.
+ LFG_JOIN_ROLE_CHECK_FAILED = 0x2E, // The Role Check has failed.
+ LFG_JOIN_TOO_FEW_MEMBERS = 0x34, // You do not have enough group members to queue for that.
+ LFG_JOIN_REASON_TOO_MANY_LFG = 0x35, // You are queued for too many instances.
+ LFG_JOIN_MISMATCHED_SLOTS_LOCAL_XREALM = 0x37, // You cannot mix realm-only and x-realm entries when listing your name in other raids.
+ LFG_JOIN_ALREADY_USING_LFG_LIST = 0x3F, // You can't do that while using Premade Groups.
+ LFG_JOIN_NOT_LEADER = 0x45, // You are not the party leader.
+ LFG_JOIN_DEAD = 0x49,
+
+ LFG_JOIN_PARTY_NOT_MEET_REQS = 6, // One or more party members do not meet the requirements for the chosen dungeons (FIXME)
};
/// Role check states
@@ -178,14 +197,13 @@ struct LfgUpdateData
// Data needed by SMSG_LFG_QUEUE_STATUS
struct LfgQueueStatusData
{
- LfgQueueStatusData(uint8 _queueId = 0, uint32 _dungeonId = 0, time_t _joinTime = 0, int32 _waitTime = -1, int32 _waitTimeAvg = -1, int32 _waitTimeTank = -1, int32 _waitTimeHealer = -1,
+ LfgQueueStatusData(uint8 _queueId = 0, uint32 _dungeonId = 0, int32 _waitTime = -1, int32 _waitTimeAvg = -1, int32 _waitTimeTank = -1, int32 _waitTimeHealer = -1,
int32 _waitTimeDps = -1, uint32 _queuedTime = 0, uint8 _tanks = 0, uint8 _healers = 0, uint8 _dps = 0) :
- queueId(_queueId), dungeonId(_dungeonId), joinTime(_joinTime), waitTime(_waitTime), waitTimeAvg(_waitTimeAvg), waitTimeTank(_waitTimeTank),
+ queueId(_queueId), dungeonId(_dungeonId), waitTime(_waitTime), waitTimeAvg(_waitTimeAvg), waitTimeTank(_waitTimeTank),
waitTimeHealer(_waitTimeHealer), waitTimeDps(_waitTimeDps), queuedTime(_queuedTime), tanks(_tanks), healers(_healers), dps(_dps) { }
uint8 queueId;
uint32 dungeonId;
- time_t joinTime;
int32 waitTime;
int32 waitTimeAvg;
int32 waitTimeTank;
@@ -393,6 +411,8 @@ class TC_GAME_API LFGMgr
void JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons);
/// Leaves lfg
void LeaveLfg(ObjectGuid guid, bool disconnected = false);
+ /// Gets unique join queue data
+ WorldPackets::LFG::RideTicket const* GetTicket(ObjectGuid guid) const;
// LfgQueue
/// Get last lfg state (NONE, DUNGEON or FINISHED_DUNGEON)
@@ -423,6 +443,7 @@ class TC_GAME_API LFGMgr
void SetDungeon(ObjectGuid guid, uint32 dungeon);
void SetSelectedDungeons(ObjectGuid guid, LfgDungeonSet const& dungeons);
void DecreaseKicksLeft(ObjectGuid guid);
+ void SetTicket(ObjectGuid guid, WorldPackets::LFG::RideTicket const& ticket);
void SetState(ObjectGuid guid, LfgState state);
void SetVoteKick(ObjectGuid gguid, bool active);
void RemovePlayerData(ObjectGuid guid);