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