SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
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 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #pragma once
9 #include "MessageChannels.h"
10 #include "GameCommand.h"
11 #include "MapEventTypes.h"
12 
13 
14 
15 struct MapClientSession;
16 
17 namespace SEGSEvents
18 {
19 // [[ev_def:type]]
21 {
22 public:
23  // [[ev_def:field]]
24  QString m_msg;
25  // [[ev_def:field]]
27  // [[ev_def:field]]
29  // [[ev_def:field]]
32  ChatMessage(MessageChannel t, const QString &msg) : GameCommandEvent(MapEventTypes::evChatMessage),
33  m_msg(msg),m_channel_type(t)
34  {
35  }
36  void serializeto(BitStream &bs) const override;
37  void serializefrom(BitStream &src) override;
39 };
40 
41 } // end of SEGSEvents namespace
Definition: GameCommand.h:16
Definition: MapClientSession.h:32
int m_source_player_id
Definition: ChatMessage.h:28
QString m_msg
Definition: ChatMessage.h:24
MessageChannel m_channel_type
Definition: ChatMessage.h:26
Definition: BitStream.h:34
Definition: LinkLevelEvent.h:13
void serializefrom(BitStream &src) override
Definition: ChatMessage.cpp:27
ChatMessage(MessageChannel t, const QString &msg)
Definition: ChatMessage.h:32
MapEventTypes
Definition: MapEventTypes.h:14
int m_target_player_id
Definition: ChatMessage.h:30
MessageChannel
Definition: MessageChannels.h:10
ChatMessage()
Definition: ChatMessage.h:31
void serializeto(BitStream &bs) const override
Definition: ChatMessage.cpp:19
#define EVENT_IMPL(name)
Definition: SEGSEvent.h:77
Definition: ChatMessage.h:20
EventSrc * src() const
Definition: SEGSEvent.h:65