summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 237e04638..178a20262 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -525,7 +525,7 @@ int mmo_char_tostr(char *str, struct mmo_charstatus *p, struct global_reg *reg,
"%d\t%d,%d\t%s\t%d,%d,%d\t%u,%u,%d" //Up to Zeny field
"\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" //Up to Skill Point
"\t%d,%d,%d\t%d,%d,%d,%d" //Up to hom id
- "\t%d,%d,%d\t%d,%d,%d,%d,%d" //Up to head bottom
+ "\t%d,%d,%d\t%d,%d,%d,%d,%d,%d" //Up to robe
"\t%d,%d,%d\t%d,%d,%d" //last point + save point
",%d,%d,%d,%d,%d,%lu\t", //Family info + delete date
p->char_id, p->account_id, p->slot, p->name, //
@@ -537,7 +537,7 @@ int mmo_char_tostr(char *str, struct mmo_charstatus *p, struct global_reg *reg,
p->option, p->karma, p->manner, //
p->party_id, p->guild_id, p->pet_id, p->hom_id,
p->hair, p->hair_color, p->clothes_color,
- p->weapon, p->shield, p->head_top, p->head_mid, p->head_bottom,
+ p->weapon, p->shield, p->head_top, p->head_mid, p->head_bottom, p->robe,
p->last_point.map, p->last_point.x, p->last_point.y, //
p->save_point.map, p->save_point.x, p->save_point.y,
p->partner_id,p->father,p->mother,p->child,p->fame, //
@@ -599,7 +599,26 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
// initilialise character
memset(p, '\0', sizeof(struct mmo_charstatus));
-// Char structure of version 146xx (delete date)
+// Char structure of version 14797 (robe)
+ if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d,%d,%d,%d,%d,%d,%lu%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0],
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_uint[0], &tmp_uint[1], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26], &tmp_int[44],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34], &tmp_int[47],
+ &tmp_int[45], &tmp_int[35], &tmp_int[36],
+ &tmp_int[46], &tmp_int[37], &tmp_int[38], &tmp_int[39],
+ &tmp_int[40], &tmp_int[41], &tmp_int[42], &tmp_int[43], &tmp_ulong[0], &next) != 50)
+ {
+ tmp_int[47] = 0; // robe
+// Char structure of version 14700 (delete date)
if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
"\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
"\t%d,%d,%d\t%d,%d,%d,%d,%d,%d,%d,%d,%lu%n",
@@ -742,7 +761,8 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
tmp_int[45] = mapindex_name2id(tmp_str[1]);
tmp_int[46] = mapindex_name2id(tmp_str[2]);
} // Char structure of version 1500 (homun + mapindex maps)
- } // Char structure of version 146xx (delete date)
+ } // Char structure of version 14700 (delete date)
+ } // Char structure of version 14797 (robe)
safestrncpy(p->name, tmp_str[0], NAME_LENGTH); //Overflow protection [Skotlex]
p->char_id = tmp_int[0];
@@ -793,6 +813,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
p->last_point.map = tmp_int[45];
p->save_point.map = tmp_int[46];
p->delete_date = tmp_ulong[0];
+ p->robe = tmp_int[47];
#ifndef TXT_SQL_CONVERT
// Some checks
@@ -1837,7 +1858,7 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
offset += 4;
#endif
#if PACKETVER >= 20110111
- WBUFL(buf,128) = 0; // robe sprite id
+ WBUFL(buf,128) = p->robe;
offset += 4;
#endif
return 106+offset;