SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ServerSelectResponse.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
10 
12 {
13 public:
15  {}
16  ServerSelectResponse(EventProcessor *ev_src,uint32_t cookie,uint32_t dbcookie) : AuthLinkEvent(evServerSelectResponse,ev_src),
17  db_server_cookie(dbcookie),
18  m_cookie(cookie),
19  m_unk2(0)
20  {}
22  {
23  assert(buf.GetReadableDataSize()>=10);
24  uint8_t op;
25  buf.uGet(op);
27  buf.uGet(m_cookie);
28  buf.uGet(m_unk2);
29  }
30  void serializeto(GrowingBuffer &buf) const
31  {
32  buf.uPut((uint8_t)7);
34  buf.uPut(m_cookie);
35  buf.uPut(m_unk2);
36  }
37  void init(EventProcessor *ev_src, uint32_t cookie, uint32_t dbcookie)
38  {
39  m_cookie = cookie;
40  db_server_cookie = dbcookie;
41  m_unk2 = 0;
42  m_event_source = ev_src;
43  }
44  uint32_t db_server_cookie;
45  uint32_t m_cookie;
46  uint8_t m_unk2;
47 };
void serializeto(GrowingBuffer &buf) const
Definition: ServerSelectResponse.h:30
size_t GetReadableDataSize() const
Definition: Buffer.h:96
uint8_t m_unk2
Definition: ServerSelectResponse.h:46
void uGet(T &val)
Definition: Buffer.h:76
ServerSelectResponse()
Definition: ServerSelectResponse.h:14
Definition: ServerSelectResponse.h:11
ServerSelectResponse(EventProcessor *ev_src, uint32_t cookie, uint32_t dbcookie)
Definition: ServerSelectResponse.h:16
uint32_t m_cookie
Definition: ServerSelectResponse.h:45
Definition: Buffer.h:17
void serializefrom(GrowingBuffer &buf)
Definition: ServerSelectResponse.h:21
uint32_t db_server_cookie
Definition: ServerSelectResponse.h:44
Definition: AuthEvents.h:38
void init(EventProcessor *ev_src, uint32_t cookie, uint32_t dbcookie)
Definition: ServerSelectResponse.h:37
void uPut(const T &val)
Definition: Buffer.h:69
Definition: EventProcessor.h:13
EventProcessor * m_event_source
Definition: SEGSEvent.h:36
Definition: AuthEvents.h:15