|
@@ -593,26 +593,26 @@ int32 char_memitemdata_to_sql(const struct item items[], int32 max, int32 id, en
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
- stmt.BindColumn( 0, SQLDT_INT, &item.id, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn( 1, SQLDT_UINT, &item.nameid, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn( 2, SQLDT_SHORT, &item.amount, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn( 3, SQLDT_UINT, &item.equip, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn( 0, SQLDT_INT32, &item.id, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn( 1, SQLDT_UINT32, &item.nameid, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn( 2, SQLDT_INT16, &item.amount, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn( 3, SQLDT_UINT32, &item.equip, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 4, SQLDT_CHAR, &item.identify, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 4, SQLDT_CHAR, &item.identify, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 5, SQLDT_CHAR, &item.refine, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 5, SQLDT_CHAR, &item.refine, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 6, SQLDT_CHAR, &item.attribute, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 6, SQLDT_CHAR, &item.attribute, 0, nullptr, nullptr);
|
|
- stmt.BindColumn( 7, SQLDT_UINT, &item.expire_time, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn( 8, SQLDT_UINT, &item.bound, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn( 7, SQLDT_UINT32, &item.expire_time, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn( 8, SQLDT_UINT32, &item.bound, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 9, SQLDT_UINT64, &item.unique_id, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 9, SQLDT_UINT64, &item.unique_id, 0, nullptr, nullptr);
|
|
stmt.BindColumn(10, SQLDT_INT8, &item.enchantgrade,0, nullptr, nullptr);
|
|
stmt.BindColumn(10, SQLDT_INT8, &item.enchantgrade,0, nullptr, nullptr);
|
|
if (tableswitch == TABLE_INVENTORY){
|
|
if (tableswitch == TABLE_INVENTORY){
|
|
stmt.BindColumn(11, SQLDT_CHAR, &item.favorite, 0, nullptr, nullptr);
|
|
stmt.BindColumn(11, SQLDT_CHAR, &item.favorite, 0, nullptr, nullptr);
|
|
- stmt.BindColumn(12, SQLDT_UINT, &item.equipSwitch, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn(12, SQLDT_UINT32, &item.equipSwitch, 0, nullptr, nullptr);
|
|
}
|
|
}
|
|
for( i = 0; i < MAX_SLOTS; ++i )
|
|
for( i = 0; i < MAX_SLOTS; ++i )
|
|
- stmt.BindColumn(11+offset+i, SQLDT_UINT, &item.card[i], 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn(11+offset+i, SQLDT_UINT32, &item.card[i], 0, nullptr, nullptr);
|
|
for( i = 0; i < MAX_ITEM_RDM_OPT; ++i ) {
|
|
for( i = 0; i < MAX_ITEM_RDM_OPT; ++i ) {
|
|
- stmt.BindColumn(11+offset+MAX_SLOTS+i*3, SQLDT_SHORT, &item.option[i].id, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn(12+offset+MAX_SLOTS+i*3, SQLDT_SHORT, &item.option[i].value, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn(11+offset+MAX_SLOTS+i*3, SQLDT_INT16, &item.option[i].id, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn(12+offset+MAX_SLOTS+i*3, SQLDT_INT16, &item.option[i].value, 0, nullptr, nullptr);
|
|
stmt.BindColumn(13+offset+MAX_SLOTS+i*3, SQLDT_CHAR, &item.option[i].param, 0, nullptr, nullptr);
|
|
stmt.BindColumn(13+offset+MAX_SLOTS+i*3, SQLDT_CHAR, &item.option[i].param, 0, nullptr, nullptr);
|
|
}
|
|
}
|
|
// bit array indicating which inventory items have already been matched
|
|
// bit array indicating which inventory items have already been matched
|
|
@@ -806,7 +806,7 @@ bool char_memitemdata_from_sql(struct s_storage* p, int32 max, int32 id, enum st
|
|
StringBuf_Printf(&buf, " FROM `%s` WHERE `%s`=? ORDER BY `nameid`", tablename, selectoption );
|
|
StringBuf_Printf(&buf, " FROM `%s` WHERE `%s`=? ORDER BY `nameid`", tablename, selectoption );
|
|
|
|
|
|
if( SQL_ERROR == stmt.PrepareStr(StringBuf_Value(&buf))
|
|
if( SQL_ERROR == stmt.PrepareStr(StringBuf_Value(&buf))
|
|
- || SQL_ERROR == stmt.BindParam(0, SQLDT_INT, &id, 0)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindParam(0, SQLDT_INT32, &id, 0)
|
|
|| SQL_ERROR == stmt.Execute() )
|
|
|| SQL_ERROR == stmt.Execute() )
|
|
{
|
|
{
|
|
SqlStmt_ShowDebug(stmt);
|
|
SqlStmt_ShowDebug(stmt);
|
|
@@ -814,26 +814,26 @@ bool char_memitemdata_from_sql(struct s_storage* p, int32 max, int32 id, enum st
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- stmt.BindColumn( 0, SQLDT_INT, &item.id, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn( 1, SQLDT_UINT, &item.nameid, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn( 2, SQLDT_SHORT, &item.amount, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn( 3, SQLDT_UINT, &item.equip, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn( 0, SQLDT_INT32, &item.id, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn( 1, SQLDT_UINT32, &item.nameid, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn( 2, SQLDT_INT16, &item.amount, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn( 3, SQLDT_UINT32, &item.equip, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 4, SQLDT_CHAR, &item.identify, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 4, SQLDT_CHAR, &item.identify, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 5, SQLDT_CHAR, &item.refine, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 5, SQLDT_CHAR, &item.refine, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 6, SQLDT_CHAR, &item.attribute, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 6, SQLDT_CHAR, &item.attribute, 0, nullptr, nullptr);
|
|
- stmt.BindColumn( 7, SQLDT_UINT, &item.expire_time, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn( 7, SQLDT_UINT32, &item.expire_time, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 8, SQLDT_CHAR, &item.bound, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 8, SQLDT_CHAR, &item.bound, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 9, SQLDT_ULONGLONG, &item.unique_id, 0, nullptr, nullptr);
|
|
stmt.BindColumn( 9, SQLDT_ULONGLONG, &item.unique_id, 0, nullptr, nullptr);
|
|
stmt.BindColumn(10, SQLDT_INT8, &item.enchantgrade, 0, nullptr, nullptr);
|
|
stmt.BindColumn(10, SQLDT_INT8, &item.enchantgrade, 0, nullptr, nullptr);
|
|
if (tableswitch == TABLE_INVENTORY){
|
|
if (tableswitch == TABLE_INVENTORY){
|
|
stmt.BindColumn(11, SQLDT_CHAR, &item.favorite, 0, nullptr, nullptr);
|
|
stmt.BindColumn(11, SQLDT_CHAR, &item.favorite, 0, nullptr, nullptr);
|
|
- stmt.BindColumn(12, SQLDT_UINT, &item.equipSwitch, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn(12, SQLDT_UINT32, &item.equipSwitch, 0, nullptr, nullptr);
|
|
}
|
|
}
|
|
for( i = 0; i < MAX_SLOTS; ++i )
|
|
for( i = 0; i < MAX_SLOTS; ++i )
|
|
- stmt.BindColumn(11+offset+i, SQLDT_UINT, &item.card[i], 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn(11+offset+i, SQLDT_UINT32, &item.card[i], 0, nullptr, nullptr);
|
|
for( i = 0; i < MAX_ITEM_RDM_OPT; ++i ) {
|
|
for( i = 0; i < MAX_ITEM_RDM_OPT; ++i ) {
|
|
- stmt.BindColumn(11+offset+MAX_SLOTS+i*3, SQLDT_SHORT, &item.option[i].id, 0, nullptr, nullptr);
|
|
|
|
- stmt.BindColumn(12+offset+MAX_SLOTS+i*3, SQLDT_SHORT, &item.option[i].value, 0, nullptr, nullptr);
|
|
|
|
|
|
+ stmt.BindColumn(11+offset+MAX_SLOTS+i*3, SQLDT_INT16, &item.option[i].id, 0, nullptr, nullptr);
|
|
|
|
+ stmt.BindColumn(12+offset+MAX_SLOTS+i*3, SQLDT_INT16, &item.option[i].value, 0, nullptr, nullptr);
|
|
stmt.BindColumn(13+offset+MAX_SLOTS+i*3, SQLDT_CHAR, &item.option[i].param, 0, nullptr, nullptr);
|
|
stmt.BindColumn(13+offset+MAX_SLOTS+i*3, SQLDT_CHAR, &item.option[i].param, 0, nullptr, nullptr);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -924,61 +924,61 @@ int32 char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf, uint8* co
|
|
"`inventory_slots`,`body_direction`,`disable_call`"
|
|
"`inventory_slots`,`body_direction`,`disable_call`"
|
|
" FROM `%s` WHERE `account_id`='%d' AND `char_num` < '%d'", schema_config.char_db, sd->account_id, MAX_CHARS)
|
|
" FROM `%s` WHERE `account_id`='%d' AND `char_num` < '%d'", schema_config.char_db, sd->account_id, MAX_CHARS)
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.Execute()
|
|
- || SQL_ERROR == stmt.BindColumn( 0, SQLDT_INT, &p.char_id, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 0, SQLDT_INT32, &p.char_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 1, SQLDT_UCHAR, &p.slot, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 1, SQLDT_UCHAR, &p.slot, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 2, SQLDT_STRING, &p.name, sizeof(p.name), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 2, SQLDT_STRING, &p.name, sizeof(p.name), nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn( 3, SQLDT_SHORT, &p.class_, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 4, SQLDT_UINT, &p.base_level, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 5, SQLDT_UINT, &p.job_level, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 3, SQLDT_INT16, &p.class_, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 4, SQLDT_UINT32, &p.base_level, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 5, SQLDT_UINT32, &p.job_level, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 6, SQLDT_UINT64, &p.base_exp, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 6, SQLDT_UINT64, &p.base_exp, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 7, SQLDT_UINT64, &p.job_exp, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 7, SQLDT_UINT64, &p.job_exp, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn( 8, SQLDT_INT, &p.zeny, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 9, SQLDT_SHORT, &p.str, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 10, SQLDT_SHORT, &p.agi, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 11, SQLDT_SHORT, &p.vit, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 12, SQLDT_SHORT, &p.int_, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 13, SQLDT_SHORT, &p.dex, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 14, SQLDT_SHORT, &p.luk, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 15, SQLDT_UINT, &p.max_hp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 16, SQLDT_UINT, &p.hp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 17, SQLDT_UINT, &p.max_sp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 18, SQLDT_UINT, &p.sp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 19, SQLDT_UINT, &p.status_point, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 20, SQLDT_UINT, &p.skill_point, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 21, SQLDT_UINT, &p.option, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 8, SQLDT_INT32, &p.zeny, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 9, SQLDT_INT16, &p.str, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 10, SQLDT_INT16, &p.agi, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 11, SQLDT_INT16, &p.vit, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 12, SQLDT_INT16, &p.int_, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 13, SQLDT_INT16, &p.dex, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 14, SQLDT_INT16, &p.luk, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 15, SQLDT_UINT32, &p.max_hp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 16, SQLDT_UINT32, &p.hp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 17, SQLDT_UINT32, &p.max_sp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 18, SQLDT_UINT32, &p.sp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 19, SQLDT_UINT32, &p.status_point, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 20, SQLDT_UINT32, &p.skill_point, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 21, SQLDT_UINT32, &p.option, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 22, SQLDT_UCHAR, &p.karma, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 22, SQLDT_UCHAR, &p.karma, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn( 23, SQLDT_SHORT, &p.manner, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 24, SQLDT_SHORT, &p.hair, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 25, SQLDT_SHORT, &p.hair_color, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 26, SQLDT_SHORT, &p.clothes_color, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 27, SQLDT_SHORT, &p.body, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 28, SQLDT_SHORT, &p.weapon, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 29, SQLDT_SHORT, &p.shield, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 30, SQLDT_SHORT, &p.head_top, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 31, SQLDT_SHORT, &p.head_mid, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 32, SQLDT_SHORT, &p.head_bottom, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 23, SQLDT_INT16, &p.manner, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 24, SQLDT_INT16, &p.hair, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 25, SQLDT_INT16, &p.hair_color, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 26, SQLDT_INT16, &p.clothes_color, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 27, SQLDT_INT16, &p.body, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 28, SQLDT_INT16, &p.weapon, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 29, SQLDT_INT16, &p.shield, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 30, SQLDT_INT16, &p.head_top, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 31, SQLDT_INT16, &p.head_mid, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 32, SQLDT_INT16, &p.head_bottom, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 33, SQLDT_STRING, &p.last_point.map, sizeof(p.last_point.map), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 33, SQLDT_STRING, &p.last_point.map, sizeof(p.last_point.map), nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn( 34, SQLDT_SHORT, &p.rename, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 34, SQLDT_INT16, &p.rename, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 35, SQLDT_UINT32, &p.delete_date, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 35, SQLDT_UINT32, &p.delete_date, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn( 36, SQLDT_SHORT, &p.robe, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 37, SQLDT_UINT, &p.character_moves, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 36, SQLDT_INT16, &p.robe, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 37, SQLDT_UINT32, &p.character_moves, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 38, SQLDT_LONG, &p.unban_time, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 38, SQLDT_LONG, &p.unban_time, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 39, SQLDT_UCHAR, &p.font, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 39, SQLDT_UCHAR, &p.font, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn( 40, SQLDT_UINT, &p.uniqueitem_counter, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 40, SQLDT_UINT32, &p.uniqueitem_counter, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 41, SQLDT_ENUM, &sex, sizeof(sex), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 41, SQLDT_ENUM, &sex, sizeof(sex), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 42, SQLDT_UCHAR, &p.hotkey_rowshift, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 42, SQLDT_UCHAR, &p.hotkey_rowshift, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 43, SQLDT_ULONG, &p.title_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 43, SQLDT_ULONG, &p.title_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 44, SQLDT_UINT16, &p.show_equip, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 44, SQLDT_UINT16, &p.show_equip, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 45, SQLDT_UCHAR, &p.hotkey_rowshift2, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 45, SQLDT_UCHAR, &p.hotkey_rowshift2, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn( 46, SQLDT_UINT, &p.max_ap, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 47, SQLDT_UINT, &p.ap, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 48, SQLDT_UINT, &p.trait_point, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 49, SQLDT_SHORT, &p.pow, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 50, SQLDT_SHORT, &p.sta, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 51, SQLDT_SHORT, &p.wis, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 52, SQLDT_SHORT, &p.spl, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 53, SQLDT_SHORT, &p.con, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn( 54, SQLDT_SHORT, &p.crt, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 46, SQLDT_UINT32, &p.max_ap, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 47, SQLDT_UINT32, &p.ap, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 48, SQLDT_UINT32, &p.trait_point, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 49, SQLDT_INT16, &p.pow, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 50, SQLDT_INT16, &p.sta, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 51, SQLDT_INT16, &p.wis, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 52, SQLDT_INT16, &p.spl, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 53, SQLDT_INT16, &p.con, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn( 54, SQLDT_INT16, &p.crt, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 55, SQLDT_UINT16, &p.inventory_slots, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 55, SQLDT_UINT16, &p.inventory_slots, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 56, SQLDT_UINT8, &p.body_direction, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 56, SQLDT_UINT8, &p.body_direction, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 57, SQLDT_UINT16, &p.disable_call, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn( 57, SQLDT_UINT16, &p.disable_call, 0, nullptr, nullptr)
|
|
@@ -1039,84 +1039,84 @@ int32 char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_
|
|
"`max_ap`,`ap`,`trait_point`,`pow`,`sta`,`wis`,`spl`,`con`,`crt`,"
|
|
"`max_ap`,`ap`,`trait_point`,`pow`,`sta`,`wis`,`spl`,`con`,`crt`,"
|
|
"`inventory_slots`,`body_direction`,`disable_call`,`last_instanceid`"
|
|
"`inventory_slots`,`body_direction`,`disable_call`,`last_instanceid`"
|
|
" FROM `%s` WHERE `char_id`=? LIMIT 1", schema_config.char_db)
|
|
" FROM `%s` WHERE `char_id`=? LIMIT 1", schema_config.char_db)
|
|
- || SQL_ERROR == stmt.BindParam(0, SQLDT_INT, &char_id, 0)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindParam(0, SQLDT_INT32, &char_id, 0)
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.Execute()
|
|
- || SQL_ERROR == stmt.BindColumn(0, SQLDT_INT, &p->char_id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(1, SQLDT_INT, &p->account_id, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(0, SQLDT_INT32, &p->char_id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(1, SQLDT_INT32, &p->account_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(2, SQLDT_UCHAR, &p->slot, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(2, SQLDT_UCHAR, &p->slot, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(3, SQLDT_STRING, &p->name, sizeof(p->name), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(3, SQLDT_STRING, &p->name, sizeof(p->name), nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(4, SQLDT_SHORT, &p->class_, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(5, SQLDT_UINT, &p->base_level, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(6, SQLDT_UINT, &p->job_level, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(4, SQLDT_INT16, &p->class_, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(5, SQLDT_UINT32, &p->base_level, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(6, SQLDT_UINT32, &p->job_level, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(7, SQLDT_UINT64, &p->base_exp, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(7, SQLDT_UINT64, &p->base_exp, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(8, SQLDT_UINT64, &p->job_exp, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(8, SQLDT_UINT64, &p->job_exp, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(9, SQLDT_INT, &p->zeny, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(10, SQLDT_SHORT, &p->str, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(11, SQLDT_SHORT, &p->agi, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(12, SQLDT_SHORT, &p->vit, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(13, SQLDT_SHORT, &p->int_, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(14, SQLDT_SHORT, &p->dex, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(15, SQLDT_SHORT, &p->luk, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(16, SQLDT_UINT, &p->max_hp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(17, SQLDT_UINT, &p->hp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(18, SQLDT_UINT, &p->max_sp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(19, SQLDT_UINT, &p->sp, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(20, SQLDT_UINT, &p->status_point, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(21, SQLDT_UINT, &p->skill_point, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(22, SQLDT_UINT, &p->option, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(9, SQLDT_INT32, &p->zeny, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(10, SQLDT_INT16, &p->str, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(11, SQLDT_INT16, &p->agi, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(12, SQLDT_INT16, &p->vit, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(13, SQLDT_INT16, &p->int_, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(14, SQLDT_INT16, &p->dex, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(15, SQLDT_INT16, &p->luk, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(16, SQLDT_UINT32, &p->max_hp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(17, SQLDT_UINT32, &p->hp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(18, SQLDT_UINT32, &p->max_sp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(19, SQLDT_UINT32, &p->sp, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(20, SQLDT_UINT32, &p->status_point, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(21, SQLDT_UINT32, &p->skill_point, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(22, SQLDT_UINT32, &p->option, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(23, SQLDT_UCHAR, &p->karma, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(23, SQLDT_UCHAR, &p->karma, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(24, SQLDT_SHORT, &p->manner, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(25, SQLDT_INT, &p->party_id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(26, SQLDT_INT, &p->guild_id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(27, SQLDT_INT, &p->pet_id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(28, SQLDT_INT, &p->hom_id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(29, SQLDT_INT, &p->ele_id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(30, SQLDT_SHORT, &p->hair, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(31, SQLDT_SHORT, &p->hair_color, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(32, SQLDT_SHORT, &p->clothes_color, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(33, SQLDT_SHORT, &p->body, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(34, SQLDT_SHORT, &p->weapon, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(35, SQLDT_SHORT, &p->shield, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(36, SQLDT_SHORT, &p->head_top, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(37, SQLDT_SHORT, &p->head_mid, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(38, SQLDT_SHORT, &p->head_bottom, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(24, SQLDT_INT16, &p->manner, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(25, SQLDT_INT32, &p->party_id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(26, SQLDT_INT32, &p->guild_id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(27, SQLDT_INT32, &p->pet_id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(28, SQLDT_INT32, &p->hom_id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(29, SQLDT_INT32, &p->ele_id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(30, SQLDT_INT16, &p->hair, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(31, SQLDT_INT16, &p->hair_color, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(32, SQLDT_INT16, &p->clothes_color, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(33, SQLDT_INT16, &p->body, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(34, SQLDT_INT16, &p->weapon, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(35, SQLDT_INT16, &p->shield, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(36, SQLDT_INT16, &p->head_top, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(37, SQLDT_INT16, &p->head_mid, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(38, SQLDT_INT16, &p->head_bottom, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(39, SQLDT_STRING, &p->last_point.map, sizeof(p->last_point.map), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(39, SQLDT_STRING, &p->last_point.map, sizeof(p->last_point.map), nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(40, SQLDT_SHORT, &p->last_point.x, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(41, SQLDT_SHORT, &p->last_point.y, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(40, SQLDT_INT16, &p->last_point.x, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(41, SQLDT_INT16, &p->last_point.y, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(42, SQLDT_STRING, &p->save_point.map, sizeof(p->save_point.map), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(42, SQLDT_STRING, &p->save_point.map, sizeof(p->save_point.map), nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(43, SQLDT_SHORT, &p->save_point.x, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(44, SQLDT_SHORT, &p->save_point.y, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(43, SQLDT_INT16, &p->save_point.x, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(44, SQLDT_INT16, &p->save_point.y, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(45, SQLDT_UINT32, &p->partner_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(45, SQLDT_UINT32, &p->partner_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(46, SQLDT_UINT32, &p->father, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(46, SQLDT_UINT32, &p->father, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(47, SQLDT_UINT32, &p->mother, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(47, SQLDT_UINT32, &p->mother, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(48, SQLDT_UINT32, &p->child, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(48, SQLDT_UINT32, &p->child, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(49, SQLDT_INT, &p->fame, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(50, SQLDT_SHORT, &p->rename, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(49, SQLDT_INT32, &p->fame, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(50, SQLDT_INT16, &p->rename, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(51, SQLDT_UINT32, &p->delete_date, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(51, SQLDT_UINT32, &p->delete_date, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(52, SQLDT_SHORT, &p->robe, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(52, SQLDT_INT16, &p->robe, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(53, SQLDT_UINT32, &p->character_moves, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(53, SQLDT_UINT32, &p->character_moves, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(54, SQLDT_LONG, &p->unban_time, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(54, SQLDT_LONG, &p->unban_time, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(55, SQLDT_UCHAR, &p->font, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(55, SQLDT_UCHAR, &p->font, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(56, SQLDT_UINT, &p->uniqueitem_counter, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(56, SQLDT_UINT32, &p->uniqueitem_counter, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(57, SQLDT_ENUM, &sex, sizeof(sex), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(57, SQLDT_ENUM, &sex, sizeof(sex), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(58, SQLDT_UCHAR, &p->hotkey_rowshift, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(58, SQLDT_UCHAR, &p->hotkey_rowshift, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(59, SQLDT_INT, &p->clan_id, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(59, SQLDT_INT32, &p->clan_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(60, SQLDT_ULONG, &p->title_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(60, SQLDT_ULONG, &p->title_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(61, SQLDT_UINT16, &p->show_equip, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(61, SQLDT_UINT16, &p->show_equip, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(62, SQLDT_UCHAR, &p->hotkey_rowshift2, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(62, SQLDT_UCHAR, &p->hotkey_rowshift2, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(63, SQLDT_UINT, &p->max_ap, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(64, SQLDT_UINT, &p->ap, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(65, SQLDT_UINT, &p->trait_point, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(66, SQLDT_SHORT, &p->pow, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(67, SQLDT_SHORT, &p->sta, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(68, SQLDT_SHORT, &p->wis, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(69, SQLDT_SHORT, &p->spl, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(70, SQLDT_SHORT, &p->con, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(71, SQLDT_SHORT, &p->crt, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(63, SQLDT_UINT32, &p->max_ap, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(64, SQLDT_UINT32, &p->ap, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(65, SQLDT_UINT32, &p->trait_point, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(66, SQLDT_INT16, &p->pow, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(67, SQLDT_INT16, &p->sta, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(68, SQLDT_INT16, &p->wis, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(69, SQLDT_INT16, &p->spl, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(70, SQLDT_INT16, &p->con, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(71, SQLDT_INT16, &p->crt, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(72, SQLDT_UINT16, &p->inventory_slots, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(72, SQLDT_UINT16, &p->inventory_slots, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(73, SQLDT_UINT8, &p->body_direction, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(73, SQLDT_UINT8, &p->body_direction, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(74, SQLDT_UINT8, &p->disable_call, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(74, SQLDT_UINT8, &p->disable_call, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(75, SQLDT_INT, &p->last_point_instanceid, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(75, SQLDT_INT32, &p->last_point_instanceid, 0, nullptr, nullptr)
|
|
)
|
|
)
|
|
{
|
|
{
|
|
SqlStmt_ShowDebug(stmt);
|
|
SqlStmt_ShowDebug(stmt);
|
|
@@ -1141,11 +1141,11 @@ int32 char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_
|
|
//read memo data
|
|
//read memo data
|
|
//`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
|
|
//`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
|
|
if( SQL_ERROR == stmt.Prepare("SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`=? ORDER by `memo_id` LIMIT %d", schema_config.memo_db, MAX_MEMOPOINTS)
|
|
if( SQL_ERROR == stmt.Prepare("SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`=? ORDER by `memo_id` LIMIT %d", schema_config.memo_db, MAX_MEMOPOINTS)
|
|
- || SQL_ERROR == stmt.BindParam(0, SQLDT_INT, &char_id, 0)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindParam(0, SQLDT_INT32, &char_id, 0)
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.BindColumn(0, SQLDT_STRING, &tmp_point.map, sizeof(tmp_point.map), nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(0, SQLDT_STRING, &tmp_point.map, sizeof(tmp_point.map), nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(1, SQLDT_SHORT, &tmp_point.x, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(2, SQLDT_SHORT, &tmp_point.y, 0, nullptr, nullptr) )
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(1, SQLDT_INT16, &tmp_point.x, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(2, SQLDT_INT16, &tmp_point.y, 0, nullptr, nullptr) )
|
|
SqlStmt_ShowDebug(stmt);
|
|
SqlStmt_ShowDebug(stmt);
|
|
|
|
|
|
for( i = 0; i < MAX_MEMOPOINTS && SQL_SUCCESS == stmt.NextRow(); ++i )
|
|
for( i = 0; i < MAX_MEMOPOINTS && SQL_SUCCESS == stmt.NextRow(); ++i )
|
|
@@ -1157,7 +1157,7 @@ int32 char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_
|
|
//read skill
|
|
//read skill
|
|
//`skill` (`char_id`, `id`, `lv`)
|
|
//`skill` (`char_id`, `id`, `lv`)
|
|
if( SQL_ERROR == stmt.Prepare("SELECT `id`, `lv`,`flag` FROM `%s` WHERE `char_id`=? LIMIT %d", schema_config.skill_db, MAX_SKILL)
|
|
if( SQL_ERROR == stmt.Prepare("SELECT `id`, `lv`,`flag` FROM `%s` WHERE `char_id`=? LIMIT %d", schema_config.skill_db, MAX_SKILL)
|
|
- || SQL_ERROR == stmt.BindParam(0, SQLDT_INT, &char_id, 0)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindParam(0, SQLDT_INT32, &char_id, 0)
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.BindColumn(0, SQLDT_UINT16, &tmp_skill.id , 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(0, SQLDT_UINT16, &tmp_skill.id , 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(1, SQLDT_UINT8 , &tmp_skill.lv , 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(1, SQLDT_UINT8 , &tmp_skill.lv , 0, nullptr, nullptr)
|
|
@@ -1180,10 +1180,10 @@ int32 char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_
|
|
//read friends
|
|
//read friends
|
|
//`friends` (`char_id`, `friend_id`)
|
|
//`friends` (`char_id`, `friend_id`)
|
|
if( SQL_ERROR == stmt.Prepare("SELECT c.`account_id`, c.`char_id`, c.`name` FROM `%s` c LEFT JOIN `%s` f ON f.`friend_id` = c.`char_id` WHERE f.`char_id`=? LIMIT %d", schema_config.char_db, schema_config.friend_db, MAX_FRIENDS)
|
|
if( SQL_ERROR == stmt.Prepare("SELECT c.`account_id`, c.`char_id`, c.`name` FROM `%s` c LEFT JOIN `%s` f ON f.`friend_id` = c.`char_id` WHERE f.`char_id`=? LIMIT %d", schema_config.char_db, schema_config.friend_db, MAX_FRIENDS)
|
|
- || SQL_ERROR == stmt.BindParam(0, SQLDT_INT, &char_id, 0)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindParam(0, SQLDT_INT32, &char_id, 0)
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.Execute()
|
|
- || SQL_ERROR == stmt.BindColumn(0, SQLDT_INT, &tmp_friend.account_id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(1, SQLDT_INT, &tmp_friend.char_id, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(0, SQLDT_INT32, &tmp_friend.account_id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(1, SQLDT_INT32, &tmp_friend.char_id, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(2, SQLDT_STRING, &tmp_friend.name, sizeof(tmp_friend.name), nullptr, nullptr) )
|
|
|| SQL_ERROR == stmt.BindColumn(2, SQLDT_STRING, &tmp_friend.name, sizeof(tmp_friend.name), nullptr, nullptr) )
|
|
SqlStmt_ShowDebug(stmt);
|
|
SqlStmt_ShowDebug(stmt);
|
|
|
|
|
|
@@ -1195,12 +1195,12 @@ int32 char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_
|
|
//read hotkeys
|
|
//read hotkeys
|
|
//`hotkey` (`char_id`, `hotkey`, `type`, `itemskill_id`, `skill_lvl`
|
|
//`hotkey` (`char_id`, `hotkey`, `type`, `itemskill_id`, `skill_lvl`
|
|
if( SQL_ERROR == stmt.Prepare("SELECT `hotkey`, `type`, `itemskill_id`, `skill_lvl` FROM `%s` WHERE `char_id`=?", schema_config.hotkey_db)
|
|
if( SQL_ERROR == stmt.Prepare("SELECT `hotkey`, `type`, `itemskill_id`, `skill_lvl` FROM `%s` WHERE `char_id`=?", schema_config.hotkey_db)
|
|
- || SQL_ERROR == stmt.BindParam(0, SQLDT_INT, &char_id, 0)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindParam(0, SQLDT_INT32, &char_id, 0)
|
|
|| SQL_ERROR == stmt.Execute()
|
|
|| SQL_ERROR == stmt.Execute()
|
|
- || SQL_ERROR == stmt.BindColumn(0, SQLDT_INT, &hotkey_num, 0, nullptr, nullptr)
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(0, SQLDT_INT32, &hotkey_num, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(1, SQLDT_UCHAR, &tmp_hotkey.type, 0, nullptr, nullptr)
|
|
|| SQL_ERROR == stmt.BindColumn(1, SQLDT_UCHAR, &tmp_hotkey.type, 0, nullptr, nullptr)
|
|
- || SQL_ERROR == stmt.BindColumn(2, SQLDT_UINT, &tmp_hotkey.id, 0, nullptr, nullptr)
|
|
|
|
- || SQL_ERROR == stmt.BindColumn(3, SQLDT_USHORT, &tmp_hotkey.lv, 0, nullptr, nullptr) )
|
|
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(2, SQLDT_UINT32, &tmp_hotkey.id, 0, nullptr, nullptr)
|
|
|
|
+ || SQL_ERROR == stmt.BindColumn(3, SQLDT_UINT16, &tmp_hotkey.lv, 0, nullptr, nullptr) )
|
|
SqlStmt_ShowDebug(stmt);
|
|
SqlStmt_ShowDebug(stmt);
|
|
|
|
|
|
while( SQL_SUCCESS == stmt.NextRow() )
|
|
while( SQL_SUCCESS == stmt.NextRow() )
|