summaryrefslogtreecommitdiff
path: root/src/map/packets_struct.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/packets_struct.h')
-rw-r--r--src/map/packets_struct.h885
1 files changed, 449 insertions, 436 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 25b20cddf..e461eebe9 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -312,134 +312,134 @@ enum packet_headers {
* structs for data
*/
struct EQUIPSLOTINFO {
- unsigned short card[4];
+ uint16 card[4];
} __attribute__((packed));
struct NORMALITEM_INFO {
- short index;
- unsigned short ITID;
- unsigned char type;
+ int16 index;
+ uint16 ITID;
+ uint8 type;
#if PACKETVER < 20120925
uint8 IsIdentified;
#endif
- short count;
+ int16 count;
#if PACKETVER >= 20120925
- unsigned int WearState;
+ uint32 WearState;
#else
- unsigned short WearState;
+ uint16 WearState;
#endif
#if PACKETVER >= 5
struct EQUIPSLOTINFO slot;
#endif
#if PACKETVER >= 20080102
- int HireExpireDate;
+ int32 HireExpireDate;
#endif
#if PACKETVER >= 20120925
struct {
- unsigned char IsIdentified : 1;
- unsigned char PlaceETCTab : 1;
- unsigned char SpareBits : 6;
+ uint8 IsIdentified : 1;
+ uint8 PlaceETCTab : 1;
+ uint8 SpareBits : 6;
} Flag;
#endif
} __attribute__((packed));
struct RndOptions {
- short index;
- short value;
- unsigned char param;
+ int16 index;
+ int16 value;
+ uint8 param;
} __attribute__((packed));
struct EQUIPITEM_INFO {
- short index;
- unsigned short ITID;
- unsigned char type;
+ int16 index;
+ uint16 ITID;
+ uint8 type;
#if PACKETVER < 20120925
uint8 IsIdentified;
#endif
#if PACKETVER >= 20120925
- unsigned int location;
- unsigned int WearState;
+ uint32 location;
+ uint32 WearState;
#else
- unsigned short location;
- unsigned short WearState;
+ uint16 location;
+ uint16 WearState;
#endif
#if PACKETVER < 20120925
uint8 IsDamaged;
#endif
- unsigned char RefiningLevel;
+ uint8 RefiningLevel;
struct EQUIPSLOTINFO slot;
#if PACKETVER >= 20071002
- int HireExpireDate;
+ int32 HireExpireDate;
#endif
#if PACKETVER >= 20080102
- unsigned short bindOnEquipType;
+ uint16 bindOnEquipType;
#endif
#if PACKETVER >= 20100629
- unsigned short wItemSpriteNumber;
+ uint16 wItemSpriteNumber;
#endif
#if PACKETVER >= 20150226
- unsigned char option_count;
+ uint8 option_count;
struct RndOptions option_data[5];
#endif
#if PACKETVER >= 20120925
struct {
- unsigned char IsIdentified : 1;
- unsigned char IsDamaged : 1;
- unsigned char PlaceETCTab : 1;
- unsigned char SpareBits : 5;
+ uint8 IsIdentified : 1;
+ uint8 IsDamaged : 1;
+ uint8 PlaceETCTab : 1;
+ uint8 SpareBits : 5;
} Flag;
#endif
} __attribute__((packed));
struct packet_authok {
- short PacketType;
- unsigned int startTime;
- unsigned char PosDir[3];
- unsigned char xSize;
- unsigned char ySize;
+ int16 PacketType;
+ uint32 startTime;
+ uint8 PosDir[3];
+ uint8 xSize;
+ uint8 ySize;
#if PACKETVER >= 20080102
- short font;
+ int16 font;
#endif
#if PACKETVER >= 20141022
- unsigned char sex;
+ uint8 sex;
#endif
} __attribute__((packed));
struct packet_monster_hp {
- short PacketType;
- unsigned int GID;
- int HP;
- int MaxHP;
+ int16 PacketType;
+ uint32 GID;
+ int32 HP;
+ int32 MaxHP;
} __attribute__((packed));
struct packet_sc_notick {
- short PacketType;
- short index;
- unsigned int AID;
- unsigned char state;
+ int16 PacketType;
+ int16 index;
+ uint32 AID;
+ uint8 state;
} __attribute__((packed));
struct packet_additem {
- short PacketType;
- unsigned short Index;
- unsigned short count;
- unsigned short nameid;
+ int16 PacketType;
+ uint16 Index;
+ uint16 count;
+ uint16 nameid;
uint8 IsIdentified;
uint8 IsDamaged;
- unsigned char refiningLevel;
+ uint8 refiningLevel;
struct EQUIPSLOTINFO slot;
#if PACKETVER >= 20120925
- unsigned int location;
+ uint32 location;
#else
- unsigned short location;
+ uint16 location;
#endif
- unsigned char type;
- unsigned char result;
+ uint8 type;
+ uint8 result;
#if PACKETVER >= 20061218
- int HireExpireDate;
+ int32 HireExpireDate;
#endif
#if PACKETVER >= 20071002
- unsigned short bindOnEquipType;
+ uint16 bindOnEquipType;
#endif
#if PACKETVER >= 20150226
struct RndOptions option_data[5];
@@ -447,51 +447,51 @@ struct packet_additem {
} __attribute__((packed));
struct packet_dropflooritem {
- short PacketType;
- unsigned int ITAID;
- unsigned short ITID;
+ int16 PacketType;
+ uint32 ITAID;
+ uint16 ITID;
#if PACKETVER >= 20130000 /* not sure date */
- unsigned short type;
+ uint16 type;
#endif
uint8 IsIdentified;
- short xPos;
- short yPos;
- unsigned char subX;
- unsigned char subY;
- short count;
+ int16 xPos;
+ int16 yPos;
+ uint8 subX;
+ uint8 subY;
+ int16 count;
} __attribute__((packed));
struct packet_idle_unit2 {
#if PACKETVER < 20091103
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20071106
- unsigned char objecttype;
-#endif
- unsigned int GID;
- short speed;
- short bodyState;
- short healthState;
- short effectState;
- short job;
- short head;
- short weapon;
- short accessory;
- short shield;
- short accessory2;
- short accessory3;
- short headpalette;
- short bodypalette;
- short headDir;
- unsigned int GUID;
- short GEmblemVer;
- short honor;
- short virtue;
+ uint8 objecttype;
+#endif
+ uint32 GID;
+ int16 speed;
+ int16 bodyState;
+ int16 healthState;
+ int16 effectState;
+ int16 job;
+ int16 head;
+ int16 weapon;
+ int16 accessory;
+ int16 shield;
+ int16 accessory2;
+ int16 accessory3;
+ int16 headpalette;
+ int16 bodypalette;
+ int16 headDir;
+ uint32 GUID;
+ int16 GEmblemVer;
+ int16 honor;
+ int16 virtue;
uint8 isPKModeON;
- unsigned char sex;
- unsigned char PosDir[3];
- unsigned char xSize;
- unsigned char ySize;
- unsigned char state;
- short clevel;
+ uint8 sex;
+ uint8 PosDir[3];
+ uint8 xSize;
+ uint8 ySize;
+ uint8 state;
+ int16 clevel;
#else // ! PACKETVER < 20091103
UNAVAILABLE_STRUCT;
#endif // PACKETVER < 20091103
@@ -499,473 +499,473 @@ struct packet_idle_unit2 {
struct packet_spawn_unit2 {
#if PACKETVER < 20091103
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20071106
- unsigned char objecttype;
-#endif
- unsigned int GID;
- short speed;
- short bodyState;
- short healthState;
- short effectState;
- short head;
- short weapon;
- short accessory;
- short job;
- short shield;
- short accessory2;
- short accessory3;
- short headpalette;
- short bodypalette;
- short headDir;
+ uint8 objecttype;
+#endif
+ uint32 GID;
+ int16 speed;
+ int16 bodyState;
+ int16 healthState;
+ int16 effectState;
+ int16 head;
+ int16 weapon;
+ int16 accessory;
+ int16 job;
+ int16 shield;
+ int16 accessory2;
+ int16 accessory3;
+ int16 headpalette;
+ int16 bodypalette;
+ int16 headDir;
uint8 isPKModeON;
- unsigned char sex;
- unsigned char PosDir[3];
- unsigned char xSize;
- unsigned char ySize;
+ uint8 sex;
+ uint8 PosDir[3];
+ uint8 xSize;
+ uint8 ySize;
#else // ! PACKETVER < 20091103
UNAVAILABLE_STRUCT;
#endif // PACKETVER < 20091103
} __attribute__((packed));
struct packet_spawn_unit {
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20091103
- short PacketLength;
- unsigned char objecttype;
+ int16 PacketLength;
+ uint8 objecttype;
#endif
#if PACKETVER >= 20131223
- unsigned int AID;
+ uint32 AID;
#endif
- unsigned int GID;
- short speed;
- short bodyState;
- short healthState;
+ uint32 GID;
+ int16 speed;
+ int16 bodyState;
+ int16 healthState;
#if PACKETVER < 20080102
- short effectState;
+ int16 effectState;
#else
- int effectState;
+ int32 effectState;
#endif
- short job;
- short head;
+ int16 job;
+ int16 head;
#if PACKETVER < 7
- short weapon;
+ int16 weapon;
#else
- int weapon;
+ int32 weapon;
#endif
- short accessory;
+ int16 accessory;
#if PACKETVER < 7
- short shield;
+ int16 shield;
#endif
- short accessory2;
- short accessory3;
- short headpalette;
- short bodypalette;
- short headDir;
+ int16 accessory2;
+ int16 accessory3;
+ int16 headpalette;
+ int16 bodypalette;
+ int16 headDir;
#if PACKETVER >= 20101124
- short robe;
+ int16 robe;
#endif
- unsigned int GUID;
- short GEmblemVer;
- short honor;
+ uint32 GUID;
+ int16 GEmblemVer;
+ int16 honor;
#if PACKETVER > 7
- int virtue;
+ int32 virtue;
#else
- short virtue;
+ int16 virtue;
#endif
uint8 isPKModeON;
- unsigned char sex;
- unsigned char PosDir[3];
- unsigned char xSize;
- unsigned char ySize;
- short clevel;
+ uint8 sex;
+ uint8 PosDir[3];
+ uint8 xSize;
+ uint8 ySize;
+ int16 clevel;
#if PACKETVER >= 20080102
- short font;
+ int16 font;
#endif
#if PACKETVER >= 20120221
- int maxHP;
- int HP;
- unsigned char isBoss;
+ int32 maxHP;
+ int32 HP;
+ uint8 isBoss;
#endif
#if PACKETVER >= 20150513
- short body;
+ int16 body;
char name[NAME_LENGTH];
#endif
} __attribute__((packed));
struct packet_unit_walking {
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20091103
- short PacketLength;
+ int16 PacketLength;
#endif
#if PACKETVER > 20071106
- unsigned char objecttype;
+ uint8 objecttype;
#endif
#if PACKETVER >= 20131223
- unsigned int AID;
+ uint32 AID;
#endif
- unsigned int GID;
- short speed;
- short bodyState;
- short healthState;
+ uint32 GID;
+ int16 speed;
+ int16 bodyState;
+ int16 healthState;
#if PACKETVER < 7
- short effectState;
+ int16 effectState;
#else
- int effectState;
+ int32 effectState;
#endif
- short job;
- short head;
+ int16 job;
+ int16 head;
#if PACKETVER < 7
- short weapon;
+ int16 weapon;
#else
- int weapon;
+ int32 weapon;
#endif
- short accessory;
- unsigned int moveStartTime;
+ int16 accessory;
+ uint32 moveStartTime;
#if PACKETVER < 7
- short shield;
+ int16 shield;
#endif
- short accessory2;
- short accessory3;
- short headpalette;
- short bodypalette;
- short headDir;
+ int16 accessory2;
+ int16 accessory3;
+ int16 headpalette;
+ int16 bodypalette;
+ int16 headDir;
#if PACKETVER >= 20101124
- short robe;
+ int16 robe;
#endif
- unsigned int GUID;
- short GEmblemVer;
- short honor;
+ uint32 GUID;
+ int16 GEmblemVer;
+ int16 honor;
#if PACKETVER > 7
- int virtue;
+ int32 virtue;
#else
- short virtue;
+ int16 virtue;
#endif
uint8 isPKModeON;
- unsigned char sex;
- unsigned char MoveData[6];
- unsigned char xSize;
- unsigned char ySize;
- short clevel;
+ uint8 sex;
+ uint8 MoveData[6];
+ uint8 xSize;
+ uint8 ySize;
+ int16 clevel;
#if PACKETVER >= 20080102
- short font;
+ int16 font;
#endif
#if PACKETVER >= 20120221
- int maxHP;
- int HP;
- unsigned char isBoss;
+ int32 maxHP;
+ int32 HP;
+ uint8 isBoss;
#endif
#if PACKETVER >= 20150513
- short body;
+ int16 body;
char name[NAME_LENGTH];
#endif
} __attribute__((packed));
struct packet_idle_unit {
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20091103
- short PacketLength;
- unsigned char objecttype;
+ int16 PacketLength;
+ uint8 objecttype;
#endif
#if PACKETVER >= 20131223
- unsigned int AID;
+ uint32 AID;
#endif
- unsigned int GID;
- short speed;
- short bodyState;
- short healthState;
+ uint32 GID;
+ int16 speed;
+ int16 bodyState;
+ int16 healthState;
#if PACKETVER < 20080102
- short effectState;
+ int16 effectState;
#else
- int effectState;
+ int32 effectState;
#endif
- short job;
- short head;
+ int16 job;
+ int16 head;
#if PACKETVER < 7
- short weapon;
+ int16 weapon;
#else
- int weapon;
+ int32 weapon;
#endif
- short accessory;
+ int16 accessory;
#if PACKETVER < 7
- short shield;
+ int16 shield;
#endif
- short accessory2;
- short accessory3;
- short headpalette;
- short bodypalette;
- short headDir;
+ int16 accessory2;
+ int16 accessory3;
+ int16 headpalette;
+ int16 bodypalette;
+ int16 headDir;
#if PACKETVER >= 20101124
- short robe;
+ int16 robe;
#endif
- unsigned int GUID;
- short GEmblemVer;
- short honor;
+ uint32 GUID;
+ int16 GEmblemVer;
+ int16 honor;
#if PACKETVER > 7
- int virtue;
+ int32 virtue;
#else
- short virtue;
+ int16 virtue;
#endif
uint8 isPKModeON;
- unsigned char sex;
- unsigned char PosDir[3];
- unsigned char xSize;
- unsigned char ySize;
- unsigned char state;
- short clevel;
+ uint8 sex;
+ uint8 PosDir[3];
+ uint8 xSize;
+ uint8 ySize;
+ uint8 state;
+ int16 clevel;
#if PACKETVER >= 20080102
- short font;
+ int16 font;
#endif
#if PACKETVER >= 20120221
- int maxHP;
- int HP;
- unsigned char isBoss;
+ int32 maxHP;
+ int32 HP;
+ uint8 isBoss;
#endif
#if PACKETVER >= 20150513
- short body;
+ int16 body;
char name[NAME_LENGTH];
#endif
} __attribute__((packed));
struct packet_status_change {
- short PacketType;
- short index;
- unsigned int AID;
- unsigned char state;
+ int16 PacketType;
+ int16 index;
+ uint32 AID;
+ uint8 state;
#if PACKETVER >= 20120618
- unsigned int Total;
+ uint32 Total;
#endif
#if PACKETVER >= 20090121
- unsigned int Left;
- int val1;
- int val2;
- int val3;
+ uint32 Left;
+ int32 val1;
+ int32 val2;
+ int32 val3;
#endif
} __attribute__((packed));
struct packet_status_change_end {
- short PacketType;
- short index;
- unsigned int AID;
- unsigned char state;
+ int16 PacketType;
+ int16 index;
+ uint32 AID;
+ uint8 state;
} __attribute__((packed));
struct packet_status_change2 {
- short PacketType;
- short index;
- unsigned int AID;
- unsigned char state;
- unsigned int Left;
- int val1;
- int val2;
- int val3;
+ int16 PacketType;
+ int16 index;
+ uint32 AID;
+ uint8 state;
+ uint32 Left;
+ int32 val1;
+ int32 val2;
+ int32 val3;
} __attribute__((packed));
struct packet_maptypeproperty2 {
- short PacketType;
- short type;
+ int16 PacketType;
+ int16 type;
struct {
- unsigned int party : 1; // Show attack cursor on non-party members (PvP)
- unsigned int guild : 1; // Show attack cursor on non-guild members (GvG)
- unsigned int siege : 1; // Show emblem over characters' heads when in GvG (WoE castle)
- unsigned int mineffect : 1; // Automatically enable /mineffect
- unsigned int nolockon : 1; // TODO: What does this do? (shows attack cursor on non-party members)
- unsigned int countpk : 1; /// Show the PvP counter
- unsigned int nopartyformation : 1; /// Prevent party creation/modification
- unsigned int bg : 1; // TODO: What does this do? Probably related to Battlegrounds, but I'm not sure on the effect
- unsigned int nocostume : 1; /// Does not show costume sprite.
- unsigned int usecart : 1; /// Allow opening cart inventory
- unsigned int summonstarmiracle : 1; // TODO: What does this do? Related to Taekwon Masters, but I have no idea.
- unsigned int SpareBits : 15; /// Currently ignored, reserved for future updates
+ uint32 party : 1; // Show attack cursor on non-party members (PvP)
+ uint32 guild : 1; // Show attack cursor on non-guild members (GvG)
+ uint32 siege : 1; // Show emblem over characters' heads when in GvG (WoE castle)
+ uint32 mineffect : 1; // Automatically enable /mineffect
+ uint32 nolockon : 1; // TODO: What does this do? (shows attack cursor on non-party members)
+ uint32 countpk : 1; /// Show the PvP counter
+ uint32 nopartyformation : 1; /// Prevent party creation/modification
+ uint32 bg : 1; // TODO: What does this do? Probably related to Battlegrounds, but I'm not sure on the effect
+ uint32 nocostume : 1; /// Does not show costume sprite.
+ uint32 usecart : 1; /// Allow opening cart inventory
+ uint32 summonstarmiracle : 1; // TODO: What does this do? Related to Taekwon Masters, but I have no idea.
+ uint32 SpareBits : 15; /// Currently ignored, reserved for future updates
} flag;
} __attribute__((packed));
struct packet_bgqueue_ack {
- short PacketType;
- unsigned char type;
+ int16 PacketType;
+ uint8 type;
char bg_name[NAME_LENGTH];
} __attribute__((packed));
struct packet_bgqueue_notice_delete {
- short PacketType;
- unsigned char type;
+ int16 PacketType;
+ uint8 type;
char bg_name[NAME_LENGTH];
} __attribute__((packed));
struct packet_bgqueue_register {
- short PacketType;
- short type;
+ int16 PacketType;
+ int16 type;
char bg_name[NAME_LENGTH];
} __attribute__((packed));
struct packet_bgqueue_update_info {
- short PacketType;
+ int16 PacketType;
char bg_name[NAME_LENGTH];
- int position;
+ int32 position;
} __attribute__((packed));
struct packet_bgqueue_checkstate {
- short PacketType;
+ int16 PacketType;
char bg_name[NAME_LENGTH];
} __attribute__((packed));
struct packet_bgqueue_revoke_req {
- short PacketType;
+ int16 PacketType;
char bg_name[NAME_LENGTH];
} __attribute__((packed));
struct packet_bgqueue_battlebegin_ack {
- short PacketType;
- unsigned char result;
+ int16 PacketType;
+ uint8 result;
char bg_name[NAME_LENGTH];
char game_name[NAME_LENGTH];
} __attribute__((packed));
struct packet_bgqueue_notify_entry {
- short PacketType;
+ int16 PacketType;
char name[NAME_LENGTH];
- int position;
+ int32 position;
} __attribute__((packed));
struct packet_bgqueue_battlebegins {
- short PacketType;
+ int16 PacketType;
char bg_name[NAME_LENGTH];
char game_name[NAME_LENGTH];
} __attribute__((packed));
struct packet_script_clear {
- short PacketType;
- unsigned int NpcID;
+ int16 PacketType;
+ uint32 NpcID;
} __attribute__((packed));
/* made possible thanks to Yommy!! */
struct packet_package_item_announce {
- short PacketType;
- short PacketLength;
- unsigned char type;
- unsigned short ItemID;
- char len;
+ int16 PacketType;
+ int16 PacketLength;
+ uint8 type;
+ uint16 ItemID;
+ int8 len;
char Name[NAME_LENGTH];
- char unknown;
- unsigned short BoxItemID;
+ int8 unknown;
+ uint16 BoxItemID;
} __attribute__((packed));
/* made possible thanks to Yommy!! */
struct packet_item_drop_announce {
- short PacketType;
- short PacketLength;
- unsigned char type;
- unsigned short ItemID;
- char len;
+ int16 PacketType;
+ int16 PacketLength;
+ uint8 type;
+ uint16 ItemID;
+ int8 len;
char Name[NAME_LENGTH];
char monsterNameLen;
char monsterName[NAME_LENGTH];
} __attribute__((packed));
struct packet_cart_additem_ack {
- short PacketType;
- char result;
+ int16 PacketType;
+ int8 result;
} __attribute__((packed));
struct packet_banking_check {
- short PacketType;
+ int16 PacketType;
int64 Money;
- short Reason;
+ int16 Reason;
} __attribute__((packed));
struct packet_banking_deposit_req {
- short PacketType;
- unsigned int AID;
- int Money;
+ int16 PacketType;
+ uint32 AID;
+ int32 Money;
} __attribute__((packed));
struct packet_banking_withdraw_req {
- short PacketType;
- unsigned int AID;
- int Money;
+ int16 PacketType;
+ uint32 AID;
+ int32 Money;
} __attribute__((packed));
struct packet_banking_deposit_ack {
- short PacketType;
- short Reason;
+ int16 PacketType;
+ int16 Reason;
int64 Money;
- int Balance;
+ int32 Balance;
} __attribute__((packed));
struct packet_banking_withdraw_ack {
- short PacketType;
- short Reason;
+ int16 PacketType;
+ int16 Reason;
int64 Money;
- int Balance;
+ int32 Balance;
} __attribute__((packed));
/* Roulette System [Yommy/Hercules] */
struct packet_roulette_open_ack {
- short PacketType;
- char Result;
- int Serial;
- char Step;
- char Idx;
- short AdditionItemID;
- int GoldPoint;
- int SilverPoint;
- int BronzePoint;
+ int16 PacketType;
+ int8 Result;
+ int32 Serial;
+ int8 Step;
+ int8 Idx;
+ int16 AdditionItemID;
+ int32 GoldPoint;
+ int32 SilverPoint;
+ int32 BronzePoint;
} __attribute__((packed));
struct packet_roulette_info_ack {
- short PacketType;
- short PacketLength;
- unsigned int RouletteSerial;
+ int16 PacketType;
+ int16 PacketLength;
+ uint32 RouletteSerial;
struct {
- unsigned short Row;
- unsigned short Position;
- unsigned short ItemId;
- unsigned short Count;
+ uint16 Row;
+ uint16 Position;
+ uint16 ItemId;
+ uint16 Count;
} ItemInfo[42];
} __attribute__((packed));
struct packet_roulette_close_ack {
- short PacketType;
- unsigned char Result;
+ int16 PacketType;
+ uint8 Result;
} __attribute__((packed));
struct packet_roulette_generate_ack {
- short PacketType;
- unsigned char Result;
- unsigned short Step;
- unsigned short Idx;
- unsigned short AdditionItemID;
- int RemainGold;
- int RemainSilver;
- int RemainBronze;
+ int16 PacketType;
+ uint8 Result;
+ uint16 Step;
+ uint16 Idx;
+ uint16 AdditionItemID;
+ int32 RemainGold;
+ int32 RemainSilver;
+ int32 RemainBronze;
} __attribute__((packed));
struct packet_roulette_itemrecv_req {
- short PacketType;
- unsigned char Condition;
+ int16 PacketType;
+ uint8 Condition;
} __attribute__((packed));
struct packet_roulette_itemrecv_ack {
- short PacketType;
- unsigned char Result;
- unsigned short AdditionItemID;
+ int16 PacketType;
+ uint8 Result;
+ uint16 AdditionItemID;
} __attribute__((packed));
struct packet_itemlist_normal {
- short PacketType;
- short PacketLength;
+ int16 PacketType;
+ int16 PacketLength;
struct NORMALITEM_INFO list[MAX_ITEMLIST];
} __attribute__((packed));
struct packet_itemlist_equip {
- short PacketType;
- short PacketLength;
+ int16 PacketType;
+ int16 PacketLength;
struct EQUIPITEM_INFO list[MAX_ITEMLIST];
} __attribute__((packed));
struct packet_storelist_normal {
- short PacketType;
- short PacketLength;
+ int16 PacketType;
+ int16 PacketLength;
#if PACKETVER >= 20120925
char name[NAME_LENGTH];
#endif
@@ -973,8 +973,8 @@ struct packet_storelist_normal {
} __attribute__((packed));
struct packet_storelist_equip {
- short PacketType;
- short PacketLength;
+ int16 PacketType;
+ int16 PacketLength;
#if PACKETVER >= 20120925
char name[NAME_LENGTH];
#endif
@@ -982,124 +982,124 @@ struct packet_storelist_equip {
} __attribute__((packed));
struct packet_equip_item {
- short PacketType;
- unsigned short index;
+ int16 PacketType;
+ uint16 index;
#if PACKETVER >= 20120925
- unsigned int wearLocation;
+ uint32 wearLocation;
#else
- unsigned short wearLocation;
+ uint16 wearLocation;
#endif
} __attribute__((packed));
struct packet_equipitem_ack {
- short PacketType;
- unsigned short index;
+ int16 PacketType;
+ uint16 index;
#if PACKETVER >= 20120925
- unsigned int wearLocation;
+ uint32 wearLocation;
#else
- unsigned short wearLocation;
+ uint16 wearLocation;
#endif
#if PACKETVER >= 20100629
- unsigned short wItemSpriteNumber;
+ uint16 wItemSpriteNumber;
#endif
- unsigned char result;
+ uint8 result;
} __attribute__((packed));
struct packet_unequipitem_ack {
- short PacketType;
- unsigned short index;
+ int16 PacketType;
+ uint16 index;
#if PACKETVER >= 20120925
- unsigned int wearLocation;
+ uint32 wearLocation;
#else
- unsigned short wearLocation;
+ uint16 wearLocation;
#endif
- unsigned char result;
+ uint8 result;
} __attribute__((packed));
struct packet_viewequip_ack {
- short PacketType;
- short PacketLength;
+ int16 PacketType;
+ int16 PacketLength;
char characterName[NAME_LENGTH];
- short job;
- short head;
- short accessory;
- short accessory2;
- short accessory3;
+ int16 job;
+ int16 head;
+ int16 accessory;
+ int16 accessory2;
+ int16 accessory3;
#if PACKETVER >= 20101124
- short robe;
+ int16 robe;
#endif
- short headpalette;
- short bodypalette;
- unsigned char sex;
+ int16 headpalette;
+ int16 bodypalette;
+ uint8 sex;
struct EQUIPITEM_INFO list[MAX_INVENTORY];
} __attribute__((packed));
struct packet_notify_bounditem {
- short PacketType;
- unsigned short index;
+ int16 PacketType;
+ uint16 index;
} __attribute__((packed));
struct packet_skill_entry {
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20110718
- short PacketLength;
+ int16 PacketLength;
#endif
- unsigned int AID;
- unsigned int creatorAID;
- short xPos;
- short yPos;
+ uint32 AID;
+ uint32 creatorAID;
+ int16 xPos;
+ int16 yPos;
#if PACKETVER >= 20121212
- int job;
+ int32 job;
#else
- unsigned char job;
+ uint8 job;
#endif
#if PACKETVER >= 20110718
- char RadiusRange;
+ int8 RadiusRange;
#endif
- unsigned char isVisible;
+ uint8 isVisible;
#if PACKETVER >= 20130731
- unsigned char level;
+ uint8 level;
#endif
} __attribute__((packed));
struct packet_graffiti_entry {
- short PacketType;
- unsigned int AID;
- unsigned int creatorAID;
- short xPos;
- short yPos;
- unsigned char job;
- unsigned char isVisible;
- unsigned char isContens;
+ int16 PacketType;
+ uint32 AID;
+ uint32 creatorAID;
+ int16 xPos;
+ int16 yPos;
+ uint8 job;
+ uint8 isVisible;
+ uint8 isContens;
char msg[80];
} __attribute__((packed));
struct packet_damage {
- short PacketType;
- unsigned int GID;
- unsigned int targetGID;
- unsigned int startTime;
- int attackMT;
- int attackedMT;
+ int16 PacketType;
+ uint32 GID;
+ uint32 targetGID;
+ uint32 startTime;
+ int32 attackMT;
+ int32 attackedMT;
#if PACKETVER < 20071113
- short damage;
+ int16 damage;
#else
- int damage;
+ int32 damage;
#endif
#if PACKETVER >= 20131223
- unsigned char is_sp_damaged;
+ uint8 is_sp_damaged;
#endif
- short count;
- unsigned char action;
+ int16 count;
+ uint8 action;
#if PACKETVER < 20071113
- short leftDamage;
+ int16 leftDamage;
#else
- int leftDamage;
+ int32 leftDamage;
#endif
} __attribute__((packed));
struct packet_gm_monster_item {
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20131218
char str[100];
#else
@@ -1108,35 +1108,35 @@ struct packet_gm_monster_item {
} __attribute__((packed));
struct packet_npc_market_purchase {
- short PacketType;
- short PacketLength;
+ int16 PacketType;
+ int16 PacketLength;
struct {
- unsigned short ITID;
- int qty;
+ uint16 ITID;
+ int32 qty;
} list[]; // Note: We assume this should be <= MAX_INVENTORY (since you can't hold more than MAX_INVENTORY items thus cant buy that many at once).
} __attribute__((packed));
struct packet_npc_market_result_ack {
- short PacketType;
- short PacketLength;
- unsigned char result;
+ int16 PacketType;
+ int16 PacketLength;
+ uint8 result;
struct {
- unsigned short ITID;
- unsigned short qty;
- unsigned int price;
+ uint16 ITID;
+ uint16 qty;
+ uint32 price;
} list[MAX_INVENTORY];/* assuming MAX_INVENTORY is max since you can't hold more than MAX_INVENTORY items thus cant buy that many at once. */
} __attribute__((packed));
struct packet_npc_market_open {
- short PacketType;
- short PacketLength;
+ int16 PacketType;
+ int16 PacketLength;
/* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
struct {
- unsigned short nameid;
- unsigned char type;
- unsigned int price;
- unsigned int qty;
- unsigned short view;
+ uint16 nameid;
+ uint8 type;
+ uint32 price;
+ uint32 qty;
+ uint16 view;
// It seems that the client doesn't have any hard-coded limit for this list
// it's possible to send up to 1890 items without dropping a packet that's
// too large [Panikon]
@@ -1144,30 +1144,30 @@ struct packet_npc_market_open {
} __attribute__((packed));
struct packet_wis_end {
- short PacketType;
- char result;
+ int16 PacketType;
+ int8 result;
#if PACKETVER >= 20131223
- unsigned int unknown;/* maybe AID, not sure what for (works sending as 0) */
+ uint32 unknown;/* maybe AID, not sure what for (works sending as 0) */
#endif
} __attribute__((packed));
struct packet_party_leader_changed {
- short PacketType;
- unsigned int prev_leader_aid;
- unsigned int new_leader_aid;
+ int16 PacketType;
+ uint32 prev_leader_aid;
+ uint32 new_leader_aid;
} __attribute__((packed));
struct packet_hotkey {
#ifdef HOTKEY_SAVING
- short PacketType;
+ int16 PacketType;
#if PACKETVER >= 20141022
- char Rotate;
+ int8 Rotate;
#endif
struct {
- char isSkill; // 0: Item, 1:Skill
- unsigned int ID; // Item/Skill ID
- short count; // Item Quantity/Skill Level
+ int8 isSkill; // 0: Item, 1:Skill
+ uint32 ID; // Item/Skill ID
+ int16 count; // Item Quantity/Skill Level
} hotkey[MAX_HOTKEYS];
#else // not HOTKEY_SAVING
UNAVAILABLE_STRUCT;
@@ -1215,6 +1215,19 @@ struct packet_quest_list_header {
//struct packet_quest_list_info list[]; // Variable-length
} __attribute__((packed));
+struct packet_chat_message {
+ uint16 packet_id;
+ int16 packet_len;
+ char message[];
+} __attribute__((packed));
+
+struct packet_whisper_message {
+ uint16 packet_id;
+ int16 packet_len;
+ char name[NAME_LENGTH];
+ char message[];
+} __attribute__((packed));
+
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris