Char_serv upd
-Fix bugreport:7970 (char deletion for 2013+ client, thx ivanyan) -Fix bugreport:8087 (guild storage broken by bound_item)
This commit is contained in:
parent
475e6b721c
commit
9a5a6b9e6e
@ -1899,7 +1899,7 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
|
|||||||
offset += MAP_NAME_LENGTH_EXT;
|
offset += MAP_NAME_LENGTH_EXT;
|
||||||
#endif
|
#endif
|
||||||
#if PACKETVER >= 20100803
|
#if PACKETVER >= 20100803
|
||||||
WBUFL(buf,124) = TOL(p->delete_date);
|
WBUFL(buf,124) = (p->delete_date?TOL(p->delete_date)-time(NULL):0);
|
||||||
offset += 4;
|
offset += 4;
|
||||||
#endif
|
#endif
|
||||||
#if PACKETVER >= 20110111
|
#if PACKETVER >= 20110111
|
||||||
@ -3592,7 +3592,11 @@ void char_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date)
|
|||||||
WFIFOW(fd,0) = 0x828;
|
WFIFOW(fd,0) = 0x828;
|
||||||
WFIFOL(fd,2) = char_id;
|
WFIFOL(fd,2) = char_id;
|
||||||
WFIFOL(fd,6) = result;
|
WFIFOL(fd,6) = result;
|
||||||
|
#if PACKETVER > 20130000
|
||||||
|
WFIFOL(fd,10) = TOL(delete_date) - time(NULL);
|
||||||
|
#else
|
||||||
WFIFOL(fd,10) = TOL(delete_date);
|
WFIFOL(fd,10) = TOL(delete_date);
|
||||||
|
#endif
|
||||||
WFIFOSET(fd,14);
|
WFIFOSET(fd,14);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3607,11 +3611,20 @@ void char_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date)
|
|||||||
/// Any (0x718): An unknown error has occurred.
|
/// Any (0x718): An unknown error has occurred.
|
||||||
void char_delete2_accept_ack(int fd, int char_id, uint32 result)
|
void char_delete2_accept_ack(int fd, int char_id, uint32 result)
|
||||||
{// HC: <082a>.W <char id>.L <Msg:0-5>.L
|
{// HC: <082a>.W <char id>.L <Msg:0-5>.L
|
||||||
WFIFOHEAD(fd,10);
|
if(result == 1)
|
||||||
WFIFOW(fd,0) = 0x82a;
|
{
|
||||||
WFIFOL(fd,2) = char_id;
|
struct char_session_data* sd;
|
||||||
WFIFOL(fd,6) = result;
|
sd = (struct char_session_data*)session[fd]->session_data;
|
||||||
WFIFOSET(fd,10);
|
mmo_char_send(fd, sd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WFIFOHEAD(fd,10);
|
||||||
|
WFIFOW(fd,0) = 0x82a;
|
||||||
|
WFIFOL(fd,2) = char_id;
|
||||||
|
WFIFOL(fd,6) = result;
|
||||||
|
WFIFOSET(fd,10);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3755,8 +3768,7 @@ static void char_delete2_accept(int fd, struct char_session_data* sd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// refresh character list cache
|
// refresh character list cache
|
||||||
for(k = i; k < MAX_CHARS-1; k++)
|
for(k = i; k < MAX_CHARS-1; k++) {
|
||||||
{
|
|
||||||
sd->found_char[k] = sd->found_char[k+1];
|
sd->found_char[k] = sd->found_char[k+1];
|
||||||
}
|
}
|
||||||
sd->found_char[MAX_CHARS-1] = -1;
|
sd->found_char[MAX_CHARS-1] = -1;
|
||||||
|
@ -275,6 +275,7 @@ int mapif_parse_itembound_retrieve(int fd)
|
|||||||
SqlStmt_ShowDebug(stmt);
|
SqlStmt_ShowDebug(stmt);
|
||||||
SqlStmt_Free(stmt);
|
SqlStmt_Free(stmt);
|
||||||
StringBuf_Destroy(&buf);
|
StringBuf_Destroy(&buf);
|
||||||
|
mapif_itembound_ack(fd,aid,guild_id);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,10 +298,11 @@ int mapif_parse_itembound_retrieve(int fd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Sql_FreeResult(sql_handle);
|
Sql_FreeResult(sql_handle);
|
||||||
|
|
||||||
if(!i) { //No items found - No need to continue
|
if(!i) { //No items found - No need to continue
|
||||||
StringBuf_Destroy(&buf);
|
StringBuf_Destroy(&buf);
|
||||||
SqlStmt_Free(stmt);
|
SqlStmt_Free(stmt);
|
||||||
|
mapif_itembound_ack(fd,aid,guild_id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,6 +323,7 @@ int mapif_parse_itembound_retrieve(int fd)
|
|||||||
SqlStmt_ShowDebug(stmt);
|
SqlStmt_ShowDebug(stmt);
|
||||||
SqlStmt_Free(stmt);
|
SqlStmt_Free(stmt);
|
||||||
StringBuf_Destroy(&buf);
|
StringBuf_Destroy(&buf);
|
||||||
|
mapif_itembound_ack(fd,aid,guild_id);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,6 +354,7 @@ int mapif_parse_itembound_retrieve(int fd)
|
|||||||
SqlStmt_ShowDebug(stmt);
|
SqlStmt_ShowDebug(stmt);
|
||||||
SqlStmt_Free(stmt);
|
SqlStmt_Free(stmt);
|
||||||
StringBuf_Destroy(&buf);
|
StringBuf_Destroy(&buf);
|
||||||
|
mapif_itembound_ack(fd,aid,guild_id);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user