SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
ServerSelectRequest.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 "Auth/AuthEvents.h"
10 
11 namespace SEGSEvents
12 {
13 // [[ev_def:type]]
15 {
16 public:
18  {}
19  void init(EventSrc *ev_src,uint8_t server_id)
20  {
21  m_server_id = server_id;
22  m_event_source = ev_src;
23  }
24  void serializefrom(GrowingBuffer &buf) override
25  {
26  uint8_t op;
27  buf.uGet(op);
29  buf.uGet(m_server_id);
30  }
31  void serializeto(GrowingBuffer &buf) const override
32  {
33  buf.uPut((uint8_t)2);
35  buf.uPut(m_server_id);
36  }
37  // [[ev_def:field]]
38  uint8_t unkLoginArray[8];
39  // [[ev_def:field]]
40  uint8_t m_server_id = 0;
42 };
43 } //end of namespace SEGSEvents
44 
EventSrc * m_event_source
Definition: SEGSEvent.h:40
void serializeto(GrowingBuffer &buf) const override
Definition: ServerSelectRequest.h:31
uint8_t unkLoginArray[8]
Definition: ServerSelectRequest.h:38
void uGetBytes(uint8_t *t, uint32_t len)
Definition: Buffer.cpp:144
Definition: EventProcessor.h:14
void serializefrom(GrowingBuffer &buf) override
Definition: ServerSelectRequest.h:24
void init(EventSrc *ev_src, uint8_t server_id)
Definition: ServerSelectRequest.h:19
void uGet(T &val)
Definition: Buffer.h:77
uint8_t m_server_id
Definition: ServerSelectRequest.h:40
Definition: LinkLevelEvent.h:13
Definition: Buffer.h:17
#define EVENT_IMPL(name)
Definition: SEGSEvent.h:77
void uPut(const T &val)
Definition: Buffer.h:70
ServerSelectRequest()
Definition: ServerSelectRequest.h:17
Definition: AuthEvents.h:34
Definition: ServerSelectRequest.h:14
void uPutBytes(const uint8_t *t, uint32_t len)
Definition: Buffer.cpp:108
Definition: AuthEvents.h:18