SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InfoMessageCmd.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 
11 struct MapClientSession;
12 class QString;
13 
14 enum class MessageChannel : int;
15 
17 {
18 public:
19  QString m_msg;
22  virtual ~InfoMessageCmd() = default;
23  InfoMessageCmd(MessageChannel t, const QString &msg) : GameCommand(MapEventTypes::evInfoMessageCmd),
24  m_msg(msg),m_channel_type(t)
25  {
26  }
27  void serializeto(BitStream &bs) const override;
28  void serializefrom(BitStream &src);
29 };
30 
31 extern void sendInfoMessage(MessageChannel t, QString msg, MapClientSession *tgt);
InfoMessageCmd(MessageChannel t, const QString &msg)
Definition: InfoMessageCmd.h:23
Definition: MapClientSession.h:32
Definition: BitStream.h:30
virtual ~InfoMessageCmd()=default
MessageChannel
Definition: MessageChannels.h:10
void sendInfoMessage(MessageChannel t, QString msg, MapClientSession *tgt)
Definition: InfoMessageCmd.cpp:26
Definition: InfoMessageCmd.h:16
virtual void serializeto(BitStream &bs) const =0
QString m_msg
Definition: InfoMessageCmd.h:19
Definition: GameCommandList.h:15
MessageChannel m_channel_type
Definition: InfoMessageCmd.h:20
int m_target_player_id
Definition: InfoMessageCmd.h:21
Definition: MapEventTypes.h:11
void serializefrom(CostumePart &part, BitStream &bs, const ColorAndPartPacker *packingContext)
Definition: Costume.cpp:53