From 62200e8d022479ff057b6898380e1dd8374d2ec2 Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Sun, 6 Jun 2010 22:55:56 +0200 Subject: * Even more restructuring of the game library. --HG-- branch : trunk --- src/server/game/DungeonFinding/LFG.h | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/server/game/DungeonFinding/LFG.h (limited to 'src/server/game/DungeonFinding/LFG.h') diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h new file mode 100644 index 00000000000..c1b55443852 --- /dev/null +++ b/src/server/game/DungeonFinding/LFG.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2008-2010 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _LFG_H +#define _LFG_H + +#include "Platform/Define.h" +#include "Object.h" + +enum LfgRoles +{ + ROLE_NONE = 0x00, + ROLE_LEADER = 0x01, + ROLE_TANK = 0x02, + ROLE_HEALER = 0x04, + ROLE_DAMAGE = 0x08, +}; + +enum LfgUpdateType +{ + LFG_UPDATETYPE_LEADER = 1, + LFG_UPDATETYPE_ROLECHECK_ABORTED = 4, + LFG_UPDATETYPE_JOIN_PROPOSAL = 5, + LFG_UPDATETYPE_ROLECHECK_FAILED = 6, + LFG_UPDATETYPE_REMOVED_FROM_QUEUE = 7, + LFG_UPDATETYPE_PROPOSAL_FAILED = 8, + LFG_UPDATETYPE_PROPOSAL_DECLINED = 9, + LFG_UPDATETYPE_GROUP_FOUND = 10, + LFG_UPDATETYPE_ADDED_TO_QUEUE = 12, + LFG_UPDATETYPE_PROPOSAL_FOUND = 13, + LFG_UPDATETYPE_CLEAR_LOCK_LIST = 14, + LFG_UPDATETYPE_GROUP_MEMBER_OFFLINE = 15, + LFG_UPDATETYPE_GROUP_DISBAND = 16, +}; + +typedef std::set LfgDungeonSet; + +struct LookingForGroup +{ + LookingForGroup(): roles(0) + { + donerandomDungeons.clear(); + applyDungeons.clear(); + } + std::string comment; + int8 roles; + + bool isDungeonDone(const uint32 entry) + { + return donerandomDungeons.find(entry) != donerandomDungeons.end(); + } + + LfgDungeonSet applyDungeons; // Dungeons the player have applied for + LfgDungeonSet donerandomDungeons; // Finished random Dungeons (to calculate the bonus); +}; + +#endif -- cgit v1.2.3