From defd13197071f4fe3975183ca67e4e8fabee8fad Mon Sep 17 00:00:00 2001 From: Spp Date: Thu, 20 May 2010 23:35:27 +0200 Subject: Dungeon Finder: Initial setup and dungeon listing --HG-- branch : trunk --- src/game/Player.h | 69 +------------------------------------------------------ 1 file changed, 1 insertion(+), 68 deletions(-) (limited to 'src/game/Player.h') diff --git a/src/game/Player.h b/src/game/Player.h index b1ab6a683aa..5ea6e22154f 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -39,6 +39,7 @@ #include "ReputationMgr.h" #include "BattleGround.h" #include "DBCEnums.h" +#include "LFG.h" #include #include @@ -337,74 +338,6 @@ struct EnchantDuration typedef std::list EnchantDurationList; typedef std::list ItemDurationList; -enum LfgType -{ - LFG_TYPE_NONE = 0, - LFG_TYPE_DUNGEON = 1, - LFG_TYPE_RAID = 2, - LFG_TYPE_QUEST = 3, - LFG_TYPE_ZONE = 4, - LFG_TYPE_HEROIC_DUNGEON = 5, - LFG_TYPE_RANDOM_DUNGEON = 6 -}; - -enum LfgRoles -{ - LEADER = 0x01, - TANK = 0x02, - HEALER = 0x04, - DAMAGE = 0x08 -}; - -struct LookingForGroupSlot -{ - LookingForGroupSlot() : entry(0), type(0) {} - bool Empty() const { return !entry && !type; } - void Clear() { entry = 0; type = 0; } - void Set(uint32 _entry, uint32 _type) { entry = _entry; type = _type; } - bool Is(uint32 _entry, uint32 _type) const { return entry == _entry && type == _type; } - bool canAutoJoin() const { return entry && (type == LFG_TYPE_DUNGEON || type == LFG_TYPE_HEROIC_DUNGEON); } - - uint32 entry; - uint32 type; -}; - -#define MAX_LOOKING_FOR_GROUP_SLOT 3 - -struct LookingForGroup -{ - LookingForGroup() {} - bool HaveInSlot(LookingForGroupSlot const& slot) const { return HaveInSlot(slot.entry, slot.type); } - bool HaveInSlot(uint32 _entry, uint32 _type) const - { - for (uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i) - if (slots[i].Is(_entry, _type)) - return true; - return false; - } - - bool canAutoJoin() const - { - for (uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i) - if (slots[i].canAutoJoin()) - return true; - return false; - } - - bool Empty() const - { - for (uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i) - if (!slots[i].Empty()) - return false; - return more.Empty(); - } - - LookingForGroupSlot slots[MAX_LOOKING_FOR_GROUP_SLOT]; - LookingForGroupSlot more; - std::string comment; - uint8 roles; -}; - enum PlayerMovementType { MOVE_ROOT = 1, -- cgit v1.2.3