SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StandardDialogCmd.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 #include "MapEvents.h"
12 #include "MapLink.h"
13 
14 #include <QtCore/QString>
15 
16 class StandardDialogCmd final : public GameCommand
17 {
18 public:
19  QString m_msg;
20  StandardDialogCmd(QString msg) : GameCommand(MapEventTypes::evStandardDialogCmd),m_msg(msg)
21  {
22  }
23 
24  void serializeto(BitStream &bs) const override {
25  bs.StorePackedBits(1,type()-MapEventTypes::evFirstServerToClient);
26  bs.StoreString(m_msg);
27  }
28  void serializefrom(BitStream &src);
29 };
Definition: BitStream.h:30
StandardDialogCmd(QString msg)
Definition: StandardDialogCmd.h:20
void serializefrom(BitStream &src)
void StorePackedBits(uint32_t nBits, uint32_t dataBits)
Definition: BitStream.cpp:161
void StoreString(const char *str)
Definition: BitStream.cpp:204
uint32_t type() const
Definition: GameCommandList.h:21
Definition: GameCommandList.h:15
void serializeto(BitStream &bs) const override
Definition: StandardDialogCmd.h:24
Definition: StandardDialogCmd.h:16
Definition: MapEventTypes.h:11
QString m_msg
Definition: StandardDialogCmd.h:19