root/trunk/src/arcemu-world/LfgMgr.h @ 3131

Revision 3131, 2.2 kB (checked in by Hypersniper, 8 months ago)

* APPLIED:
- Alterac Valley patch by Artox
- Copyrights patch by Terrorblade
- Earth shield patch by Jackpoz
- Energize patch by Arch1s
- Opcode fix by Sadikum
- Optional config fix by Psychobandit
- Various spells by Catti
- Various spells by Mesox/Ogchaos
- "Summon Myzrael" fix by this_is_junk
- "Torgos" fix by dzjhenghiz
- Worldstates patch by eggnrice
Good work community!

  • Property svn:eol-style set to native
  • Property ff set to
    *.cpp = svn:eol-style=native
    Makefile = svn:eol-style=native
    README = svn:eol-style=native
    CHANGELOG = svn:eol-style=native
    LICENSE = svn:eol-style=native
  • Property svn:keywords set to Date Author Rev
Line 
1/*
2 * ArcEmu MMORPG Server
3 * Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/>
4 * Copyright (C) 2008-2010 <http://www.ArcEmu.org/>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21enum LFGTypes
22{
23        LFG_NONE = 0,
24        LFG_INSTANCE = 1,
25        LFG_RAID = 2,
26        LFG_QUEST = 3,
27        LFG_ZONE = 4,
28        LFG_HEROIC_DUNGEON = 5, // from client
29        LFG_ANY_DUNGEON = 6,
30        LFG_ANY_HEROIC_DUNGEON = 7,
31        LFG_DAILY_DUNGEON = 8,
32        LFG_DAILY_HEROIC_DUNGEON = 9,
33};
34
35#define MAX_DUNGEONS 257+1 // check max entry's +1 on lfgdungeons.dbc
36#define MAX_LFG_QUEUE_ID 3
37#define LFG_MATCH_TIMEOUT 30            // in seconds
38
39class LfgMatch;
40class LfgMgr : public Singleton < LfgMgr >, EventableObject
41{
42public: 
43       
44        typedef list<Player*> LfgPlayerList;
45
46        LfgMgr();
47        ~LfgMgr();
48       
49        bool AttemptLfgJoin(Player * pl, uint32 LfgDungeonId);
50        void SetPlayerInLFGqueue(Player *pl,uint32 LfgDungeonId);
51        void SetPlayerInLfmList(Player * pl, uint32 LfgDungeonId);
52        void RemovePlayerFromLfgQueue(Player *pl,uint32 LfgDungeonId);
53        void RemovePlayerFromLfgQueues(Player * pl);
54        void RemovePlayerFromLfmList(Player * pl, uint32 LfmDungeonId);
55        void UpdateLfgQueue(uint32 LfgDungeonId);
56        void SendLfgList(Player * plr, uint32 Dungeon);
57
58        int32 event_GetInstanceId() { return -1; }
59       
60protected:
61       
62        LfgPlayerList m_lookingForGroup[MAX_DUNGEONS];
63        LfgPlayerList m_lookingForMore[MAX_DUNGEONS];
64        Mutex m_lock;
65       
66       
67};
68
69class LfgMatch
70{
71public:
72        set<Player*> PendingPlayers;
73        set<Player*> AcceptedPlayers;
74        Mutex lock;
75        uint32 DungeonId;
76    Group * pGroup;
77
78        LfgMatch(uint32 did) : DungeonId(did),pGroup(NULL) { }
79};
80
81extern uint32 LfgDungeonTypes[MAX_DUNGEONS];
82
83#define sLfgMgr LfgMgr::getSingleton()
Note: See TracBrowser for help on using the browser.