00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00020 #ifndef __PACKETS_H
00021 #define __PACKETS_H
00022
00023 #include "constants.h"
00024 #include "typedefs.h"
00025 #include <string>
00026 #include "abstraction/endian.h"
00027
00028 using namespace std;
00029
00035 class cPacket
00036 {
00037
00038 protected:
00039
00040 int headerSize;
00041 int offset;
00042 char* getBeginValid();
00043
00044 public:
00045 UI08 cmd;
00046
00047
00048 } PACK_NEEDED;
00049
00050
00056 class cClientPacket : public cPacket {
00057 protected:
00058 char* getBeginValidForReceive();
00059 void getFromSocket( NXWSOCKET socket, char* b, int size );
00060 void getStringFromSocket( NXWSOCKET socket, string& s, int lenght );
00061 void getUnicodeStringFromSocket( NXWSOCKET s, wstring& c, int size=INVALID );
00062
00063 public:
00064 virtual void receive( NXWCLIENT ps );
00065 virtual ~cClientPacket() { };
00066 } PACK_NEEDED;
00067
00073 class cServerPacket : public cPacket {
00074 public:
00075 virtual void send( NXWCLIENT ps );
00076 virtual void send( P_CHAR pc );
00077 virtual ~cServerPacket() { };
00078
00079 } PACK_NEEDED;
00080
00081
00082 typedef cPacket* P_PACKET;
00083 typedef cClientPacket* P_CLIENT_PACKET;
00084 typedef cServerPacket* P_SERVER_PACKET;
00085
00086
00087
00088
00094
00095 #define PKG_CREATE_CHARACTER 0x00;
00096
00114 class cPacketCreateCharacter : public cClientPacket {
00115
00116 public:
00117
00118 UI32 pattern1;
00119 UI32 pattern2;
00120 UI08 pattern3;
00121 string name;
00122 string passwd;
00123 UI08 sex;
00124 UI08 st;
00125 UI08 dx;
00126 UI08 in;
00127 UI08 skill1;
00128 UI08 skill1value;
00129 UI08 skill2;
00130 UI08 skill2value;
00131 UI08 skill3;
00132 UI08 skill3value;
00133 eCOLOR skin;
00134 UI16 hairstyle;
00135 eCOLOR hair;
00136 UI16 facialhairstyle;
00137 eCOLOR facialhair;
00138 UI16 location;
00139 UI16 unknown;
00140 UI16 slot;
00141 UI32 clientIP;
00142 eCOLOR shirt;
00143 eCOLOR pants;
00144
00145 cPacketCreateCharacter();
00146 void receive( NXWCLIENT ps );
00147
00148 } PACK_NEEDED;
00149
00150 #define PKG_DISCONNECT_NOTIFY 0x01;
00151
00159 class cPacketDisconnectNotification : public cClientPacket {
00160
00161 public:
00162
00163 UI32 pattern;
00164
00165 cPacketDisconnectNotification();
00166
00167 } PACK_NEEDED;
00168
00169 #define PKG_TALK_REQUEST 0x03;
00170
00176 class cPacketTalkRequest : public cClientPacket {
00177
00178 private:
00179
00180 UI16 size;
00181
00182 public:
00183
00184 UI08 type;
00185 eCOLOR color;
00186 UI16 font;
00187 string msg;
00188
00189 cPacketTalkRequest();
00190 void receive( NXWCLIENT ps );
00191
00192 };
00193
00194 #define PKG_GODMODE_TOGGLE 0x04;
00195
00201 class cPacketGodModeToggle : public cClientPacket {
00202 public:
00203
00204 UI08 mode;
00205
00206 cPacketGodModeToggle();
00207
00208 };
00209
00210 #define PKG_ATTACK_REQUEST 0x05;
00211
00217 class cPacketAttackRequest : public cClientPacket {
00218
00219 public:
00220
00221 eSERIAL att;
00222
00223 cPacketAttackRequest();
00224
00225 } PACK_NEEDED;
00226
00227 #define PKG_DB_CLICK 0x06;
00228
00234 class cPacketDoubleClick : public cClientPacket {
00235
00236 public:
00237
00238 Serial obj;
00239
00240 cPacketDoubleClick();
00241
00242 } PACK_NEEDED;
00243
00244
00245 #define PKG_PICK_UP 0x07;
00246
00252 class cPacketPickUpItem : public cClientPacket {
00253
00254 public:
00255
00256 Serial item;
00257 UI16 num;
00258
00259 cPacketPickUpItem();
00260
00261 } PACK_NEEDED;
00262
00263
00264 #define PKG_DROP_ITEM 0x08;
00265
00272 class cPacketDropItem : public cClientPacket {
00273
00274 public:
00275
00276 Serial item;
00277 UI16 x;
00278 UI16 y;
00279 SI08 z;
00280 Serial cont;
00281
00282 cPacketDropItem();
00283
00284 } PACK_NEEDED;
00285
00286 #define PKG_SINGLE_CLICK 0x09;
00287
00293 class cPacketSingleClick : public cClientPacket {
00294
00295 public:
00296
00297 Serial obj;
00298
00299 cPacketSingleClick();
00300
00301 } PACK_NEEDED;
00302
00303 #define PKG_STAT_WINDOW 0x11;
00304
00313 class cPacketStatWindow : public cServerPacket {
00314
00315 private:
00316 UI16 size;
00317 public:
00318 Serial player;
00319 string name;
00320 UI16 currhp;
00321 UI16 maxhp;
00322 UI08 canchangename;
00323 private:
00324 UI08 flag;
00325 public:
00326 UI08 sex;
00327 UI16 st;
00328 UI16 dx;
00329 UI16 in;
00330 UI16 currstamina;
00331 UI16 maxstamina;
00332 UI16 currmana;
00333 UI16 maxmana;
00334 UI32 gold;
00335 UI16 ac;
00336 UI16 weight;
00337
00338
00339 UI16 statcap;
00340 UI08 currpets;
00341 UI08 maxpets;
00342
00343 cPacketStatWindow();
00344 void send( NXWCLIENT ps );
00345 void send (cChar *pc);
00346 void sendBasic( NXWCLIENT ps, UI08 flag = 0x00 );
00347 void sendStat( NXWCLIENT ps );
00348 void sendExtended( NXWCLIENT ps );
00349
00350 } PACK_NEEDED;
00351
00352 #define PKG_DROP_OR_WEAR_ITEM 0x13;
00353
00360 class cPacketWear : public cClientPacket {
00361 public:
00362
00363 Serial item;
00364 UI08 layer;
00365 Serial player;
00366
00367 cPacketWear();
00368
00369 } PACK_NEEDED;
00370
00371 #define PKG_CHAR_INFO 0x1B;
00372
00380 class cPacketCharInfo : public cServerPacket {
00381
00382 public:
00383
00384 Serial player;
00385 UI32 unk1;
00386 UI16 bodyType;
00387 UI16 x;
00388 UI16 y;
00389 UI16 z;
00390 UI08 dir;
00391 UI08 unk2;
00392 UI32 unk3;
00393 UI16 sbx;
00394 UI16 sby;
00395 UI16 sbwidth;
00396 UI16 sbheigth;
00397 UI08 ignored[6];
00398
00399 cPacketCharInfo();
00400
00401 } PACK_NEEDED;
00402
00403 #define PKG_SPEECH 0x1C;
00404
00410 class cPacketSpeech : public cServerPacket {
00411
00412 private:
00413 UI16 size;
00414 public:
00415 Serial obj;
00416 UI16 model;
00417 UI08 type;
00418 eCOLOR color;
00419 UI16 font;
00420 string name;
00421 string* msg;
00422
00423 cPacketSpeech();
00424 void send( NXWCLIENT ps );
00425 void send (cChar *pc);
00426
00427 } PACK_NEEDED;
00428
00429 #define PKG_DELETE 0x1D;
00430
00436 class cPacketDelete : public cServerPacket {
00437 public:
00438
00439 Serial obj;
00440
00441 cPacketDelete();
00442
00443 } PACK_NEEDED;
00444
00445 #define PKG_DRAW_PLAYER 0x20;
00446
00453 class cPacketDrawPlayer : public cServerPacket {
00454
00455 public:
00456
00457 Serial chr;
00458 UI16 body;
00459 UI08 unk1;
00460 eCOLOR skin;
00461 UI08 flag;
00462 UI16 x;
00463 UI16 y;
00464 UI16 unk2;
00465 UI08 dir;
00466 SI08 z;
00467
00468 cPacketDrawPlayer();
00469
00470 } PACK_NEEDED;
00471
00472 #define PKG_REJECT_MOVEMENT 0x21;
00473
00479 class cPacketMoveReject : public cServerPacket {
00480
00481 public:
00482
00483 UI08 seq;
00484 UI16 x;
00485 UI16 y;
00486 UI08 dir;
00487 SI08 z;
00488
00489 cPacketMoveReject();
00490
00491 } PACK_NEEDED;
00492
00493 #define PKG_MOVE_ACK 0x22;
00494
00503 class cPacketMoveACK : public cServerPacket {
00504
00505 public:
00506
00507 UI08 seq;
00508
00523 UI08 notoriety;
00524
00525 cPacketMoveACK();
00526
00527 } PACK_NEEDED;
00528
00529 #define PKG_DRAGGING 0x23;
00530
00536 class cPacketDragging : public cClientPacket {
00537
00538 public:
00539
00540 UI16 model;
00541 UI08 unk[3];
00542 UI16 stack;
00543 Serial from;
00544 UI16 fromx;
00545 UI16 fromy;
00546 SI08 fromz;
00547 Serial to;
00548 UI16 tox;
00549 UI16 toy;
00550 SI08 toz;
00551
00552 cPacketDragging();
00553
00554 } PACK_NEEDED;
00555
00556 #define PKG_DRAW_CONTAINER 0x24;
00557
00563 class cPacketDrawContainer : public cServerPacket {
00564
00565 public:
00566
00567 Serial item;
00568 UI08 model;
00569
00570 cPacketDrawContainer();
00571
00572 } PACK_NEEDED;
00573
00574 #define PKG_ADD_ITEM_INTO_CONTAINER 0x25;
00575
00581 class cPacketAddItemIntoCont : public cClientPacket {
00582
00583 public:
00584
00585 Serial item;
00586 UI16 model;
00587 UI08 unk;
00588 UI16 n;
00589 UI16 x;
00590 UI16 y;
00591 Serial cont;
00592 eCOLOR color;
00593
00594 cPacketAddItemIntoCont();
00595
00596 } PACK_NEEDED;
00597
00598 #define PKG_KICK 0x26;
00599
00605 class cPacketKick : public cServerPacket {
00606
00607 public:
00608
00609 Serial chr;
00610
00611 cPacketKick();
00612
00613 } PACK_NEEDED;
00614
00615 #define PKG_REJECT_MOVE_ITEM 0x27;
00616
00622 class cPacketRejectMoveItem : public cServerPacket {
00623
00624 public:
00625
00626 UI08 unk;
00627
00628 cPacketRejectMoveItem();
00629
00630 } PACK_NEEDED;
00631
00632 #define PKG_CLEAR_SQUARE 0x28;
00633
00639 class cPacketClearSquare : public cServerPacket {
00640
00641 public:
00642
00643 UI16 x;
00644 UI16 y;
00645
00646 cPacketClearSquare();
00647
00648 } PACK_NEEDED;
00649
00650 #define PKG_PD_CLOTHING 0x29;
00651
00657 class cPacketPDClothing : public cServerPacket {
00658
00659 public:
00660
00661 cPacketPDClothing();
00662
00663 } PACK_NEEDED;
00664
00665 #define PKG_RESS_MENU 0x2C;
00666
00673 class cPacketRessMenu : public cClientPacket {
00674
00675 public:
00676
00677 UI08 mode;
00678
00679 cPacketRessMenu();
00680
00681 } PACK_NEEDED;
00682
00683 #define PKG_MOBILE_ATTRIBUTES 0x2D;
00684
00690 class cPacketMobileAttributes : public cServerPacket {
00691
00692 public:
00693
00694 Serial chr;
00695 UI16 maxhp;
00696 UI16 currhp;
00697 UI16 maxmana;
00698 UI16 currmana;
00699 UI16 maxstam;
00700 UI16 currstam;
00701
00702 cPacketMobileAttributes();
00703
00704 } PACK_NEEDED;
00705
00706 #define PKG_WORN_ITEM 0x2E;
00707
00713 class cPacketWornItem : public cClientPacket {
00714
00715 public:
00716
00717 Serial item;
00718 UI16 model;
00719 UI08 unk ;
00720 UI08 layer;
00721 Serial player;
00722 eCOLOR color;
00723
00724 cPacketWornItem();
00725
00726 } PACK_NEEDED;
00727
00728 #define PKG_FIGHT_OCCURING 0x2F;
00729
00735 class cPacketFightOccuring : public cServerPacket {
00736
00737 public:
00738
00739 UI08 unk;
00740 Serial att;
00741 Serial def;
00742
00743 cPacketFightOccuring();
00744
00745 } PACK_NEEDED;
00746
00747 #define PKG_PAUSE_RESUME 0x33;
00748
00757 class cPacketPauseResumeClient : public cServerPacket {
00758 public:
00759
00760 UI08 mode;
00761
00762 cPacketPauseResumeClient();
00763
00764 } PACK_NEEDED;
00765
00766 #define PKG_PLAYER_STATUS 0x34;
00767
00773 class cPacketPlayerStatus : public cClientPacket {
00774
00775 public:
00776
00777 UI32 pattern;
00778 BYTE type;
00779 Serial player;
00780
00781 cPacketPlayerStatus();
00782
00783 } PACK_NEEDED;
00784
00785
00786 typedef struct {
00787 UI08 flag;
00788 Serial item;
00789 UI16 n;
00790 } buyitem_st;
00791
00792 #define PKG_BUY 0x3B;
00793
00799 class cPacketBuy : public cServerPacket {
00800
00801 private:
00802 UI16 size;
00803 public:
00804 Serial vendor;
00805 private:
00806 UI08 flag;
00807 public:
00808 vector<buyitem_st> list;
00809
00810 void send( NXWCLIENT ps );
00811 void send (cChar *pc);
00812 cPacketBuy();
00813
00814 } PACK_NEEDED;
00815
00819 typedef struct {
00820 Serial item;
00821 UI32 model;
00822 UI08 unk;
00823 UI16 n;
00824 UI16 x;
00825 UI16 y;
00826 Serial cont;
00827 eCOLOR color;
00828 } itemincont_st;
00829
00830 #define PKG_CONTAINER 0x3C;
00831
00837 class cPacketContainer : public cServerPacket {
00838
00839 private:
00840 UI16 size;
00841 UI16 n;
00842 public:
00843 vector<itemincont_st> list;
00844
00845 void send( NXWCLIENT ps );
00846 void send (cChar *pc);
00847 cPacketContainer();
00848
00849 } PACK_NEEDED;
00850
00851 #define PKG_PERSONAL_LIGHT 0x4E;
00852
00858 class cPacketPersonalLight : public cServerPacket {
00859 public:
00860
00861 Serial chr;
00862 UI08 level;
00863
00864 cPacketPersonalLight();
00865
00866 } PACK_NEEDED;
00867
00868
00869 #define PKG_OVERALL_LIGHT 0x4F;
00870
00876 class cPacketOverallLight : public cServerPacket {
00877 public:
00878
00879 UI08 level;
00880
00881 cPacketOverallLight();
00882
00883 } PACK_NEEDED;
00884
00885 #define PKG_IDLE_WARNING 0x53;
00886
00901 class cPacketIdleWarning : public cServerPacket {
00902
00903 public:
00904
00905 UI08 type;
00906
00907 cPacketIdleWarning();
00908
00909 } PACK_NEEDED;
00910
00911 #define PKG_SOUND 0x54;
00912
00918 class cPacketSound : public cServerPacket {
00919
00920 public:
00921
00922 UI08 mode;
00923 UI16 model;
00924 UI16 unk;
00925 UI16 x;
00926 UI16 y;
00927 UI16 z;
00928
00929 cPacketSound();
00930
00931 } PACK_NEEDED;
00932
00933 #define PKG_LOGIN_COMPLETE 0x55;
00934
00940 class cPacketLoginComplete : public cServerPacket {
00941
00942 cPacketLoginComplete();
00943
00944 } PACK_NEEDED;
00945
00946 #define PKG_PLOT_COURSE 0x56;
00947
00961 class cPacketPlotCourse : public cServerPacket {
00962
00963 Serial serial;
00964 UI08 type;
00965 UI08 state;
00966 UI16 x;
00967 UI16 y;
00968
00969 cPacketPlotCourse();
00970
00971 } PACK_NEEDED;
00972
00973 #define PKG_TIME 0x5B;
00974
00980 class cPacketTime : public cServerPacket {
00981
00982 UI08 hour;
00983 UI08 minute;
00984 UI08 second;
00985
00986 cPacketTime();
00987
00988 } PACK_NEEDED;
00989
00997 #define PKG_LOGIN 0x5D;
00998 class cPacketLogin : public cClientPacket {
00999
01000 UI32 pattern;
01001 string name;
01002 string passwd;
01003 UI32 slot;
01004 UI32 ip;
01005
01006 cPacketLogin();
01007 void receive( NXWCLIENT ps );
01008
01009 } PACK_NEEDED;
01010
01011 #define PKG_WEATHER 0x65;
01012
01033 class cPacketWeather : public cServerPacket {
01034
01035 BYTE type;
01036 BYTE n;
01037 BYTE temp;
01038
01039
01040 cPacketWeather();
01041
01042 } PACK_NEEDED;
01043
01044 #define PKG_MIDI 0x6D;
01045
01051 class cPacketMidi : public cServerPacket {
01052
01053 public:
01054
01055 UI16 music;
01056
01057 cPacketMidi();
01058
01059 } PACK_NEEDED;
01060
01061 #define PKG_ANIM 0x6E;
01062
01106 class cPacketAnim : public cServerPacket {
01107
01108 public:
01109
01110 Serial chr;
01111 UI16 mov;
01112 UI08 unk;
01113 UI08 dir;
01114 UI16 repeat;
01115 UI08 wards;
01116 UI08 flag;
01117 UI08 deelay;
01118
01119 cPacketAnim();
01120
01121 } PACK_NEEDED;
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150 #define PKG_EFFECT 0x70;
01151
01162 class cPacketEffect : public cServerPacket {
01163
01164 public:
01165
01166 UI08 dir;
01167 Serial chr;
01168 Serial target;
01169 UI16 model;
01170 UI16 sx;
01171 UI16 sy;
01172 SI08 sz;
01173 UI16 tx;
01174 UI16 ty;
01175 SI08 tz;
01176 UI08 speed;
01177 UI08 duration;
01178 UI16 unk;
01179 UI08 direct;
01180 UI08 explode;
01181
01182 cPacketEffect();
01183
01184 } PACK_NEEDED;
01185
01186 #define PKG_WAR_MODE 0x72;
01187
01195 class cPacketWarMode : public cServerPacket {
01196
01197 public:
01198
01199 BYTE flag;
01200 UI08 unk[3];
01201
01202 cPacketWarMode();
01203
01204 } PACK_NEEDED;
01205
01206
01215
01216
01217
01218
01219
01220
01221
01222
01223
01224
01225
01226
01227
01228
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242
01243
01244
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261 #define PKG_RENAME 0x75;
01262
01268 class cPacketRename : public cServerPacket {
01269
01270 public:
01271
01272 Serial chr;
01273 string newname;
01274
01275 cPacketRename();
01276 void send( NXWCLIENT ps );
01277 void send (cChar *pc);
01278
01279 } PACK_NEEDED;
01280
01281 #define PKG_NEW_SUBSERVER 0x76;
01282
01288 class cPacketNewSubserver : public cServerPacket {
01289
01290 public:
01291
01292 UI16 x;
01293 UI16 y;
01294 UI16 z;
01295 UI08 unk;
01296 UI16 sbx;
01297 UI16 sby;
01298 UI16 sbwithd;
01299 UI16 sbheight;
01300
01301 cPacketNewSubserver();
01302
01303 } PACK_NEEDED;
01304
01305 #define PKG_UPDATE_PLAYER 0x77;
01306
01312 class cPacketUpdatePlayer : public cServerPacket {
01313
01314 public:
01315
01316 Serial player;
01317 UI16 model;
01318 UI16 x;
01319 UI16 y;
01320 SI08 z;
01321 UI08 dir;
01322 eCOLOR color;
01323 UI08 flag;
01324 UI08 highcolor;
01325
01326 cPacketUpdatePlayer();
01327
01328 } PACK_NEEDED;
01329
01330
01331
01332
01333
01334 #define PKG_RESPONSE_TO_DIALOG 0x7D;
01335
01341 class cPacketResponseToDialog : public cClientPacket {
01342
01343 public:
01344
01345 eSERIAL serial;
01346 eUI16 id;
01347 eUI16 index;
01348 eUI16 model;
01349 eCOLOR color;
01350
01351 cPacketResponseToDialog();
01352
01353 } PACK_NEEDED;
01354
01355 #define PKG_LOGIN_DENIED 0x82;
01356
01368 class cPacketLoginDenied : public cServerPacket {
01369
01370 public:
01371
01372 UI08 why;
01373
01374 cPacketLoginDenied();
01375
01376 } PACK_NEEDED;
01377
01378 #define PKG_DELETE_CHARACHTER 0x83;
01379
01386 class cPacketDeleteCharacter : public cClientPacket {
01387
01388 public:
01389
01390 string passwd;
01391 UI32 idx;
01392 UI32 ip;
01393
01394 cPacketDeleteCharacter();
01395 void receive( NXWCLIENT ps );
01396
01397 } PACK_NEEDED;
01398
01399
01400
01401
01402
01403
01404
01405
01412
01413
01414
01415
01416
01417
01418
01419
01420
01421
01422
01423
01424
01425
01426
01427
01428
01429
01430
01436
01437
01438
01439
01440 #define PKG_UNICODE_SPEECH 0xAE;
01441
01447 class cPacketUnicodeSpeech : public cServerPacket {
01448
01449 private:
01450 eUI16 size;
01451 public:
01452 eSERIAL obj;
01453 eUI16 model;
01454 eUI08 type;
01455 eCOLOR color;
01456 eUI16 font;
01457 eSERIAL language;
01458 string name;
01459 wstring* msg;
01460
01461 cPacketUnicodeSpeech();
01462 void send( NXWCLIENT ps );
01463 void send (cChar *pc);
01464
01465 } PACK_NEEDED;
01466
01467
01469
01474 #define PKG_MAP 0x56;
01475
01490 class cPacketMap : public cServerPacket {
01491
01492 public:
01493 eSERIAL obj;
01494 eUI08 command;
01495 eUI08 plotting;
01496 eUI16 x;
01497 eUI16 y;
01498
01499 cPacketMap();
01500
01501 } PACK_NEEDED;
01502
01503 #define PKG_MAP_MESSAGE 0x90;
01504
01510 class cPacketMapMessage : public cServerPacket {
01511
01512 public:
01513 eSERIAL key;
01514 eUI16 id;
01515 eUI16 xa;
01516 eUI16 ya;
01517 eUI16 xb;
01518 eUI16 yb;
01519 eUI16 width;
01520 eUI16 height;
01521
01522 cPacketMapMessage();
01523
01524 } PACK_NEEDED;
01525
01527
01529
01534 #define PKG_WALK 0x97;
01535
01542 class cPacketWalk : public cServerPacket {
01543
01544 public:
01545 eUI08 direction;
01546 cPacketWalk();
01547
01548 } PACK_NEEDED;
01549
01550
01551 #define PKG_WALK_ACK 0x22;
01552
01561 class cPacketWalkAck : public cServerPacket {
01562
01563 public:
01564 eUI08 sequence;
01565 eUI08 notoriety;
01566 cPacketWalkAck();
01567
01568 } PACK_NEEDED;
01569
01570 typedef enum {
01571 NOT_VALID =0,
01572 INNOCENT,
01573 GUILDED,
01574 ATTACKABLE,
01575 CRIMINAL,
01576 ENEMYY,
01577 MURDERER,
01578 TRASLUCENT
01579 } NOTORIETY;
01580
01581 #define PKG_WALK_REJECT 0x21;
01582
01588 class cPacketWalkReject : public cServerPacket {
01589
01590 public:
01591 eUI08 sequence;
01592 eUI16 x;
01593 eUI16 y;
01594 eUI08 direction;
01595 eUI08 z;
01596 cPacketWalkReject();
01597
01598 } PACK_NEEDED;
01599
01600
01601
01603
01605
01610 #define PKG_CHAR_PROFILE 0xB8;
01611
01617 class cPacketCharProfileReqOnly : public cClientPacket {
01618 private:
01619 eUI16 size;
01620 public:
01621 eBool update;
01622 eSERIAL chr;
01623
01624 cPacketCharProfileReqOnly();
01625
01626 };
01627
01634 class cPacketCharProfileReq : public cClientPacket {
01635 private:
01636 eUI16 size;
01637 public:
01638 eBool update;
01639 eSERIAL chr;
01640 eUI16 type;
01641 private:
01642 eUI16 len;
01643 public:
01644 wstring profile;
01645
01646 cPacketCharProfileReq();
01647 void receive( NXWCLIENT PS );
01648
01649 };
01650
01657 class cPacketCharProfile : public cServerPacket {
01658 private:
01659 eUI16 size;
01660 public:
01661 eSERIAL chr;
01662
01663 std::string title;
01664
01665 wstring* staticProfile;
01666 wstring* profile;
01667
01668 cPacketCharProfile();
01669 void send( NXWCLIENT ps );
01670 void send (cChar *pc);
01671
01672 };
01673
01675
01677
01684 #define PKG_FEATURES 0xB9;
01685
01692 class cPacketFeatures : public cServerPacket {
01693
01694 public:
01695 eUI16 feature;
01696
01697 cPacketFeatures();
01698 };
01699
01700 #define FEATURE_T2A 0x0001
01701 #define FEATURE_LBR 0x0002
01702 #define FEATURE_LBR_WITHOUT_CHAT 0x0004
01703
01704
01705
01706
01707
01708
01709
01710
01711
01712
01713
01714
01715
01716
01717
01718
01719
01720
01722
01724
01729 #define PKG_WEB_BROWSER 0xA5;
01730
01737 class cPacketWebBrowser : public cServerPacket {
01738 private:
01739 eUI16 size;
01740 public:
01741
01742 std::string link;
01743
01744 cPacketWebBrowser();
01745 void send( NXWCLIENT ps );
01746 void send (cChar *pc);
01747
01748 };
01749
01751
01753
01759 #define PKG_MENU 0xB0;
01760
01767 class cPacketMenu : public cServerPacket {
01768 private:
01769 eUI16 size;
01770 public:
01771
01772 eSERIAL serial;
01773 eSERIAL id;
01774 eUI32 x;
01775 eUI32 y;
01776
01777 private:
01778 eUI16 cmd_length;
01779 public:
01780 std::vector<std::string>* commands;
01781
01782 private:
01783 eUI16 numTextLines;
01784 public:
01785
01786
01787
01788 eUI16 len;
01789 std::vector< wstring >* texts;
01790
01791
01792 cPacketMenu();
01793 void send( NXWCLIENT ps );
01794 void send (cChar *pc);
01795
01796 };
01797
01798
01799 typedef struct {
01800 eUI16 id;
01801 eUI16 textlength;
01802 wstring text;
01803 } text_entry_st;
01804
01805
01806 #define PKG_MENU_SELECTION 0xB1;
01807
01815 class cPacketMenuSelection : public cClientPacket {
01816
01817 private:
01818 eUI16 size;
01819 public:
01820
01821