summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-15 20:27:50 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-15 20:27:50 +0300
commit6c520b880e31c4ce281999ad6bdb80bd6bbd6634 (patch)
treed16008ad06ffde4181ef8a9c99acce269bef6551 /src/char/char.c
parent8ab5a7a975aa87ef21619e960d5ca63f0eef3732 (diff)
downloadplugin-6c520b880e31c4ce281999ad6bdb80bd6bbd6634.tar.gz
plugin-6c520b880e31c4ce281999ad6bdb80bd6bbd6634.tar.bz2
plugin-6c520b880e31c4ce281999ad6bdb80bd6bbd6634.tar.xz
plugin-6c520b880e31c4ce281999ad6bdb80bd6bbd6634.zip
char: add support for player look in char creation.
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 2d3e466..38c5f42 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -37,6 +37,7 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
// ignore char creation disable option
const int fd = *fdPtr;
uint16 race = 0;
+ uint16 look = 0;
uint8 sex = 0;
if (sd->version >= 4)
@@ -45,7 +46,7 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
if (race < min_char_class || race > max_char_class)
{
chr->creation_failed(fd, -10);
- RFIFOSKIP(fd, 31 + 3);
+ RFIFOSKIP(fd, 31 + 5);
hookStop();
return;
}
@@ -53,10 +54,11 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
if (sex > 1 && sex != 99)
{
chr->creation_failed(fd, -11);
- RFIFOSKIP(fd, 31 + 3);
+ RFIFOSKIP(fd, 31 + 5);
hookStop();
return;
}
+ look = RFIFOW(fd, 34);
}
const int result = chr->make_new_char_sql(sd, (char*)RFIFOP(fd, 2), 1, 1, 1, 1, 1, 1, RFIFOB(fd, 26), RFIFOW(fd, 27), RFIFOW(fd, 29));
@@ -74,6 +76,7 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
{
char_dat.class_ = race;
char_dat.sex = sex;
+ char_dat.clothes_color = look;
chr->mmo_char_tosql(result, &char_dat);
}
@@ -83,7 +86,7 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
sd->found_char[char_dat.slot] = result; // the char_id of the new char
}
if (sd->version >= 4)
- RFIFOSKIP(fd, 31 + 3);
+ RFIFOSKIP(fd, 31 + 5);
else
RFIFOSKIP(fd, 31);
hookStop();