Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
VoiceChatHandler.cpp
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
#include "
Common.h
"
7
#include "
Log.h
"
8
#include "
Opcodes.h
"
9
#include "
WorldPacket.h
"
10
#include "
WorldSession.h
"
11
12
void
WorldSession::HandleVoiceSessionEnableOpcode
(
WorldPacket
& recvData)
13
{
14
SF_LOG_DEBUG
(
"network"
,
"WORLD: CMSG_VOICE_SESSION_ENABLE"
);
15
bool
isVoiceEnabled, isMicrophoneEnabled;
16
isVoiceEnabled = recvData.
ReadBit
();
17
isMicrophoneEnabled = recvData.
ReadBit
();
18
}
19
20
void
WorldSession::HandleChannelVoiceOnOpcode
(
WorldPacket
& recvData)
21
{
22
SF_LOG_DEBUG
(
"network"
,
"WORLD: CMSG_CHANNEL_VOICE_ON"
);
23
// Enable Voice button in channel context menu
24
recvData.
ReadString
(recvData.
ReadBits
(8));
25
//channel->EnableVoice(recvData.GetOpcode() == CMSG_CHANNEL_VOICE_ON);
26
}
27
28
void
WorldSession::HandleSetActiveVoiceChannel
(
WorldPacket
& recvData)
29
{
30
SF_LOG_DEBUG
(
"network"
,
"WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL"
);
31
recvData.
read_skip
<
uint32
>();
32
recvData.
read_skip
<
char
*>();
33
}
Common.h
uint32
std::uint32_t uint32
Definition
Define.h:77
Log.h
SF_LOG_DEBUG
#define SF_LOG_DEBUG(filterType__,...)
Definition
Log.h:134
Opcodes.h
WorldPacket.h
WorldSession.h
ByteBuffer::read_skip
void read_skip()
Definition
ByteBuffer.h:502
ByteBuffer::ReadBits
uint32 ReadBits(size_t bits)
Definition
ByteBuffer.h:198
ByteBuffer::ReadString
std::string ReadString(size_t length)
Definition
ByteBuffer.h:565
ByteBuffer::ReadBit
bool ReadBit()
Definition
ByteBuffer.h:180
WorldPacket
Definition
WorldPacket.h:16
WorldSession::HandleVoiceSessionEnableOpcode
void HandleVoiceSessionEnableOpcode(WorldPacket &recvData)
Definition
VoiceChatHandler.cpp:12
WorldSession::HandleChannelVoiceOnOpcode
void HandleChannelVoiceOnOpcode(WorldPacket &recvData)
Definition
VoiceChatHandler.cpp:20
WorldSession::HandleSetActiveVoiceChannel
void HandleSetActiveVoiceChannel(WorldPacket &recvData)
Definition
VoiceChatHandler.cpp:28
src
server
game
Handlers
VoiceChatHandler.cpp
Generated on
for Project SkyFire Core by
1.17.0