Horizon Official Technical Documentation
ClientPacketLengthTable.hpp
Go to the documentation of this file.
1/***************************************************
2 * _ _ _ *
3 * | | | | (_) *
4 * | |_| | ___ _ __ _ _______ _ __ *
5 * | _ |/ _ \| '__| |_ / _ \| '_ \ *
6 * | | | | (_) | | | |/ / (_) | | | | *
7 * \_| |_/\___/|_| |_/___\___/|_| |_| *
8 ***************************************************
9 * This file is part of Horizon (c).
10 * Copyright (c) 2023 Horizon Dev Team.
11 *
12 * Base Author - Sephus. (sagunxp@gmail.com)
13 *
14 * This library is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this library. If not, see <http://www.gnu.org/licenses/>.
26 **************************************************/
27
28#ifndef HORIZON_CHAR_CLIENT_PACKET_LENGTH_TABLE
29#define HORIZON_CHAR_CLIENT_PACKET_LENGTH_TABLE
30
31#include "PacketLengthTable.hpp"
32
33namespace Horizon
34{
35namespace Char
36{
40class ClientPacketLengthTable : public PacketLengthTable
41{
42public:
43 ClientPacketLengthTable(std::shared_ptr<CharSession> s)
45 {
46#define ADD_HPKT(i, j, k) _hpacket_length_table.insert(i, std::make_pair(j, std::make_shared<k>(s)))
47#define ADD_TPKT(i, j, k) _tpacket_length_table.insert(i, std::make_pair(j, std::make_shared<k>(s)))
48// Packet Version 20040419: 1 Packets
49#if PACKET_VERSION >= 20040419
50 ADD_HPKT(0x01fb, 56, CH_DELETE_CHAR2);
51#endif
52// Packet Version 20040621: 1 Packets
53#if PACKET_VERSION >= 20040621
54 ADD_TPKT(0x020d, -1, HC_BLOCK_CHARACTER);
55#endif
56// Packet Version 20050628: 1 Packets
57#if PACKET_VERSION >= 20050628
59#endif
60// Packet Version 20061023: 6 Packets
61#if PACKET_VERSION >= 20061023
68#endif
69// Packet Version 20070821: 1 Packets
70#if PACKET_VERSION >= 20070821
72#endif
73// Packet Version 20090225: 1 Packets
74#if PACKET_VERSION >= 20090225
75 ADD_TPKT(0x0448, -1, HC_CHARACTER_LIST);
76#endif
77#undef ADD_TPKT
78#undef ADD_HPKT
79 }
80
82
83};
84}
85}
86#endif /* HORIZON_CHAR_CLIENT_PACKET_LENGTH_TABLE */
#define ADD_HPKT(i, j, k)
#define ADD_TPKT(i, j, k)
Main object for the aegis packet: CH_DELETE_CHAR2.
Definition: HandledPackets.hpp:232
Main object for the aegis packet: CH_REQ_CHANGE_CHARNAME.
Definition: HandledPackets.hpp:797
Main object for the aegis packet: CH_REQ_IS_VALID_CHARNAME.
Definition: HandledPackets.hpp:867
Main object for the aegis packet: CH_SELECT_CHAR_GOINGTOBEUSED.
Definition: HandledPackets.hpp:1010
~ClientPacketLengthTable()
Definition: ClientPacketLengthTable.hpp:81
ClientPacketLengthTable(std::shared_ptr< CharSession > s)
Definition: ClientPacketLengthTable.hpp:43
Main object for the aegis packet: HC_ACK_CHANGE_CHARNAME.
Definition: TransmittedPackets.hpp:282
Main object for the aegis packet: HC_ACK_IS_VALID_CHARNAME.
Definition: TransmittedPackets.hpp:358
Main object for the aegis packet: HC_BLOCK_CHARACTER.
Definition: TransmittedPackets.hpp:428
Main object for the aegis packet: HC_CHARACTER_LIST.
Definition: TransmittedPackets.hpp:464
Main object for the aegis packet: HC_CHARNOTBEENSELECTED.
Definition: TransmittedPackets.hpp:534
Main object for the aegis packet: HC_REFUSE_SELECTCHAR.
Definition: TransmittedPackets.hpp:1130
Main object for the aegis packet: HC_REQUEST_CHARACTER_PASSWORD.
Definition: TransmittedPackets.hpp:1168
Auto-generated with a python generator tool authored by Sephus (sagunxp@gmail.com).
Definition: PacketLengthTable.hpp:47
Definition: Element.hpp:7