diff options
author | Spp <none@none> | 2010-12-05 17:50:26 +0100 |
---|---|---|
committer | Spp <none@none> | 2010-12-05 17:50:26 +0100 |
commit | e621f5fe98ac7f0c488ffb00b0d7844b7f4e27fd (patch) | |
tree | 7c44aeee468814baa1234d7d800d6b0ef3d14c81 /src/server/game/DungeonFinding/LFG.h | |
parent | 71c2698faffb22fcfd0370370d80e180c70e3141 (diff) |
Core/Dungeon Finder: Code cleanup and minor optimizations
- Extend LfgState to keep control of the state of group and players using LFG
- Move scripts to its own class and initialize only if Dungeon finder is enabled
- Updated comments to doxygen format
- Use constructor initialization list
- All variables are declared in the inner most scope
- Fix some mem leaks
- Remove no longer needed code (Cleaner)
- Normalize handler function names
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/DungeonFinding/LFG.h')
-rwxr-xr-x | src/server/game/DungeonFinding/LFG.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h index cf49f57aac9..4280466789e 100755 --- a/src/server/game/DungeonFinding/LFG.h +++ b/src/server/game/DungeonFinding/LFG.h @@ -18,6 +18,8 @@ #ifndef _LFG_H #define _LFG_H +#include "Common.h" + enum LfgRoles { ROLE_NONE = 0x00, @@ -27,13 +29,6 @@ enum LfgRoles ROLE_DAMAGE = 0x08, }; -enum LfgState -{ - LFG_STATE_NONE = 0, // Not using LFG / LFR - LFG_STATE_LFG = 1, // Using Dungeon finder - LFG_STATE_LFR = 2, // Using Raid finder -}; - enum LfgUpdateType { LFG_UPDATETYPE_LEADER = 1, @@ -55,10 +50,10 @@ typedef std::set<uint32> LfgDungeonSet; struct LookingForGroup { - LookingForGroup(): roles(0), update(true), state(LFG_STATE_NONE) {} + LookingForGroup(): roles(0), state(LFG_STATE_NONE), oldState(LFG_STATE_NONE) {} uint8 roles; - bool update; LfgState state; + LfgState oldState; LfgDungeonSet applyDungeons; // Dungeons the player have applied for std::string comment; }; |