summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/packet_db.txt32
-rw-r--r--src/char/char.c25
-rw-r--r--src/common/mmo.h1
3 files changed, 56 insertions, 2 deletions
diff --git a/db/packet_db.txt b/db/packet_db.txt
index 9da4dc4e3..a6838fb9c 100644
--- a/db/packet_db.txt
+++ b/db/packet_db.txt
@@ -1666,5 +1666,35 @@ packet_ver: 28
0x088b,2,searchstoreinfonextpage,0
0x08a2,12,searchstoreinfolistitemclick,2:6:10
+//2012-03-07fRagexeRE
+0x086A,19,wanttoconnection,2:6:10:14:18
+0x0437,5,walktoxy,2
+0x0887,6,ticksend,2
+0x0890,5,changedir,2:4
+0x0865,6,takeitem,2
+0x02C4,6,dropitem,2:4
+0x093B,8,movetokafra,2:4
+0x0963,8,movefromkafra,2:4
+0x0438,10,useskilltopos,2:4:6:8
+0x0366,90,useskilltoposinfo,2:4:6:8:10
+0x096A,6,getcharnamerequest,2
+0x0368,6,solvecharname,2
+0x0369,26,friendslistadd,2
+0x0863,5,hommenu,4
+0x0861,36,storagepassword,0
+0x0929,26,partyinvite2,2
+0x0885,7,actionrequest,2:6
+0x0889,10,useskilltoid,2:4:6
+0x0870,-1,itemlistwindowselected,2:4:8
+0x0926,18,bookingregreq,2:4:6
+0x0815,-1,reqopenbuyingstore,2:4:8:9:89
+0x0817,2,reqclosebuyingstore,0
+0x0360,6,reqclickbuyingstore,2
+0x0811,-1,reqtradebuyingstore,2:4:8:12
+0x0884,-1,searchstoreinfo,2:4:5:9:13:14:15
+0x0835,2,searchstoreinfonextpage,0
+0x0838,12,searchstoreinfolistitemclick,2:6:10
+0x0439,8,useitem,2:4
+
//Add new packets here
-//packet_ver: 27 \ No newline at end of file
+//packet_ver: 29
diff --git a/src/char/char.c b/src/char/char.c
index a6e5d39c8..fb413be82 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1320,8 +1320,14 @@ int check_char_name(char * name, char * esc_name)
//-----------------------------------
// Function to create a new character
//-----------------------------------
+#if PACKETVER >= 20120307
+int make_new_char_sql(struct char_session_data* sd, char* name_, int slot, int hair_color, int hair_style)
+{
+ int str = 5, agi = 5, vit = 5, int_ = 5, dex = 5,luk = 5;
+#else
int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style)
{
+#endif
char name[NAME_LENGTH];
char esc_name[NAME_LENGTH*2+1];
int char_id, flag;
@@ -1335,10 +1341,14 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag
return flag;
//check other inputs
+#if PACKETVER >= 20120307
+ if(slot >= MAX_CHARS)
+#else
if((slot >= MAX_CHARS) // slots
|| (str + agi + vit + int_ + dex + luk != 6*5 ) // stats
|| (str < 1 || str > 9 || agi < 1 || agi > 9 || vit < 1 || vit > 9 || int_ < 1 || int_ > 9 || dex < 1 || dex > 9 || luk < 1 || luk > 9) // individual stat values
|| (str + int_ != 10 || agi + luk != 10 || vit + dex != 10) ) // pairs
+#endif
return -2; // invalid input
// check the number of already existing chars in this account
@@ -3672,14 +3682,24 @@ int parse_char(int fd)
break;
// create new char
+#if PACKETVER >= 20120307
+ // S 0970 <name>.24B <slot>.B <hair color>.W <hair style>.W
+ case 0x970:
+ FIFOSD_CHECK(31);
+#else
// S 0067 <name>.24B <str>.B <agi>.B <vit>.B <int>.B <dex>.B <luk>.B <slot>.B <hair color>.W <hair style>.W
case 0x67:
FIFOSD_CHECK(37);
+#endif
if( !char_new ) //turn character creation on/off [Kevin]
i = -2;
else
+#if PACKETVER >= 20120307
+ i = make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOW(fd,27),RFIFOW(fd,29));
+#else
i = make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27),RFIFOB(fd,28),RFIFOB(fd,29),RFIFOB(fd,30),RFIFOB(fd,31),RFIFOB(fd,32),RFIFOW(fd,33),RFIFOW(fd,35));
+#endif
//'Charname already exists' (-1), 'Char creation denied' (-2) and 'You are underaged' (-3)
if (i < 0)
@@ -3711,8 +3731,11 @@ int parse_char(int fd)
if( ch < MAX_CHARS )
sd->found_char[ch] = i; // the char_id of the new char
}
-
+#if PACKETVER >= 20120307
+ RFIFOSKIP(fd,31);
+#else
RFIFOSKIP(fd,37);
+#endif
break;
// delete char
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 602a2e40b..2e25eae16 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -43,6 +43,7 @@
// 20110111 - 2011-01-11aRagexeRE+ - 0x6b, 0x6d
// 20110928 - 2011-09-28aRagexeRE+ - 0x6b, 0x6d
// 20111025 - 2011-10-25aRagexeRE+ - 0x6b, 0x6d
+// 20120307 - 2012-03-07aRagexeRE+ - 0x970
#ifndef PACKETVER
#define PACKETVER 20111116