Core/Dungeon Finder: Minor optimization in handler code
Note: LfgDungeonSet and LfgLockStatusMap were being used without using the existing typedef (to avoid including LFGMgr.h). Now those functions use a struct as param that is forward declared so still LFGMgr.h is not needed and redefinition of LfgDungeonSet/LfgLockStatusMap is removed. --HG-- branch : trunk
This commit is contained in:
@@ -113,6 +113,7 @@ enum LfgJoinResult
|
||||
/// Role check states
|
||||
enum LfgRoleCheckState
|
||||
{
|
||||
LFG_ROLECHECK_DEFAULT = 0, // Internal use = Not initialized.
|
||||
LFG_ROLECHECK_FINISHED = 1, // Role check finished
|
||||
LFG_ROLECHECK_INITIALITING = 2, // Role check begins
|
||||
LFG_ROLECHECK_MISSING_ROLE = 3, // Someone didn't selected a role after 2 mins
|
||||
@@ -165,6 +166,26 @@ struct LfgLockStatus
|
||||
LfgLockStatusType lockstatus; ///< Lock type
|
||||
};
|
||||
|
||||
// Data needed by SMSG_LFG_JOIN_RESULT
|
||||
struct LfgJoinResultData
|
||||
{
|
||||
LfgJoinResultData(): result(LFG_JOIN_OK), state(LFG_ROLECHECK_DEFAULT), lockmap(NULL) {}
|
||||
LfgJoinResult result;
|
||||
LfgRoleCheckState state;
|
||||
LfgLockStatusMap* lockmap;
|
||||
};
|
||||
|
||||
// Data needed by SMSG_LFG_UPDATE_PARTY and SMSG_LFG_UPDATE_PLAYER
|
||||
struct LfgUpdateData
|
||||
{
|
||||
LfgUpdateData(LfgUpdateType _type = LFG_UPDATETYPE_DEFAULT, LfgDungeonSet* _dungeons = NULL, std::string _comment = ""):
|
||||
updateType(_type), dungeons(_dungeons), comment(_comment) {}
|
||||
|
||||
LfgUpdateType updateType;
|
||||
LfgDungeonSet* dungeons;
|
||||
std::string comment;
|
||||
};
|
||||
|
||||
/// Reward info
|
||||
struct LfgReward
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user