SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
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 - 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 "MapEventTypes.h"
10 #include "GameCommand.h"
11 #include "BitStream.h"
12 
13 #include <QtCore/QString>
14 
15 namespace SEGSEvents
16 {
17 
18 // [[ev_def:type]]
19 class StandardDialogCmd final : public GameCommandEvent
20 {
21 public:
22  // [[ev_def:field]]
23  QString m_msg;
24 
25  explicit StandardDialogCmd() : GameCommandEvent(evStandardDialogCmd) {}
26  StandardDialogCmd(QString msg) : GameCommandEvent(evStandardDialogCmd),
27  m_msg(msg)
28  {
29  }
30 
31  void serializeto(BitStream &bs) const override
32  {
33  bs.StorePackedBits(1, type()-evFirstServerToClient); // packet 14
34  bs.StoreString(m_msg);
35  }
37 };
38 
39 } // end of SEGSEvents namespace
40 
Definition: GameCommand.h:16
QString m_msg
Definition: StandardDialogCmd.h:23
void serializeto(BitStream &bs) const override
Definition: StandardDialogCmd.h:31
StandardDialogCmd()
Definition: StandardDialogCmd.h:25
Definition: BitStream.h:34
Definition: LinkLevelEvent.h:13
void StorePackedBits(uint32_t nBits, uint32_t dataBits)
Definition: BitStream.cpp:161
void StoreString(const char *str)
Definition: BitStream.cpp:204
Definition: StandardDialogCmd.h:19
uint32_t type() const
Definition: SEGSEvent.h:66
#define EVENT_IMPL(name)
Definition: SEGSEvent.h:77
StandardDialogCmd(QString msg)
Definition: StandardDialogCmd.h:26