SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ChatMessage.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #pragma once
9 #include "GameCommandList.h"
10 #include "MessageChannels.h"
11 
12 #include <QString>
13 
14 struct MapClientSession;
15 
16 class ChatMessage : public GameCommand
17 {
18 public:
19  QString m_msg;
23  virtual ~ChatMessage() = default;
24  ChatMessage(MessageChannel t, const QString &msg) : GameCommand(MapEventTypes::evChatMessage),
25  m_msg(msg),m_channel_type(t)
26  {
27  }
28  void serializeto(BitStream &bs) const override;
29  void serializefrom(BitStream &src);
30 };
31 
32 extern void sendChatMessage(MessageChannel t, QString msg, MapClientSession *src, MapClientSession *tgt);
Definition: MapClientSession.h:32
QString m_msg
Definition: ChatMessage.h:19
Definition: BitStream.h:30
ChatMessage(MessageChannel t, const QString &msg)
Definition: ChatMessage.h:24
void sendChatMessage(MessageChannel t, QString msg, MapClientSession *src, MapClientSession *tgt)
Definition: ChatMessage.cpp:39
MessageChannel
Definition: MessageChannels.h:10
void serializeto(BitStream &bs) const override
Definition: ChatMessage.cpp:24
int m_source_player_id
Definition: ChatMessage.h:21
int m_target_player_id
Definition: ChatMessage.h:22
virtual ~ChatMessage()=default
Definition: GameCommandList.h:15
Definition: ChatMessage.h:16
MessageChannel m_channel_type
Definition: ChatMessage.h:20
void serializefrom(BitStream &src)
Definition: ChatMessage.cpp:32
Definition: MapEventTypes.h:11