Horizon Official Technical Documentation
HandledPackets.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_AUTH_HANDLED_PACKETS_HPP
29#define HORIZON_AUTH_HANDLED_PACKETS_HPP
30
33
34namespace Horizon
35{
36namespace Auth
37{
38class AuthSession;
39enum {
40#if CLIENT_TYPE == 'A' && \
41 PACKET_VERSION >= 20060126
43#elif CLIENT_TYPE == 'M' && \
44 PACKET_VERSION >= 20060126
46#elif CLIENT_TYPE == 'R' && \
47 PACKET_VERSION >= 20080000
49#elif CLIENT_TYPE == 'S' && \
50 PACKET_VERSION >= 20060126
52#elif CLIENT_TYPE == 'Z' && \
53 PACKET_VERSION >= 20170000
55#else
56ID_CA_ACK_LOGIN_ACCOUNT_INFO = 0x0000 // Disabled
57#endif
58};
64{
65public:
66 CA_ACK_LOGIN_ACCOUNT_INFO(std::shared_ptr<AuthSession> s)
68 {}
70
71 void handle(ByteBuffer &&buf);
73
74/* Structure */
75};
76
77enum {
78#if CLIENT_TYPE == 'A' && \
79 PACKET_VERSION >= 20060109
81#elif CLIENT_TYPE == 'M' && \
82 PACKET_VERSION >= 20060109
84#elif CLIENT_TYPE == 'R' && \
85 PACKET_VERSION >= 20080000
87#elif CLIENT_TYPE == 'S' && \
88 PACKET_VERSION >= 20060109
90#elif CLIENT_TYPE == 'Z' && \
91 PACKET_VERSION >= 20170000
93#else
94ID_CA_ACK_LOGIN_CARDPASS = 0x0000 // Disabled
95#endif
96};
102{
103public:
104 CA_ACK_LOGIN_CARDPASS(std::shared_ptr<AuthSession> s)
106 {}
108
109 void handle(ByteBuffer &&buf);
111
112/* Structure */
113};
114
115enum {
116#if CLIENT_TYPE == 'A' && \
117 PACKET_VERSION >= 20060109
119#elif CLIENT_TYPE == 'M' && \
120 PACKET_VERSION >= 20060109
122#elif CLIENT_TYPE == 'R' && \
123 PACKET_VERSION >= 20080000
125#elif CLIENT_TYPE == 'S' && \
126 PACKET_VERSION >= 20060109
128#elif CLIENT_TYPE == 'Z' && \
129 PACKET_VERSION >= 20170000
131#else
132ID_CA_ACK_LOGIN_NEWEKEY = 0x0000 // Disabled
133#endif
139class CA_ACK_LOGIN_NEWEKEY : public Base::NetworkPacket<AuthSession>
140{
141public:
142 CA_ACK_LOGIN_NEWEKEY(std::shared_ptr<AuthSession> s)
144 {}
146
147 void handle(ByteBuffer &&buf);
149
150/* Structure */
151};
152
153enum {
154#if CLIENT_TYPE == 'A' && \
155 PACKET_VERSION >= 20060109
157#elif CLIENT_TYPE == 'M' && \
158 PACKET_VERSION >= 20060109
160#elif CLIENT_TYPE == 'R' && \
161 PACKET_VERSION >= 20080000
163#elif CLIENT_TYPE == 'S' && \
164 PACKET_VERSION >= 20060109
166#elif CLIENT_TYPE == 'Z' && \
167 PACKET_VERSION >= 20170000
169#else
170ID_CA_ACK_LOGIN_OLDEKEY = 0x0000 // Disabled
171#endif
177class CA_ACK_LOGIN_OLDEKEY : public Base::NetworkPacket<AuthSession>
178{
179public:
180 CA_ACK_LOGIN_OLDEKEY(std::shared_ptr<AuthSession> s)
182 {}
184
185 void handle(ByteBuffer &&buf);
187
188/* Structure */
189};
190
191enum {
192#if CLIENT_TYPE == 'M' && \
193 PACKET_VERSION >= 20130130
195#elif CLIENT_TYPE == 'R' && \
196 PACKET_VERSION >= 20130130
198#elif CLIENT_TYPE == 'Z' && \
199 PACKET_VERSION >= 20170000
201#else
202ID_CA_ACK_MOBILE_OTP = 0x0000 // Disabled
203#endif
209class CA_ACK_MOBILE_OTP : public Base::NetworkPacket<AuthSession>
210{
211public:
212 CA_ACK_MOBILE_OTP(std::shared_ptr<AuthSession> s)
214 {}
216
217 void handle(ByteBuffer &&buf);
219
220/* Structure */
221};
222
223enum {
224#if CLIENT_TYPE == 'M' && \
225 PACKET_VERSION >= 20120716
226ID_CA_ACK_NEW_USER = 0x098c
227#elif CLIENT_TYPE == 'R' && \
228 PACKET_VERSION >= 20120716
229ID_CA_ACK_NEW_USER = 0x098c
230#elif CLIENT_TYPE == 'Z' && \
231 PACKET_VERSION >= 20170000
232ID_CA_ACK_NEW_USER = 0x098c
233#else
234ID_CA_ACK_NEW_USER = 0x0000 // Disabled
235#endif
241class CA_ACK_NEW_USER : public Base::NetworkPacket<AuthSession>
242{
243public:
244 CA_ACK_NEW_USER(std::shared_ptr<AuthSession> s)
246 {}
247 virtual ~CA_ACK_NEW_USER() {}
248
249 void handle(ByteBuffer &&buf);
251
252/* Structure */
253};
254
255enum {
256#if CLIENT_TYPE == 'A' && \
257 PACKET_VERSION >= 20060821
258ID_CA_CLIENT_TYPE = 0x027f
259#elif CLIENT_TYPE == 'M' && \
260 PACKET_VERSION >= 20060821
261ID_CA_CLIENT_TYPE = 0x027f
262#elif CLIENT_TYPE == 'R' && \
263 PACKET_VERSION >= 20080000
264ID_CA_CLIENT_TYPE = 0x027f
265#elif CLIENT_TYPE == 'S' && \
266 PACKET_VERSION >= 20060821
267ID_CA_CLIENT_TYPE = 0x027f
268#elif CLIENT_TYPE == 'Z' && \
269 PACKET_VERSION >= 20170000
270ID_CA_CLIENT_TYPE = 0x027f
271#else
272ID_CA_CLIENT_TYPE = 0x0000 // Disabled
273#endif
279class CA_CLIENT_TYPE : public Base::NetworkPacket<AuthSession>
280{
281public:
282 CA_CLIENT_TYPE(std::shared_ptr<AuthSession> s)
284 {}
285 virtual ~CA_CLIENT_TYPE() {}
286
287 void handle(ByteBuffer &&buf);
289
290/* Structure */
291};
292
293enum {
294#if CLIENT_TYPE == 'A' && \
295 PACKET_VERSION >= 20040000
297#elif CLIENT_TYPE == 'M' && \
298 PACKET_VERSION >= 20040517
300#elif CLIENT_TYPE == 'R' && \
301 PACKET_VERSION >= 20080000
303#elif CLIENT_TYPE == 'S' && \
304 PACKET_VERSION >= 20040517
306#elif CLIENT_TYPE == 'Z' && \
307 PACKET_VERSION >= 20170000
309#else
310ID_CA_CONNECT_INFO_CHANGED = 0x0000 // Disabled
311#endif
318{
319public:
320 CA_CONNECT_INFO_CHANGED(std::shared_ptr<AuthSession> s)
322 {}
324
325 void handle(ByteBuffer &&buf);
327
328/* Structure */
329};
330
331enum {
332#if CLIENT_TYPE == 'A' && \
333 PACKET_VERSION >= 20040000
334ID_CA_EXE_HASHCHECK = 0x0204
335#elif CLIENT_TYPE == 'M' && \
336 PACKET_VERSION >= 20040531
337ID_CA_EXE_HASHCHECK = 0x0204
338#elif CLIENT_TYPE == 'R' && \
339 PACKET_VERSION >= 20080000
340ID_CA_EXE_HASHCHECK = 0x0204
341#elif CLIENT_TYPE == 'S' && \
342 PACKET_VERSION >= 20040531
343ID_CA_EXE_HASHCHECK = 0x0204
344#elif CLIENT_TYPE == 'Z' && \
345 PACKET_VERSION >= 20170000
346ID_CA_EXE_HASHCHECK = 0x0204
347#else
348ID_CA_EXE_HASHCHECK = 0x0000 // Disabled
349#endif
355class CA_EXE_HASHCHECK : public Base::NetworkPacket<AuthSession>
356{
357public:
358 CA_EXE_HASHCHECK(std::shared_ptr<AuthSession> s)
360 {}
361 virtual ~CA_EXE_HASHCHECK() {}
362
363 void handle(ByteBuffer &&buf);
365
366/* Structure */
367};
368
369enum {
370#if CLIENT_TYPE == 'A' && \
371 PACKET_VERSION >= 20040000
372ID_CA_LOGIN = 0x0064
373#elif CLIENT_TYPE == 'M' && \
374 PACKET_VERSION >= 20030000
375ID_CA_LOGIN = 0x0064
376#elif CLIENT_TYPE == 'R' && \
377 PACKET_VERSION >= 20080000
378ID_CA_LOGIN = 0x0064
379#elif CLIENT_TYPE == 'S' && \
380 PACKET_VERSION >= 20030000
381ID_CA_LOGIN = 0x0064
382#elif CLIENT_TYPE == 'Z' && \
383 PACKET_VERSION >= 20170000
384ID_CA_LOGIN = 0x0064
385#else
386ID_CA_LOGIN = 0x0000 // Disabled
387#endif
393class CA_LOGIN : public Base::NetworkPacket<AuthSession>
394{
395public:
396 CA_LOGIN(std::shared_ptr<AuthSession> s)
398 {}
399 virtual ~CA_LOGIN() {}
400
401 void handle(ByteBuffer &&buf);
403 ByteBuffer serialize(int32_t version, std::string username, std::string password, uint8_t client_type);
404
405/* Structure */
406 uint32_t _version{ 0 };
407 char _username[24]{ 0 };
408 char _password[24]{ 0 };
409 uint8_t _client_type{ 0 };
410};
411
412enum {
413#if CLIENT_TYPE == 'A' && \
414 PACKET_VERSION >= 20040000
415ID_CA_LOGIN2 = 0x01dd
416#elif CLIENT_TYPE == 'M' && \
417 PACKET_VERSION >= 20030000
418ID_CA_LOGIN2 = 0x01dd
419#elif CLIENT_TYPE == 'R' && \
420 PACKET_VERSION >= 20080000
421ID_CA_LOGIN2 = 0x01dd
422#elif CLIENT_TYPE == 'S' && \
423 PACKET_VERSION >= 20030000
424ID_CA_LOGIN2 = 0x01dd
425#elif CLIENT_TYPE == 'Z' && \
426 PACKET_VERSION >= 20170000
427ID_CA_LOGIN2 = 0x01dd
428#else
429ID_CA_LOGIN2 = 0x0000 // Disabled
430#endif
436class CA_LOGIN2 : public Base::NetworkPacket<AuthSession>
437{
438public:
439 CA_LOGIN2(std::shared_ptr<AuthSession> s)
441 {}
442 virtual ~CA_LOGIN2() {}
443
444 void handle(ByteBuffer &&buf);
446
447/* Structure */
448};
449
450enum {
451#if CLIENT_TYPE == 'A' && \
452 PACKET_VERSION >= 20040000
453ID_CA_LOGIN3 = 0x01fa
454#elif CLIENT_TYPE == 'M' && \
455 PACKET_VERSION >= 20040322
456ID_CA_LOGIN3 = 0x01fa
457#elif CLIENT_TYPE == 'R' && \
458 PACKET_VERSION >= 20080000
459ID_CA_LOGIN3 = 0x01fa
460#elif CLIENT_TYPE == 'S' && \
461 PACKET_VERSION >= 20040322
462ID_CA_LOGIN3 = 0x01fa
463#elif CLIENT_TYPE == 'Z' && \
464 PACKET_VERSION >= 20170000
465ID_CA_LOGIN3 = 0x01fa
466#else
467ID_CA_LOGIN3 = 0x0000 // Disabled
468#endif
474class CA_LOGIN3 : public Base::NetworkPacket<AuthSession>
475{
476public:
477 CA_LOGIN3(std::shared_ptr<AuthSession> s)
479 {}
480 virtual ~CA_LOGIN3() {}
481
482 void handle(ByteBuffer &&buf);
484
485/* Structure */
486};
487
488enum {
489#if CLIENT_TYPE == 'A' && \
490 PACKET_VERSION >= 20060626
491ID_CA_LOGIN4 = 0x027c
492#elif CLIENT_TYPE == 'M' && \
493 PACKET_VERSION >= 20060626
494ID_CA_LOGIN4 = 0x027c
495#elif CLIENT_TYPE == 'R' && \
496 PACKET_VERSION >= 20080000
497ID_CA_LOGIN4 = 0x027c
498#elif CLIENT_TYPE == 'S' && \
499 PACKET_VERSION >= 20060626
500ID_CA_LOGIN4 = 0x027c
501#elif CLIENT_TYPE == 'Z' && \
502 PACKET_VERSION >= 20170000
503ID_CA_LOGIN4 = 0x027c
504#else
505ID_CA_LOGIN4 = 0x0000 // Disabled
506#endif
512class CA_LOGIN4 : public Base::NetworkPacket<AuthSession>
513{
514public:
515 CA_LOGIN4(std::shared_ptr<AuthSession> s)
517 {}
518 virtual ~CA_LOGIN4() {}
519
520 void handle(ByteBuffer &&buf);
522
523/* Structure */
524};
525
526enum {
527#if CLIENT_TYPE == 'M' && \
528 PACKET_VERSION >= 20110726
529ID_CA_LOGIN5 = 0x08cc
530#elif CLIENT_TYPE == 'R' && \
531 PACKET_VERSION >= 20110726
532ID_CA_LOGIN5 = 0x08cc
533#elif CLIENT_TYPE == 'Z' && \
534 PACKET_VERSION >= 20170000
535ID_CA_LOGIN5 = 0x08cc
536#else
537ID_CA_LOGIN5 = 0x0000 // Disabled
538#endif
544class CA_LOGIN5 : public Base::NetworkPacket<AuthSession>
545{
546public:
547 CA_LOGIN5(std::shared_ptr<AuthSession> s)
549 {}
550 virtual ~CA_LOGIN5() {}
551
552 void handle(ByteBuffer &&buf);
554
555/* Structure */
556};
557
558enum {
559#if CLIENT_TYPE == 'M' && \
560 PACKET_VERSION >= 20120702
561ID_CA_LOGIN6 = 0x0987
562#elif CLIENT_TYPE == 'R' && \
563 PACKET_VERSION >= 20120702
564ID_CA_LOGIN6 = 0x0987
565#elif CLIENT_TYPE == 'Z' && \
566 PACKET_VERSION >= 20170000
567ID_CA_LOGIN6 = 0x0987
568#else
569ID_CA_LOGIN6 = 0x0000 // Disabled
570#endif
576class CA_LOGIN6 : public Base::NetworkPacket<AuthSession>
577{
578public:
579 CA_LOGIN6(std::shared_ptr<AuthSession> s)
581 {}
582 virtual ~CA_LOGIN6() {}
583
584 void handle(ByteBuffer &&buf);
586
587/* Structure */
588};
589
590enum {
591#if CLIENT_TYPE == 'A' && \
592 PACKET_VERSION >= 20070514
593ID_CA_LOGIN_HAN = 0x02b0
594#elif CLIENT_TYPE == 'M' && \
595 PACKET_VERSION >= 20070514
596ID_CA_LOGIN_HAN = 0x02b0
597#elif CLIENT_TYPE == 'R' && \
598 PACKET_VERSION >= 20080000
599ID_CA_LOGIN_HAN = 0x02b0
600#elif CLIENT_TYPE == 'S' && \
601 PACKET_VERSION >= 20070514
602ID_CA_LOGIN_HAN = 0x02b0
603#elif CLIENT_TYPE == 'Z' && \
604 PACKET_VERSION >= 20170000
605ID_CA_LOGIN_HAN = 0x02b0
606#else
607ID_CA_LOGIN_HAN = 0x0000 // Disabled
608#endif
614class CA_LOGIN_HAN : public Base::NetworkPacket<AuthSession>
615{
616public:
617 CA_LOGIN_HAN(std::shared_ptr<AuthSession> s)
619 {}
620 virtual ~CA_LOGIN_HAN() {}
621
622 void handle(ByteBuffer &&buf);
624
625/* Structure */
626};
627
628enum {
629#if CLIENT_TYPE == 'M' && \
630 PACKET_VERSION >= 20171115
631ID_CA_LOGIN_OTP = 0x0acf
632#elif CLIENT_TYPE == 'M' && \
633 PACKET_VERSION >= 20130605
634ID_CA_LOGIN_OTP = 0x09c8
635#elif CLIENT_TYPE == 'R' && \
636 PACKET_VERSION >= 20130605
637ID_CA_LOGIN_OTP = 0x09c8
638#elif CLIENT_TYPE == 'R' && \
639 PACKET_VERSION >= 20171115
640ID_CA_LOGIN_OTP = 0x0acf
641#elif CLIENT_TYPE == 'Z' && \
642 PACKET_VERSION >= 20170000
643ID_CA_LOGIN_OTP = 0x09c8
644#elif CLIENT_TYPE == 'Z' && \
645 PACKET_VERSION >= 20171113
646ID_CA_LOGIN_OTP = 0x0acf
647#else
648ID_CA_LOGIN_OTP = 0x0000 // Disabled
649#endif
655class CA_LOGIN_OTP : public Base::NetworkPacket<AuthSession>
656{
657public:
658 CA_LOGIN_OTP(std::shared_ptr<AuthSession> s)
660 {}
661 virtual ~CA_LOGIN_OTP() {}
662
663 void handle(ByteBuffer &&buf);
665
666/* Structure */
667};
668
669enum {
670#if CLIENT_TYPE == 'A' && \
671 PACKET_VERSION >= 20060424
672ID_CA_LOGIN_PCBANG = 0x0277
673#elif CLIENT_TYPE == 'M' && \
674 PACKET_VERSION >= 20060424
675ID_CA_LOGIN_PCBANG = 0x0277
676#elif CLIENT_TYPE == 'R' && \
677 PACKET_VERSION >= 20080000
678ID_CA_LOGIN_PCBANG = 0x0277
679#elif CLIENT_TYPE == 'S' && \
680 PACKET_VERSION >= 20060424
681ID_CA_LOGIN_PCBANG = 0x0277
682#elif CLIENT_TYPE == 'Z' && \
683 PACKET_VERSION >= 20170000
684ID_CA_LOGIN_PCBANG = 0x0277
685#else
686ID_CA_LOGIN_PCBANG = 0x0000 // Disabled
687#endif
693class CA_LOGIN_PCBANG : public Base::NetworkPacket<AuthSession>
694{
695public:
696 CA_LOGIN_PCBANG(std::shared_ptr<AuthSession> s)
698 {}
699 virtual ~CA_LOGIN_PCBANG() {}
700
701 void handle(ByteBuffer &&buf);
703
704/* Structure */
705};
706
707enum {
708#if CLIENT_TYPE == 'M' && \
709 PACKET_VERSION >= 20100413
710ID_CA_OTP_AUTH_REQ = 0x0822
711#elif CLIENT_TYPE == 'R' && \
712 PACKET_VERSION >= 20100413
713ID_CA_OTP_AUTH_REQ = 0x0822
714#elif CLIENT_TYPE == 'Z' && \
715 PACKET_VERSION >= 20170000
716ID_CA_OTP_AUTH_REQ = 0x0822
717#else
718ID_CA_OTP_AUTH_REQ = 0x0000 // Disabled
719#endif
725class CA_OTP_AUTH_REQ : public Base::NetworkPacket<AuthSession>
726{
727public:
728 CA_OTP_AUTH_REQ(std::shared_ptr<AuthSession> s)
730 {}
731 virtual ~CA_OTP_AUTH_REQ() {}
732
733 void handle(ByteBuffer &&buf);
735
736/* Structure */
737};
738
739enum {
740#if CLIENT_TYPE == 'M' && \
741 PACKET_VERSION >= 20170614
742ID_CA_OTP_CODE = 0x0ad0
743#elif CLIENT_TYPE == 'R' && \
744 PACKET_VERSION >= 20170614
745ID_CA_OTP_CODE = 0x0ad0
746#elif CLIENT_TYPE == 'Z' && \
747 PACKET_VERSION >= 20170000
748ID_CA_OTP_CODE = 0x0ad0
749#else
750ID_CA_OTP_CODE = 0x0000 // Disabled
751#endif
757class CA_OTP_CODE : public Base::NetworkPacket<AuthSession>
758{
759public:
760 CA_OTP_CODE(std::shared_ptr<AuthSession> s)
762 {}
763 virtual ~CA_OTP_CODE() {}
764
765 void handle(ByteBuffer &&buf);
767
768/* Structure */
769};
770
771enum {
772#if CLIENT_TYPE == 'A' && \
773 PACKET_VERSION >= 20040000
775#elif CLIENT_TYPE == 'M' && \
776 PACKET_VERSION >= 20030000
778#elif CLIENT_TYPE == 'R' && \
779 PACKET_VERSION >= 20080000
781#elif CLIENT_TYPE == 'S' && \
782 PACKET_VERSION >= 20030000
784#elif CLIENT_TYPE == 'Z' && \
785 PACKET_VERSION >= 20170000
787#else
788ID_CA_REPLY_PNGAMEROOM = 0x0000 // Disabled
789#endif
795class CA_REPLY_PNGAMEROOM : public Base::NetworkPacket<AuthSession>
796{
797public:
798 CA_REPLY_PNGAMEROOM(std::shared_ptr<AuthSession> s)
800 {}
802
803 void handle(ByteBuffer &&buf);
805
806/* Structure */
807};
808
809enum {
810#if CLIENT_TYPE == 'A' && \
811 PACKET_VERSION >= 20050912
813#elif CLIENT_TYPE == 'M' && \
814 PACKET_VERSION >= 20050912
816#elif CLIENT_TYPE == 'R' && \
817 PACKET_VERSION >= 20080000
819#elif CLIENT_TYPE == 'S' && \
820 PACKET_VERSION >= 20050912
822#elif CLIENT_TYPE == 'Z' && \
823 PACKET_VERSION >= 20170000
825#else
826ID_CA_REQ_GAME_GUARD_CHECK = 0x0000 // Disabled
827#endif
834{
835public:
836 CA_REQ_GAME_GUARD_CHECK(std::shared_ptr<AuthSession> s)
838 {}
840
841 void handle(ByteBuffer &&buf);
843
844/* Structure */
845};
846
847enum {
848#if CLIENT_TYPE == 'A' && \
849 PACKET_VERSION >= 20040000
850ID_CA_REQ_HASH = 0x01db
851#elif CLIENT_TYPE == 'M' && \
852 PACKET_VERSION >= 20030000
853ID_CA_REQ_HASH = 0x01db
854#elif CLIENT_TYPE == 'R' && \
855 PACKET_VERSION >= 20080000
856ID_CA_REQ_HASH = 0x01db
857#elif CLIENT_TYPE == 'S' && \
858 PACKET_VERSION >= 20030000
859ID_CA_REQ_HASH = 0x01db
860#elif CLIENT_TYPE == 'Z' && \
861 PACKET_VERSION >= 20170000
862ID_CA_REQ_HASH = 0x01db
863#else
864ID_CA_REQ_HASH = 0x0000 // Disabled
865#endif
871class CA_REQ_HASH : public Base::NetworkPacket<AuthSession>
872{
873public:
874 CA_REQ_HASH(std::shared_ptr<AuthSession> s)
876 {}
877 virtual ~CA_REQ_HASH() {}
878
879 void handle(ByteBuffer &&buf);
881
882/* Structure */
883};
884
885enum {
886#if CLIENT_TYPE == 'M' && \
887 PACKET_VERSION >= 20100601
888ID_CA_SSO_LOGIN_REQ = 0x0825
889#elif CLIENT_TYPE == 'R' && \
890 PACKET_VERSION >= 20100601
891ID_CA_SSO_LOGIN_REQ = 0x0825
892#elif CLIENT_TYPE == 'Z' && \
893 PACKET_VERSION >= 20170000
894ID_CA_SSO_LOGIN_REQ = 0x0825
895#else
896ID_CA_SSO_LOGIN_REQ = 0x0000 // Disabled
897#endif
903class CA_SSO_LOGIN_REQ : public Base::NetworkPacket<AuthSession>
904{
905public:
906 CA_SSO_LOGIN_REQ(std::shared_ptr<AuthSession> s)
908 {}
909 virtual ~CA_SSO_LOGIN_REQ() {}
910
911 void handle(ByteBuffer &&buf);
913
914/* Structure */
915};
916
917} /* namespace Auth */
918} /* namespace Horizon */
919#endif /* HORIZON_AUTH_TRANSMITTED_PACKETS_HPP */
Definition: ByteBuffer.hpp:78
Definition: AuthSession.hpp:56
Main object for the aegis packet: CA_ACK_LOGIN_ACCOUNT_INFO.
Definition: HandledPackets.hpp:64
virtual ~CA_ACK_LOGIN_ACCOUNT_INFO()
Definition: HandledPackets.hpp:69
void handle(ByteBuffer &&buf)
CA_ACK_LOGIN_ACCOUNT_INFO.
Definition: HandledPackets.cpp:123
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:124
CA_ACK_LOGIN_ACCOUNT_INFO(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:66
Main object for the aegis packet: CA_ACK_LOGIN_CARDPASS.
Definition: HandledPackets.hpp:102
void handle(ByteBuffer &&buf)
CA_ACK_LOGIN_CARDPASS.
Definition: HandledPackets.cpp:108
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:109
CA_ACK_LOGIN_CARDPASS(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:104
virtual ~CA_ACK_LOGIN_CARDPASS()
Definition: HandledPackets.hpp:107
Main object for the aegis packet: CA_ACK_LOGIN_NEWEKEY.
Definition: HandledPackets.hpp:140
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:114
CA_ACK_LOGIN_NEWEKEY(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:142
virtual ~CA_ACK_LOGIN_NEWEKEY()
Definition: HandledPackets.hpp:145
void handle(ByteBuffer &&buf)
CA_ACK_LOGIN_NEWEKEY.
Definition: HandledPackets.cpp:113
Main object for the aegis packet: CA_ACK_LOGIN_OLDEKEY.
Definition: HandledPackets.hpp:178
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:119
void handle(ByteBuffer &&buf)
CA_ACK_LOGIN_OLDEKEY.
Definition: HandledPackets.cpp:118
virtual ~CA_ACK_LOGIN_OLDEKEY()
Definition: HandledPackets.hpp:183
CA_ACK_LOGIN_OLDEKEY(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:180
Main object for the aegis packet: CA_ACK_MOBILE_OTP.
Definition: HandledPackets.hpp:210
CA_ACK_MOBILE_OTP(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:212
virtual ~CA_ACK_MOBILE_OTP()
Definition: HandledPackets.hpp:215
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:174
void handle(ByteBuffer &&buf)
CA_ACK_MOBILE_OTP.
Definition: HandledPackets.cpp:173
Main object for the aegis packet: CA_ACK_NEW_USER.
Definition: HandledPackets.hpp:242
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:169
CA_ACK_NEW_USER(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:244
virtual ~CA_ACK_NEW_USER()
Definition: HandledPackets.hpp:247
void handle(ByteBuffer &&buf)
CA_ACK_NEW_USER.
Definition: HandledPackets.cpp:168
Main object for the aegis packet: CA_CLIENT_TYPE.
Definition: HandledPackets.hpp:280
virtual ~CA_CLIENT_TYPE()
Definition: HandledPackets.hpp:285
void handle(ByteBuffer &&buf)
CA_CLIENT_TYPE.
Definition: HandledPackets.cpp:138
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:139
CA_CLIENT_TYPE(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:282
Main object for the aegis packet: CA_CONNECT_INFO_CHANGED.
Definition: HandledPackets.hpp:318
CA_CONNECT_INFO_CHANGED(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:320
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:39
virtual ~CA_CONNECT_INFO_CHANGED()
Definition: HandledPackets.hpp:323
void handle(ByteBuffer &&buf)
CA_CONNECT_INFO_CHANGED.
Definition: HandledPackets.cpp:38
Main object for the aegis packet: CA_EXE_HASHCHECK.
Definition: HandledPackets.hpp:356
CA_EXE_HASHCHECK(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:358
virtual ~CA_EXE_HASHCHECK()
Definition: HandledPackets.hpp:361
void handle(ByteBuffer &&buf)
CA_EXE_HASHCHECK.
Definition: HandledPackets.cpp:43
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:44
Main object for the aegis packet: CA_LOGIN2.
Definition: HandledPackets.hpp:437
CA_LOGIN2(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:439
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:84
virtual ~CA_LOGIN2()
Definition: HandledPackets.hpp:442
void handle(ByteBuffer &&buf)
CA_LOGIN2.
Definition: HandledPackets.cpp:83
Main object for the aegis packet: CA_LOGIN3.
Definition: HandledPackets.hpp:475
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:89
virtual ~CA_LOGIN3()
Definition: HandledPackets.hpp:480
void handle(ByteBuffer &&buf)
CA_LOGIN3.
Definition: HandledPackets.cpp:88
CA_LOGIN3(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:477
Main object for the aegis packet: CA_LOGIN4.
Definition: HandledPackets.hpp:513
virtual ~CA_LOGIN4()
Definition: HandledPackets.hpp:518
void handle(ByteBuffer &&buf)
CA_LOGIN4.
Definition: HandledPackets.cpp:133
CA_LOGIN4(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:515
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:134
Main object for the aegis packet: CA_LOGIN5.
Definition: HandledPackets.hpp:545
CA_LOGIN5(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:547
void handle(ByteBuffer &&buf)
CA_LOGIN5.
Definition: HandledPackets.cpp:158
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:159
virtual ~CA_LOGIN5()
Definition: HandledPackets.hpp:550
Main object for the aegis packet: CA_LOGIN6.
Definition: HandledPackets.hpp:577
CA_LOGIN6(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:579
virtual ~CA_LOGIN6()
Definition: HandledPackets.hpp:582
void handle(ByteBuffer &&buf)
CA_LOGIN6.
Definition: HandledPackets.cpp:163
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:164
Main object for the aegis packet: CA_LOGIN_HAN.
Definition: HandledPackets.hpp:615
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:144
CA_LOGIN_HAN(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:617
void handle(ByteBuffer &&buf)
CA_LOGIN_HAN.
Definition: HandledPackets.cpp:143
virtual ~CA_LOGIN_HAN()
Definition: HandledPackets.hpp:620
Main object for the aegis packet: CA_LOGIN_OTP.
Definition: HandledPackets.hpp:656
virtual ~CA_LOGIN_OTP()
Definition: HandledPackets.hpp:661
void handle(ByteBuffer &&buf)
CA_LOGIN_OTP.
Definition: HandledPackets.cpp:178
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:183
CA_LOGIN_OTP(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:658
Main object for the aegis packet: CA_LOGIN_PCBANG.
Definition: HandledPackets.hpp:694
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:129
virtual ~CA_LOGIN_PCBANG()
Definition: HandledPackets.hpp:699
CA_LOGIN_PCBANG(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:696
void handle(ByteBuffer &&buf)
CA_LOGIN_PCBANG.
Definition: HandledPackets.cpp:128
Main object for the aegis packet: CA_LOGIN.
Definition: HandledPackets.hpp:394
virtual ~CA_LOGIN()
Definition: HandledPackets.hpp:399
CA_LOGIN(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:396
void handle(ByteBuffer &&buf)
CA_LOGIN.
Definition: HandledPackets.cpp:48
char _password[24]
Password.
Definition: HandledPackets.hpp:408
ByteBuffer serialize(int32_t version, std::string username, std::string password, uint8_t client_type)
Definition: HandledPackets.cpp:64
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:55
uint32_t _version
Client Version Information.
Definition: HandledPackets.hpp:406
char _username[24]
Username.
Definition: HandledPackets.hpp:407
uint8_t _client_type
Client Type.
Definition: HandledPackets.hpp:409
Main object for the aegis packet: CA_OTP_AUTH_REQ.
Definition: HandledPackets.hpp:726
CA_OTP_AUTH_REQ(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:728
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:149
virtual ~CA_OTP_AUTH_REQ()
Definition: HandledPackets.hpp:731
void handle(ByteBuffer &&buf)
CA_OTP_AUTH_REQ.
Definition: HandledPackets.cpp:148
Main object for the aegis packet: CA_OTP_CODE.
Definition: HandledPackets.hpp:758
virtual ~CA_OTP_CODE()
Definition: HandledPackets.hpp:763
void handle(ByteBuffer &&buf)
CA_OTP_CODE.
Definition: HandledPackets.cpp:190
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:191
CA_OTP_CODE(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:760
Main object for the aegis packet: CA_REPLY_PNGAMEROOM.
Definition: HandledPackets.hpp:796
void handle(ByteBuffer &&buf)
CA_REPLY_PNGAMEROOM.
Definition: HandledPackets.cpp:93
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:94
CA_REPLY_PNGAMEROOM(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:798
virtual ~CA_REPLY_PNGAMEROOM()
Definition: HandledPackets.hpp:801
Main object for the aegis packet: CA_REQ_GAME_GUARD_CHECK.
Definition: HandledPackets.hpp:834
CA_REQ_GAME_GUARD_CHECK(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:836
virtual ~CA_REQ_GAME_GUARD_CHECK()
Definition: HandledPackets.hpp:839
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:104
void handle(ByteBuffer &&buf)
CA_REQ_GAME_GUARD_CHECK.
Definition: HandledPackets.cpp:103
Main object for the aegis packet: CA_REQ_HASH.
Definition: HandledPackets.hpp:872
CA_REQ_HASH(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:874
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:99
void handle(ByteBuffer &&buf)
CA_REQ_HASH.
Definition: HandledPackets.cpp:98
virtual ~CA_REQ_HASH()
Definition: HandledPackets.hpp:877
Main object for the aegis packet: CA_SSO_LOGIN_REQ.
Definition: HandledPackets.hpp:904
virtual ~CA_SSO_LOGIN_REQ()
Definition: HandledPackets.hpp:909
CA_SSO_LOGIN_REQ(std::shared_ptr< AuthSession > s)
Definition: HandledPackets.hpp:906
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:154
void handle(ByteBuffer &&buf)
CA_SSO_LOGIN_REQ.
Definition: HandledPackets.cpp:153
Definition: NetworkPacket.hpp:43
NetworkPacket(uint16_t packet_id, std::shared_ptr< AuthSession > s)
Definition: NetworkPacket.hpp:45
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59
@ ID_CA_ACK_MOBILE_OTP
Definition: HandledPackets.hpp:194
@ ID_CA_ACK_LOGIN_NEWEKEY
Definition: HandledPackets.hpp:121
@ ID_CA_LOGIN_OTP
Definition: HandledPackets.hpp:631
@ ID_CA_OTP_AUTH_REQ
Definition: HandledPackets.hpp:710
@ ID_CA_CONNECT_INFO_CHANGED
Definition: HandledPackets.hpp:299
@ ID_CA_LOGIN3
Definition: HandledPackets.hpp:456
@ ID_CA_ACK_NEW_USER
Definition: HandledPackets.hpp:226
@ ID_CA_REQ_GAME_GUARD_CHECK
Definition: HandledPackets.hpp:815
@ ID_CA_LOGIN_HAN
Definition: HandledPackets.hpp:596
@ ID_CA_REQ_HASH
Definition: HandledPackets.hpp:853
@ ID_CA_LOGIN
Definition: HandledPackets.hpp:375
@ ID_CA_ACK_LOGIN_OLDEKEY
Definition: HandledPackets.hpp:159
@ ID_CA_OTP_CODE
Definition: HandledPackets.hpp:742
@ ID_CA_LOGIN6
Definition: HandledPackets.hpp:561
@ ID_CA_LOGIN_PCBANG
Definition: HandledPackets.hpp:675
@ ID_CA_LOGIN2
Definition: HandledPackets.hpp:418
@ ID_CA_ACK_LOGIN_CARDPASS
Definition: HandledPackets.hpp:83
@ ID_CA_LOGIN5
Definition: HandledPackets.hpp:529
@ ID_CA_EXE_HASHCHECK
Definition: HandledPackets.hpp:337
@ ID_CA_CLIENT_TYPE
Definition: HandledPackets.hpp:261
@ ID_CA_SSO_LOGIN_REQ
Definition: HandledPackets.hpp:888
@ ID_CA_LOGIN4
Definition: HandledPackets.hpp:494
@ ID_CA_REPLY_PNGAMEROOM
Definition: HandledPackets.hpp:777
@ ID_CA_ACK_LOGIN_ACCOUNT_INFO
Definition: HandledPackets.hpp:45
Definition: Element.hpp:7