Project SkyFire Core
SkyFire 5.4.8 server core API documentation
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
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
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
29{
30 SF_LOG_DEBUG("network", "WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
31 recvData.read_skip<uint32>();
32 recvData.read_skip<char*>();
33}
std::uint32_t uint32
Definition Define.h:77
#define SF_LOG_DEBUG(filterType__,...)
Definition Log.h:134
void read_skip()
Definition ByteBuffer.h:502
uint32 ReadBits(size_t bits)
Definition ByteBuffer.h:198
std::string ReadString(size_t length)
Definition ByteBuffer.h:565
bool ReadBit()
Definition ByteBuffer.h:180
void HandleVoiceSessionEnableOpcode(WorldPacket &recvData)
void HandleChannelVoiceOnOpcode(WorldPacket &recvData)
void HandleSetActiveVoiceChannel(WorldPacket &recvData)