SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlayerInfo.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 class EntityInfoResponse final : public GameCommand
15 {
16 public:
17  QString m_info_text;
18  EntityInfoResponse (const QString &txt) : GameCommand(MapEventTypes::evEntityInfoResponse),m_info_text(txt) {}
19  void serializefrom(BitStream &bs);
20 
21  void serializeto(BitStream &bs) const override
22  {
23  qCDebug(logMapEvents) << "Info Response: " << m_info_text;
24  bs.StorePackedBits(1, 69);
26  }
27 };
28 
29 class EntityInfoRequest final : public MapLinkEvent
30 {
31 public:
34  {}
35  void serializeto(BitStream &/*bs*/) const override
36  {
37  assert(!"implemented");
38  }
39  void serializefrom(BitStream &bs) override
40  {
41  entity_idx = bs.GetPackedBits(12);
42  }
43 };
int entity_idx
Definition: PlayerInfo.h:32
Definition: PlayerInfo.h:29
EntityInfoResponse(const QString &txt)
Definition: PlayerInfo.h:18
QString m_info_text
Definition: PlayerInfo.h:17
Definition: PlayerInfo.h:14
int32_t GetPackedBits(uint32_t minbits)
Definition: BitStream.cpp:285
Definition: BitStream.h:30
void serializeto(BitStream &bs) const override
Definition: PlayerInfo.h:21
void StorePackedBits(uint32_t nBits, uint32_t dataBits)
Definition: BitStream.cpp:161
void StoreString(const char *str)
Definition: BitStream.cpp:204
Definition: GameCommandList.h:15
void serializefrom(BitStream &bs) override
Definition: PlayerInfo.h:39
void serializefrom(BitStream &bs)
void serializeto(BitStream &) const override
Definition: PlayerInfo.h:35
EntityInfoRequest()
Definition: PlayerInfo.h:33
Definition: MapEventTypes.h:11