summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c10
-rw-r--r--src/char/int_storage.c4
2 files changed, 9 insertions, 5 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 6f65eec37..5178791b5 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -790,7 +790,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
p->inventory[i].refine = tmp_int[5];
p->inventory[i].attribute = tmp_int[6];
- for(j = 0; j < MAX_SLOTS && tmp_str[0] && sscanf(tmp_str[0], ",%d%[0-9,-]",&tmp_int[0], tmp_str[0]) > 0; j++)
+ for(j = 0; j < MAX_SLOTS && tmp_str[0][0] && sscanf(tmp_str[0], ",%d%[0-9,-]",&tmp_int[0], tmp_str[0]) > 0; j++)
p->inventory[i].card[j] = tmp_int[0];
next += len;
@@ -814,7 +814,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
p->cart[i].refine = tmp_int[5];
p->cart[i].attribute = tmp_int[6];
- for(j = 0; j < MAX_SLOTS && tmp_str && sscanf(tmp_str[0], ",%d%[0-9,-]",&tmp_int[0], tmp_str[0]) > 0; j++)
+ for(j = 0; j < MAX_SLOTS && tmp_str[0][0] && sscanf(tmp_str[0], ",%d%[0-9,-]",&tmp_int[0], tmp_str[0]) > 0; j++)
p->cart[i].card[j] = tmp_int[0];
next += len;
@@ -1736,6 +1736,10 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
WBUFW(buf,106) = ( p->rename > 0 ) ? 0 : 1;
offset += 2;
#endif
+#if PACKETVER >= 20100721
+ mapindex_getmapname_ext(mapindex_id2name(p->last_point.map), (char*)WBUFP(buf,108));
+ offset += 16;
+#endif
return 106+offset;
}
@@ -1747,7 +1751,7 @@ int mmo_char_send006b(int fd, struct char_session_data* sd)
int i, j, found_num, offset = 0;
#if PACKETVER >= 20100413
offset += 3;
-#endif;
+#endif
found_num = 0;
for(i = 0; i < char_num; i++) {
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index a7dd66ec5..09e2f123d 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -80,7 +80,7 @@ bool storage_fromstr(char* str, int* account_id, struct storage_data* p)
p->items[i].refine = tmp_int[5];
p->items[i].attribute = tmp_int[6];
- for(j = 0; j < MAX_SLOTS && tmp_str && sscanf(tmp_str, ",%d%[0-9,-]",&tmp_int[0], tmp_str) > 0; j++)
+ for(j = 0; j < MAX_SLOTS && tmp_str[0] && sscanf(tmp_str, ",%d%[0-9,-]",&tmp_int[0], tmp_str) > 0; j++)
p->items[i].card[j] = tmp_int[0];
next += len;
@@ -145,7 +145,7 @@ int guild_storage_fromstr(char *str,struct guild_storage *p)
p->storage_[i].identify = tmp_int[4];
p->storage_[i].refine = tmp_int[5];
p->storage_[i].attribute = tmp_int[6];
- for(j = 0; j < MAX_SLOTS && tmp_str && sscanf(tmp_str, ",%d%[0-9,-]",&tmp_int[0], tmp_str) > 0; j++)
+ for(j = 0; j < MAX_SLOTS && tmp_str[0] && sscanf(tmp_str, ",%d%[0-9,-]",&tmp_int[0], tmp_str) > 0; j++)
p->storage_[i].card[j] = tmp_int[0];
next += len;
if (str[next] == ' ')