Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
ChannelMgr.h
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#ifndef SF_SKYFIRE_CHANNELMGR_H
7
#define SF_SKYFIRE_CHANNELMGR_H
8
9
#include "
Channel.h
"
10
#include "
Common.h
"
11
#include "
Platform/Singleton.h
"
12
13
#include <map>
14
#include <string>
15
16
#include "
World.h
"
17
18
class
ChannelMgr
19
{
20
typedef
std::map<std::wstring, Channel*>
ChannelMap
;
21
22
public
:
23
ChannelMgr
() :
team
(0)
24
{ }
25
26
~ChannelMgr
();
27
28
static
ChannelMgr
*
forTeam
(
uint32
team
);
29
void
setTeam
(
uint32
newTeam) {
team
= newTeam; }
30
31
Channel
*
GetJoinChannel
(std::string
const
& name,
uint32
channel_id);
32
Channel
*
GetChannel
(std::string
const
& name,
Player
* p,
bool
pkt =
true
);
33
void
LeftChannel
(std::string
const
& name);
34
35
private
:
36
ChannelMap
channels
;
37
uint32
team
;
38
39
void
MakeNotOnPacket
(
WorldPacket
* data, std::string
const
& name);
40
};
41
42
class
AllianceChannelMgr
:
public
ChannelMgr
{ };
43
class
HordeChannelMgr
:
public
ChannelMgr
{ };
44
45
#endif
Channel.h
Common.h
uint32
std::uint32_t uint32
Definition
Define.h:77
Singleton.h
World.h
AllianceChannelMgr
Definition
ChannelMgr.h:42
Channel
Definition
Channel.h:107
ChannelMgr
Definition
ChannelMgr.h:19
ChannelMgr::LeftChannel
void LeftChannel(std::string const &name)
Definition
ChannelMgr.cpp:76
ChannelMgr::~ChannelMgr
~ChannelMgr()
Definition
ChannelMgr.cpp:11
ChannelMgr::ChannelMap
std::map< std::wstring, Channel * > ChannelMap
Definition
ChannelMgr.h:20
ChannelMgr::team
uint32 team
Definition
ChannelMgr.h:37
ChannelMgr::ChannelMgr
ChannelMgr()
Definition
ChannelMgr.h:23
ChannelMgr::forTeam
static ChannelMgr * forTeam(uint32 team)
Definition
ChannelMgr.cpp:17
ChannelMgr::channels
ChannelMap channels
Definition
ChannelMgr.h:36
ChannelMgr::GetChannel
Channel * GetChannel(std::string const &name, Player *p, bool pkt=true)
Definition
ChannelMgr.cpp:51
ChannelMgr::GetJoinChannel
Channel * GetJoinChannel(std::string const &name, uint32 channel_id)
Definition
ChannelMgr.cpp:31
ChannelMgr::MakeNotOnPacket
void MakeNotOnPacket(WorldPacket *data, std::string const &name)
Definition
ChannelMgr.cpp:98
ChannelMgr::setTeam
void setTeam(uint32 newTeam)
Definition
ChannelMgr.h:29
HordeChannelMgr
Definition
ChannelMgr.h:43
Player
Definition
Player.h:1289
WorldPacket
Definition
WorldPacket.h:16
src
server
game
Chat
Channels
ChannelMgr.h
Generated on
for Project SkyFire Core by
1.17.0