|
@@ -346,18 +346,21 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){
|
|
|
(p->partner_id != cp->partner_id) || (p->father != cp->father) ||
|
|
|
(p->mother != cp->mother) || (p->child != cp->child) ||
|
|
|
(p->karma != cp->karma) || (p->manner != cp->manner) ||
|
|
|
- (p->fame != cp->fame) || (p->inventory_slots != cp->inventory_slots)
|
|
|
+ (p->fame != cp->fame) || (p->inventory_slots != cp->inventory_slots) ||
|
|
|
+ (p->body_direction != cp->body_direction)
|
|
|
)
|
|
|
{
|
|
|
if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `class`='%d',"
|
|
|
"`hair`='%d', `hair_color`='%d', `clothes_color`='%d', `body`='%d',"
|
|
|
"`partner_id`='%u', `father`='%u', `mother`='%u', `child`='%u',"
|
|
|
- "`karma`='%d',`manner`='%d', `fame`='%d', `inventory_slots`='%hu'"
|
|
|
+ "`karma`='%d',`manner`='%d', `fame`='%d', `inventory_slots`='%hu',"
|
|
|
+ "`body_direction`='%d'"
|
|
|
" WHERE `account_id`='%d' AND `char_id` = '%d'",
|
|
|
schema_config.char_db, p->class_,
|
|
|
p->hair, p->hair_color, p->clothes_color, p->body,
|
|
|
p->partner_id, p->father, p->mother, p->child,
|
|
|
p->karma, p->manner, p->fame, p->inventory_slots,
|
|
|
+ p->body_direction,
|
|
|
p->account_id, p->char_id) )
|
|
|
{
|
|
|
Sql_ShowDebug(sql_handle);
|
|
@@ -936,7 +939,7 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf, uint8* coun
|
|
|
"`robe`,`moves`,`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`title_id`,`show_equip`,"
|
|
|
"`hotkey_rowshift2`,"
|
|
|
"`max_ap`,`ap`,`trait_point`,`pow`,`sta`,`wis`,`spl`,`con`,`crt`,"
|
|
|
- "`inventory_slots`"
|
|
|
+ "`inventory_slots`,`body_direction`"
|
|
|
" FROM `%s` WHERE `account_id`='%d' AND `char_num` < '%d'", schema_config.char_db, sd->account_id, MAX_CHARS)
|
|
|
|| SQL_ERROR == SqlStmt_Execute(stmt)
|
|
|
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_INT, &p.char_id, 0, NULL, NULL)
|
|
@@ -995,6 +998,7 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf, uint8* coun
|
|
|
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 53, SQLDT_SHORT, &p.con, 0, NULL, NULL)
|
|
|
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 54, SQLDT_SHORT, &p.crt, 0, NULL, NULL)
|
|
|
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 55, SQLDT_UINT16, &p.inventory_slots, 0, NULL, NULL)
|
|
|
+ || SQL_ERROR == SqlStmt_BindColumn(stmt, 56, SQLDT_UINT8, &p.body_direction, 0, NULL, NULL)
|
|
|
)
|
|
|
{
|
|
|
SqlStmt_ShowDebug(stmt);
|
|
@@ -1064,7 +1068,7 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev
|
|
|
"`save_map`,`save_x`,`save_y`,`partner_id`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`robe`, `moves`,"
|
|
|
"`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`clan_id`,`title_id`,`show_equip`,`hotkey_rowshift2`,"
|
|
|
"`max_ap`,`ap`,`trait_point`,`pow`,`sta`,`wis`,`spl`,`con`,`crt`,"
|
|
|
- "`inventory_slots`"
|
|
|
+ "`inventory_slots`,`body_direction`"
|
|
|
" FROM `%s` WHERE `char_id`=? LIMIT 1", schema_config.char_db)
|
|
|
|| SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|
|
|
|| SQL_ERROR == SqlStmt_Execute(stmt)
|
|
@@ -1141,6 +1145,7 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev
|
|
|
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 70, SQLDT_SHORT, &p->con, 0, NULL, NULL)
|
|
|
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 71, SQLDT_SHORT, &p->crt, 0, NULL, NULL)
|
|
|
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 72, SQLDT_UINT16, &p->inventory_slots, 0, NULL, NULL)
|
|
|
+ || SQL_ERROR == SqlStmt_BindColumn(stmt, 73, SQLDT_UINT8, &p->body_direction, 0, NULL, NULL)
|
|
|
)
|
|
|
{
|
|
|
SqlStmt_ShowDebug(stmt);
|
|
@@ -2334,7 +2339,7 @@ bool char_checkdb(void){
|
|
|
"`moves`,`unban_time`,`font`,`sex`,`hotkey_rowshift`,`clan_id`,`last_login`,`title_id`,`show_equip`,"
|
|
|
"`hotkey_rowshift2`,"
|
|
|
"`max_ap`,`ap`,`trait_point`,`pow`,`sta`,`wis`,`spl`,`con`,`crt`,"
|
|
|
- "`inventory_slots`"
|
|
|
+ "`inventory_slots`,`body_direction`"
|
|
|
" FROM `%s` LIMIT 1;", schema_config.char_db) ){
|
|
|
Sql_ShowDebug(sql_handle);
|
|
|
return false;
|