SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SidekickOffer.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 #include "Logging.h"
11 
12 class SidekickOffer final : public GameCommand
13 {
14 public:
15  uint32_t m_db_id;
16  SidekickOffer(uint32_t &db_id) : GameCommand(MapEventTypes::evSidekickOffer),
17  m_db_id(db_id)
18  {
19  }
20  void serializeto(BitStream &bs) const override
21  {
22  bs.StorePackedBits(1,type()-MapEventTypes::evFirstServerToClient); // 28
23  bs.StoreBits(32,m_db_id);
24  qCDebug(logTeams) << "Sidekick Offer db_id:" << m_db_id;
25  }
26  void serializefrom(BitStream &src);
27 };
void StoreBits(uint32_t nBits, uint32_t dataBits)
Definition: BitStream.cpp:114
void serializeto(BitStream &bs) const override
Definition: SidekickOffer.h:20
Definition: SidekickOffer.h:12
Definition: BitStream.h:30
void StorePackedBits(uint32_t nBits, uint32_t dataBits)
Definition: BitStream.cpp:161
uint32_t m_db_id
Definition: SidekickOffer.h:15
uint32_t type() const
Definition: GameCommandList.h:21
Definition: GameCommandList.h:15
void serializefrom(BitStream &src)
SidekickOffer(uint32_t &db_id)
Definition: SidekickOffer.h:16
Definition: MapEventTypes.h:11