فهرست منبع

Small SQLDT cleanup (#8963)

Replaced all SQLDT_SHORT with SQLDT_INT16
Replaced all SQLDT_USHORT with SQLDT_UINT16
Replaced all SQLDT_INT with SQLDT_INT32
Replaced all SQLDT_UINT with SQLDT_UINT32
Dropped the platform dependent SQLDT types SQLDT_SHORT, SQLDT_USHORT, SQLDT_INT and SQLDT_UINT
Lemongrass3110 3 ماه پیش
والد
کامیت
fed910e139

+ 126 - 126
src/char/char.cpp

@@ -593,26 +593,26 @@ int32 char_memitemdata_to_sql(const struct item items[], int32 max, int32 id, en
 		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( 5, SQLDT_CHAR,      &item.refine,      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(10, SQLDT_INT8,      &item.enchantgrade,0, nullptr, nullptr);
 	if (tableswitch == TABLE_INVENTORY){
 		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 )
-		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 ) {
-		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);
 	}
 	// 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 );
 
 	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() )
 	{
 		SqlStmt_ShowDebug(stmt);
@@ -814,26 +814,26 @@ bool char_memitemdata_from_sql(struct s_storage* p, int32 max, int32 id, enum st
 		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( 5, SQLDT_CHAR,         &item.refine,    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( 9, SQLDT_ULONGLONG,    &item.unique_id, 0, nullptr, nullptr);
 	stmt.BindColumn(10, SQLDT_INT8,         &item.enchantgrade, 0, nullptr, nullptr);
 	if (tableswitch == TABLE_INVENTORY){
 		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 )
-		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 ) {
-		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);
  	}
 
@@ -924,61 +924,61 @@ int32 char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf, uint8* co
 		"`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)
 	||	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( 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( 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( 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( 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( 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( 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( 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( 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( 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( 56, SQLDT_UINT8,  &p.body_direction, 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`,"
 		"`inventory_slots`,`body_direction`,`disable_call`,`last_instanceid`"
 		" 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.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(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(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(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(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(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(46, SQLDT_UINT32,    &p->father, 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(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(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(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(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(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(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(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(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(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);
@@ -1141,11 +1141,11 @@ int32 char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_
 	//read memo data
 	//`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)
-	||	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.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);
 
 	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
 	//`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)
-		||	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.BindColumn(0, SQLDT_UINT16, &tmp_skill.id  , 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
 	//`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)
-	||	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.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) )
 		SqlStmt_ShowDebug(stmt);
 
@@ -1195,12 +1195,12 @@ int32 char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_
 	//read hotkeys
 	//`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)
-	||	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.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(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);
 
 	while( SQL_SUCCESS == stmt.NextRow() )

+ 3 - 3
src/char/char_logif.cpp

@@ -489,9 +489,9 @@ int32 chlogif_parse_ackchangesex(int32 fd)
 				SqlStmt_ShowDebug(stmt);
 			}
 
-			stmt.BindColumn(0, SQLDT_INT,   &char_id,  0, nullptr, nullptr);
-			stmt.BindColumn(1, SQLDT_SHORT, &class_,   0, nullptr, nullptr);
-			stmt.BindColumn(2, SQLDT_INT,   &guild_id, 0, nullptr, nullptr);
+			stmt.BindColumn(0, SQLDT_INT32,   &char_id,  0, nullptr, nullptr);
+			stmt.BindColumn(1, SQLDT_INT16, &class_,   0, nullptr, nullptr);
+			stmt.BindColumn(2, SQLDT_INT32,   &guild_id, 0, nullptr, nullptr);
 
 			for (i = 0; i < MAX_CHARS && SQL_SUCCESS == stmt.NextRow(); ++i) {
 				chlogif_parse_change_sex_sub(sex, acc, char_id, class_, guild_id);

+ 1 - 1
src/char/char_mapif.cpp

@@ -1224,7 +1224,7 @@ int32 chmapif_parse_reqcharban(int32 fd){
 					  "UPDATE `%s` SET `unban_time` = ? WHERE `char_id` = ? LIMIT 1",
 					  schema_config.char_db)
 				|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_LONG,   (void*)&unban_time,   sizeof(unban_time))
-				|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT,    (void*)&t_cid,     sizeof(t_cid))
+				|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT32,    (void*)&t_cid,     sizeof(t_cid))
 				|| SQL_SUCCESS != stmt.Execute()
 
 				)

+ 4 - 4
src/char/int_achievement.cpp

@@ -53,11 +53,11 @@ struct achievement *mapif_achievements_fromsql(uint32 char_id, int32 *count)
 		return nullptr;
 	}
 
-	stmt.BindColumn(0, SQLDT_INT,  &tmp_achieve.achievement_id, 0, nullptr, nullptr);
-	stmt.BindColumn(1, SQLDT_INT,  &tmp_achieve.completed, 0, nullptr, nullptr);
-	stmt.BindColumn(2, SQLDT_INT,  &tmp_achieve.rewarded, 0, nullptr, nullptr);
+	stmt.BindColumn(0, SQLDT_INT32,  &tmp_achieve.achievement_id, 0, nullptr, nullptr);
+	stmt.BindColumn(1, SQLDT_INT32,  &tmp_achieve.completed, 0, nullptr, nullptr);
+	stmt.BindColumn(2, SQLDT_INT32,  &tmp_achieve.rewarded, 0, nullptr, nullptr);
 	for (i = 0; i < MAX_ACHIEVEMENT_OBJECTIVES; ++i)
-		stmt.BindColumn(3 + i, SQLDT_INT, &tmp_achieve.count[i], 0, nullptr, nullptr);
+		stmt.BindColumn(3 + i, SQLDT_INT32, &tmp_achieve.count[i], 0, nullptr, nullptr);
 
 	*count = (int32)stmt.NumRows();
 	if (*count > 0) {

+ 3 - 3
src/char/int_homun.cpp

@@ -126,8 +126,8 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
 
 			for (uint16 i = 0; i < MAX_HOMUNSKILL; ++i) {
 				if (hd->hskill[i].id > 0 && hd->hskill[i].lv != 0) {
-					if (SQL_ERROR == stmt.BindParam(0, SQLDT_USHORT, &hd->hskill[i].id, 0)
-						|| SQL_ERROR == stmt.BindParam(1, SQLDT_USHORT, &hd->hskill[i].lv, 0)
+					if (SQL_ERROR == stmt.BindParam(0, SQLDT_UINT16, &hd->hskill[i].id, 0)
+						|| SQL_ERROR == stmt.BindParam(1, SQLDT_UINT16, &hd->hskill[i].lv, 0)
 						|| SQL_ERROR == stmt.Execute()) {
 						SqlStmt_ShowDebug(stmt);
 						return false;
@@ -150,7 +150,7 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
 					continue;
 				}
 
-				if (SQL_ERROR == stmt.BindParam(0, SQLDT_USHORT, &hd->scd[i].skill_id, 0)
+				if (SQL_ERROR == stmt.BindParam(0, SQLDT_UINT16, &hd->scd[i].skill_id, 0)
 					|| SQL_ERROR == stmt.BindParam(1, SQLDT_LONGLONG, &hd->scd[i].tick, 0)
 					|| SQL_ERROR == stmt.Execute()) {
 					SqlStmt_ShowDebug(stmt);

+ 1 - 1
src/char/int_mercenary.cpp

@@ -108,7 +108,7 @@ bool mapif_mercenary_save(struct s_mercenary* merc)
 			continue;
 		}
 
-		if (SQL_ERROR == stmt.BindParam(0, SQLDT_USHORT, &merc->scd[i].skill_id, 0)
+		if (SQL_ERROR == stmt.BindParam(0, SQLDT_UINT16, &merc->scd[i].skill_id, 0)
 			|| SQL_ERROR == stmt.BindParam(1, SQLDT_LONGLONG, &merc->scd[i].tick, 0)
 			|| SQL_ERROR == stmt.Execute()) {
 			SqlStmt_ShowDebug(stmt);

+ 7 - 7
src/char/int_quest.cpp

@@ -31,14 +31,14 @@ struct quest *mapif_quests_fromsql( uint32 char_id, size_t& count ){
 	memset(&tmp_quest, 0, sizeof(struct quest));
 
 	if( SQL_ERROR == stmt.Prepare("SELECT `quest_id`, `state`, `time`, `count1`, `count2`, `count3` FROM `%s` WHERE `char_id`=? ", schema_config.quest_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.BindColumn(0, SQLDT_INT,  &tmp_quest.quest_id, 0, nullptr, nullptr)
-	||	SQL_ERROR == stmt.BindColumn(1, SQLDT_INT,  &tmp_quest.state,    0, nullptr, nullptr)
-	||	SQL_ERROR == stmt.BindColumn(2, SQLDT_UINT, &tmp_quest.time,     0, nullptr, nullptr)
-	||	SQL_ERROR == stmt.BindColumn(3, SQLDT_INT,  &tmp_quest.count[0], 0, nullptr, nullptr)
-	||	SQL_ERROR == stmt.BindColumn(4, SQLDT_INT,  &tmp_quest.count[1], 0, nullptr, nullptr)
-	||	SQL_ERROR == stmt.BindColumn(5, SQLDT_INT,  &tmp_quest.count[2], 0, nullptr, nullptr)
+	||	SQL_ERROR == stmt.BindColumn(0, SQLDT_INT32,  &tmp_quest.quest_id, 0, nullptr, nullptr)
+	||	SQL_ERROR == stmt.BindColumn(1, SQLDT_INT32,  &tmp_quest.state,    0, nullptr, nullptr)
+	||	SQL_ERROR == stmt.BindColumn(2, SQLDT_UINT32, &tmp_quest.time,     0, nullptr, nullptr)
+	||	SQL_ERROR == stmt.BindColumn(3, SQLDT_INT32,  &tmp_quest.count[0], 0, nullptr, nullptr)
+	||	SQL_ERROR == stmt.BindColumn(4, SQLDT_INT32,  &tmp_quest.count[1], 0, nullptr, nullptr)
+	||	SQL_ERROR == stmt.BindColumn(5, SQLDT_INT32,  &tmp_quest.count[2], 0, nullptr, nullptr)
 	) {
 		SqlStmt_ShowDebug(stmt);
 		count = 0;

+ 8 - 8
src/char/int_storage.cpp

@@ -351,22 +351,22 @@ bool mapif_parse_itembound_retrieve(int32 fd)
 		return true;
 	}
 
-	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(5, SQLDT_CHAR,      &item.refine,       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(9, SQLDT_ULONGLONG, &item.unique_id,    0, nullptr, nullptr);
 	stmt.BindColumn(10, SQLDT_INT8,     &item.enchantgrade, 0, nullptr, nullptr);
 	for( j = 0; j < MAX_SLOTS; ++j )
-		stmt.BindColumn(11+j, SQLDT_UINT, &item.card[j], 0, nullptr, nullptr);
+		stmt.BindColumn(11+j, SQLDT_UINT32, &item.card[j], 0, nullptr, nullptr);
 	for( j = 0; j < MAX_ITEM_RDM_OPT; ++j ) {
-		stmt.BindColumn(11+MAX_SLOTS+j*3, SQLDT_SHORT, &item.option[j].id, 0, nullptr, nullptr);
-		stmt.BindColumn(12+MAX_SLOTS+j*3, SQLDT_SHORT, &item.option[j].value, 0, nullptr, nullptr);
+		stmt.BindColumn(11+MAX_SLOTS+j*3, SQLDT_INT16, &item.option[j].id, 0, nullptr, nullptr);
+		stmt.BindColumn(12+MAX_SLOTS+j*3, SQLDT_INT16, &item.option[j].value, 0, nullptr, nullptr);
 		stmt.BindColumn(13+MAX_SLOTS+j*3, SQLDT_CHAR, &item.option[j].param, 0, nullptr, nullptr);
 	}
 	memset(&items, 0, sizeof(items));

+ 0 - 14
src/common/sql.cpp

@@ -516,20 +516,6 @@ static int32 Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_typ
 		bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(char));
 		buffer_len = sizeof(char);
 		break;
-	case SQLDT_USHORT:
-		bind->is_unsigned = 1;
-		[[fallthrough]];
-	case SQLDT_SHORT:
-		bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(short));
-		buffer_len = sizeof(short);
-		break;
-	case SQLDT_UINT:
-		bind->is_unsigned = 1;
-		[[fallthrough]];
-	case SQLDT_INT:
-		bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(int32));
-		buffer_len = sizeof(int32);
-		break;
 	case SQLDT_ULONG:
 		bind->is_unsigned = 1;
 		[[fallthrough]];

+ 0 - 4
src/common/sql.hpp

@@ -42,13 +42,9 @@ enum SqlDataType
 	SQLDT_UINT64,
 	// platform dependent size
 	SQLDT_CHAR,
-	SQLDT_SHORT,
-	SQLDT_INT,
 	SQLDT_LONG,
 	SQLDT_LONGLONG,
 	SQLDT_UCHAR,
-	SQLDT_USHORT,
-	SQLDT_UINT,
 	SQLDT_ULONG,
 	SQLDT_ULONGLONG,
 	// floating point

+ 10 - 10
src/login/account.cpp

@@ -571,16 +571,16 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
 			"INSERT INTO `%s` (`account_id`, `userid`, `user_pass`, `sex`, `email`, `group_id`, `state`, `unban_time`, `expiration_time`, `logincount`, `lastlogin`, `last_ip`, `birthdate`, `character_slots`, `pincode`, `pincode_change`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
 #endif
 			db->account_db)
-		||  SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT,       (void*)&acc->account_id,      sizeof(acc->account_id))
+		||  SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT32,       (void*)&acc->account_id,      sizeof(acc->account_id))
 		||  SQL_SUCCESS != stmt.BindParam( 1, SQLDT_STRING,    (void*)acc->userid,           strlen(acc->userid))
 		||  SQL_SUCCESS != stmt.BindParam( 2, SQLDT_STRING,    (void*)acc->pass,             strlen(acc->pass))
 		||  SQL_SUCCESS != stmt.BindParam( 3, SQLDT_ENUM,      (void*)&acc->sex,             sizeof(acc->sex))
 		||  SQL_SUCCESS != stmt.BindParam( 4, SQLDT_STRING,    (void*)&acc->email,           strlen(acc->email))
-		||  SQL_SUCCESS != stmt.BindParam( 5, SQLDT_INT,       (void*)&acc->group_id,        sizeof(acc->group_id))
-		||  SQL_SUCCESS != stmt.BindParam( 6, SQLDT_UINT,      (void*)&acc->state,           sizeof(acc->state))
+		||  SQL_SUCCESS != stmt.BindParam( 5, SQLDT_INT32,       (void*)&acc->group_id,        sizeof(acc->group_id))
+		||  SQL_SUCCESS != stmt.BindParam( 6, SQLDT_UINT32,      (void*)&acc->state,           sizeof(acc->state))
 		||  SQL_SUCCESS != stmt.BindParam( 7, SQLDT_LONG,      (void*)&acc->unban_time,      sizeof(acc->unban_time))
-		||  SQL_SUCCESS != stmt.BindParam( 8, SQLDT_INT,       (void*)&acc->expiration_time, sizeof(acc->expiration_time))
-		||  SQL_SUCCESS != stmt.BindParam( 9, SQLDT_UINT,      (void*)&acc->logincount,      sizeof(acc->logincount))
+		||  SQL_SUCCESS != stmt.BindParam( 8, SQLDT_INT32,       (void*)&acc->expiration_time, sizeof(acc->expiration_time))
+		||  SQL_SUCCESS != stmt.BindParam( 9, SQLDT_UINT32,      (void*)&acc->logincount,      sizeof(acc->logincount))
 		||  SQL_SUCCESS != stmt.BindParam(10, acc->lastlogin[0]?SQLDT_STRING:SQLDT_NULL,    (void*)&acc->lastlogin,       strlen(acc->lastlogin))
 		||  SQL_SUCCESS != stmt.BindParam(11, SQLDT_STRING,    (void*)&acc->last_ip,         strlen(acc->last_ip))
 		||  SQL_SUCCESS != stmt.BindParam(12, acc->birthdate[0]?SQLDT_STRING:SQLDT_NULL,    (void*)&acc->birthdate,       strlen(acc->birthdate))
@@ -589,7 +589,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
 		||  SQL_SUCCESS != stmt.BindParam(15, SQLDT_LONG,      (void*)&acc->pincode_change,  sizeof(acc->pincode_change))
 #ifdef VIP_ENABLE
 		||  SQL_SUCCESS != stmt.BindParam(16, SQLDT_LONG,       (void*)&acc->vip_time,         sizeof(acc->vip_time))
-		||  SQL_SUCCESS != stmt.BindParam(17, SQLDT_INT,        (void*)&acc->old_group,        sizeof(acc->old_group))
+		||  SQL_SUCCESS != stmt.BindParam(17, SQLDT_INT32,        (void*)&acc->old_group,        sizeof(acc->old_group))
 #endif
 		||  SQL_SUCCESS != stmt.Execute()
 		) {
@@ -610,11 +610,11 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
 		||  SQL_SUCCESS != stmt.BindParam( 1, SQLDT_STRING,    (void*)acc->pass,             strlen(acc->pass))
 		||  SQL_SUCCESS != stmt.BindParam( 2, SQLDT_ENUM,      (void*)&acc->sex,             sizeof(acc->sex))
 		||  SQL_SUCCESS != stmt.BindParam( 3, SQLDT_STRING,    (void*)acc->email,            strlen(acc->email))
-		||  SQL_SUCCESS != stmt.BindParam( 4, SQLDT_INT,       (void*)&acc->group_id,        sizeof(acc->group_id))
-		||  SQL_SUCCESS != stmt.BindParam( 5, SQLDT_UINT,      (void*)&acc->state,           sizeof(acc->state))
+		||  SQL_SUCCESS != stmt.BindParam( 4, SQLDT_INT32,       (void*)&acc->group_id,        sizeof(acc->group_id))
+		||  SQL_SUCCESS != stmt.BindParam( 5, SQLDT_UINT32,      (void*)&acc->state,           sizeof(acc->state))
 		||  SQL_SUCCESS != stmt.BindParam( 6, SQLDT_LONG,      (void*)&acc->unban_time,      sizeof(acc->unban_time))
 		||  SQL_SUCCESS != stmt.BindParam( 7, SQLDT_LONG,      (void*)&acc->expiration_time, sizeof(acc->expiration_time))
-		||  SQL_SUCCESS != stmt.BindParam( 8, SQLDT_UINT,      (void*)&acc->logincount,      sizeof(acc->logincount))
+		||  SQL_SUCCESS != stmt.BindParam( 8, SQLDT_UINT32,      (void*)&acc->logincount,      sizeof(acc->logincount))
 		||  SQL_SUCCESS != stmt.BindParam( 9, acc->lastlogin[0]?SQLDT_STRING:SQLDT_NULL,    (void*)&acc->lastlogin,       strlen(acc->lastlogin))
 		||  SQL_SUCCESS != stmt.BindParam(10, SQLDT_STRING,    (void*)&acc->last_ip,         strlen(acc->last_ip))
 		||  SQL_SUCCESS != stmt.BindParam(11, acc->birthdate[0]?SQLDT_STRING:SQLDT_NULL,    (void*)&acc->birthdate,       strlen(acc->birthdate))
@@ -623,7 +623,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
 		||  SQL_SUCCESS != stmt.BindParam(14, SQLDT_LONG,      (void*)&acc->pincode_change,  sizeof(acc->pincode_change))
 #ifdef VIP_ENABLE
 		||  SQL_SUCCESS != stmt.BindParam(15, SQLDT_LONG,      (void*)&acc->vip_time,        sizeof(acc->vip_time))
-		||  SQL_SUCCESS != stmt.BindParam(16, SQLDT_INT,       (void*)&acc->old_group,       sizeof(acc->old_group))
+		||  SQL_SUCCESS != stmt.BindParam(16, SQLDT_INT32,       (void*)&acc->old_group,       sizeof(acc->old_group))
 #endif
 		||  SQL_SUCCESS != stmt.Execute()
 		) {

+ 8 - 8
src/map/storage.cpp

@@ -668,25 +668,25 @@ enum e_guild_storage_log storage_guild_log_read_sub( map_session_data* sd, std::
 	struct guild_log_entry entry;
 
 	// General data
-	stmt.BindColumn(0, SQLDT_UINT,      &entry.id,               0, nullptr, nullptr);
+	stmt.BindColumn(0, SQLDT_UINT32,      &entry.id,               0, nullptr, nullptr);
 	stmt.BindColumn(1, SQLDT_STRING,    &entry.time, sizeof(entry.time), nullptr, nullptr);
 	stmt.BindColumn(2, SQLDT_STRING,    &entry.name, sizeof(entry.name), nullptr, nullptr);
-	stmt.BindColumn(3, SQLDT_SHORT,     &entry.amount,           0, nullptr, nullptr);
+	stmt.BindColumn(3, SQLDT_INT16,     &entry.amount,           0, nullptr, nullptr);
 
 	// Item data
-	stmt.BindColumn(4, SQLDT_UINT,      &entry.item.nameid,      0, nullptr, nullptr);
+	stmt.BindColumn(4, SQLDT_UINT32,      &entry.item.nameid,      0, nullptr, nullptr);
 	stmt.BindColumn(5, SQLDT_CHAR,      &entry.item.identify,    0, nullptr, nullptr);
 	stmt.BindColumn(6, SQLDT_CHAR,      &entry.item.refine,      0, nullptr, nullptr);
 	stmt.BindColumn(7, SQLDT_CHAR,      &entry.item.attribute,   0, nullptr, nullptr);
-	stmt.BindColumn(8, SQLDT_UINT,      &entry.item.expire_time, 0, nullptr, nullptr);
-	stmt.BindColumn(9, SQLDT_UINT,      &entry.item.bound,       0, nullptr, nullptr);
+	stmt.BindColumn(8, SQLDT_UINT32,      &entry.item.expire_time, 0, nullptr, nullptr);
+	stmt.BindColumn(9, SQLDT_UINT32,      &entry.item.bound,       0, nullptr, nullptr);
 	stmt.BindColumn(10, SQLDT_UINT64,   &entry.item.unique_id,   0, nullptr, nullptr);
 	stmt.BindColumn(11, SQLDT_INT8,     &entry.item.enchantgrade,0, nullptr, nullptr);
 	for( j = 0; j < MAX_SLOTS; ++j )
-		stmt.BindColumn(12+j, SQLDT_UINT, &entry.item.card[j], 0, nullptr, nullptr);
+		stmt.BindColumn(12+j, SQLDT_UINT32, &entry.item.card[j], 0, nullptr, nullptr);
 	for( j = 0; j < MAX_ITEM_RDM_OPT; ++j ) {
-		stmt.BindColumn(12+MAX_SLOTS+j*3, SQLDT_SHORT, &entry.item.option[j].id, 0, nullptr, nullptr);
-		stmt.BindColumn(12+MAX_SLOTS+j*3+1, SQLDT_SHORT, &entry.item.option[j].value, 0, nullptr, nullptr);
+		stmt.BindColumn(12+MAX_SLOTS+j*3, SQLDT_INT16, &entry.item.option[j].id, 0, nullptr, nullptr);
+		stmt.BindColumn(12+MAX_SLOTS+j*3+1, SQLDT_INT16, &entry.item.option[j].value, 0, nullptr, nullptr);
 		stmt.BindColumn(12+MAX_SLOTS+j*3+2, SQLDT_CHAR, &entry.item.option[j].param, 0, nullptr, nullptr);
 	}
 

+ 3 - 3
src/web/auth.cpp

@@ -35,7 +35,7 @@ bool isAuthorized(const Request &request, bool checkGuildLeader) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `account_id` FROM `%s` WHERE (`account_id` = ? AND `web_auth_token` = ? AND `web_auth_token_enabled` = '1')",
 			login_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
 		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_STRING, (void *)token, strlen(token))
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
@@ -66,8 +66,8 @@ bool isAuthorized(const Request &request, bool checkGuildLeader) {
 	if (SQL_SUCCESS != stmt2.Prepare(
 		"SELECT `account_id` FROM `%s` LEFT JOIN `%s` using (`char_id`) WHERE (`%s`.`account_id` = ? AND `%s`.`guild_id` = ?) LIMIT 1",
 		guild_db_table, char_db_table, char_db_table, guild_db_table)
-		|| SQL_SUCCESS != stmt2.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
-		|| SQL_SUCCESS != stmt2.BindParam(1, SQLDT_INT, &guild_id, sizeof(guild_id))
+		|| SQL_SUCCESS != stmt2.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt2.BindParam(1, SQLDT_INT32, &guild_id, sizeof(guild_id))
 		|| SQL_SUCCESS != stmt2.Execute()
 	) {
 		SqlStmt_ShowDebug(stmt2);

+ 8 - 8
src/web/charconfig_controller.cpp

@@ -38,8 +38,8 @@ HANDLER_FUNC(charconfig_save) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `data` FROM `%s` WHERE (`account_id` = ? AND `char_id` = ? AND `world_name` = ?) LIMIT 1",
 			char_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT, &account_id, sizeof(account_id))
-		|| SQL_SUCCESS != stmt.BindParam( 1, SQLDT_INT, &char_id, sizeof(char_id))
+		|| SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT32, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam( 1, SQLDT_INT32, &char_id, sizeof(char_id))
 		|| SQL_SUCCESS != stmt.BindParam( 2, SQLDT_STRING, (void *)world_name.c_str(), world_name.length())
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
@@ -72,8 +72,8 @@ HANDLER_FUNC(charconfig_save) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"REPLACE INTO `%s` (`account_id`, `char_id`, `world_name`, `data`) VALUES (?, ?, ?, ?)",
 			char_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT, &account_id, sizeof(account_id))
-		|| SQL_SUCCESS != stmt.BindParam( 1, SQLDT_INT, &char_id, sizeof(char_id))
+		|| SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT32, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam( 1, SQLDT_INT32, &char_id, sizeof(char_id))
 		|| SQL_SUCCESS != stmt.BindParam( 2, SQLDT_STRING, (void *)world_name.c_str(), world_name.length())
 		|| SQL_SUCCESS != stmt.BindParam( 3, SQLDT_STRING, (void *)data_str.c_str(), data_str.length())
 		|| SQL_SUCCESS != stmt.Execute()
@@ -115,8 +115,8 @@ HANDLER_FUNC(charconfig_load) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `data` FROM `%s` WHERE (`account_id` = ? AND `char_id` = ? AND `world_name` = ?) LIMIT 1",
 			char_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
-		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT, &char_id, sizeof(char_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT32, &char_id, sizeof(char_id))
 		|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_STRING, (void *)world_name, strlen(world_name))
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
@@ -131,8 +131,8 @@ HANDLER_FUNC(charconfig_load) {
 		std::string data = "{\"Type\": 1}";
 
 		if( SQL_SUCCESS != stmt.Prepare( "INSERT INTO `%s` (`account_id`, `char_id`, `world_name`, `data`) VALUES (?, ?, ?, ?)", char_configs_table ) ||
-			SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT, &account_id, sizeof( account_id ) ) ||
-			SQL_SUCCESS != stmt.BindParam( 1, SQLDT_INT, &char_id, sizeof( char_id ) ) ||
+			SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT32, &account_id, sizeof( account_id ) ) ||
+			SQL_SUCCESS != stmt.BindParam( 1, SQLDT_INT32, &char_id, sizeof( char_id ) ) ||
 			SQL_SUCCESS != stmt.BindParam( 2, SQLDT_STRING, (void*)world_name, strlen( world_name ) ) ||
 			SQL_SUCCESS != stmt.BindParam( 3, SQLDT_STRING, (void*)data.c_str(), strlen( data.c_str() ) ) ||
 			SQL_SUCCESS != stmt.Execute() ){

+ 3 - 3
src/web/emblem_controller.cpp

@@ -52,7 +52,7 @@ HANDLER_FUNC(emblem_download) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `version`, `file_type`, `file_data` FROM `%s` WHERE (`guild_id` = ? AND `world_name` = ?)",
 			guild_emblems_table)
-		|| SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT, &guild_id, sizeof(guild_id))
+		|| SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT32, &guild_id, sizeof(guild_id))
 		|| SQL_SUCCESS != stmt.BindParam( 1, SQLDT_STRING, (void *)world_name, strlen(world_name))
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
@@ -227,7 +227,7 @@ HANDLER_FUNC(emblem_upload) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `version` FROM `%s` WHERE (`guild_id` = ? AND `world_name` = ?)",
 			guild_emblems_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &guild_id, sizeof(guild_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &guild_id, sizeof(guild_id))
 		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_STRING, (void *)world_name, strlen(world_name))
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
@@ -259,7 +259,7 @@ HANDLER_FUNC(emblem_upload) {
 		guild_emblems_table)
 		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_UINT32, &version, sizeof(version))
 		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_STRING, (void *)imgtype, strlen(imgtype))
-		|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_INT, &guild_id, sizeof(guild_id))
+		|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_INT32, &guild_id, sizeof(guild_id))
 		|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_STRING, (void *)world_name, strlen(world_name))
 		|| SQL_SUCCESS != stmt.BindParam(4, SQLDT_BLOB, (void *)img.c_str(), length)
 		|| SQL_SUCCESS != stmt.Execute()

+ 12 - 12
src/web/merchantstore_controller.cpp

@@ -40,10 +40,10 @@ HANDLER_FUNC(merchantstore_save) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `account_id` FROM `%s` WHERE (`account_id` = ? AND `char_id` = ? AND `world_name` = ? AND `store_type` = ?) LIMIT 1",
 			merchant_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
-		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT, &char_id, sizeof(char_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT32, &char_id, sizeof(char_id))
 		|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_STRING, (void *)world_name, strlen(world_name))
-		|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_INT, &store_type, sizeof(store_type))
+		|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_INT32, &store_type, sizeof(store_type))
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
 		SqlStmt_ShowDebug(stmt);
@@ -57,10 +57,10 @@ HANDLER_FUNC(merchantstore_save) {
 		if (SQL_SUCCESS != stmt.Prepare(
 				"INSERT INTO `%s` (`account_id`, `char_id`, `world_name`, `store_type`, `data`) VALUES (?, ?, ?, ?, ?)",
 				merchant_configs_table)
-			|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
-			|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT, &char_id, sizeof(char_id))
+			|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
+			|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT32, &char_id, sizeof(char_id))
 			|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_STRING, (void *)world_name, strlen(world_name))
-			|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_INT, &store_type, sizeof(store_type))
+			|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_INT32, &store_type, sizeof(store_type))
 			|| SQL_SUCCESS != stmt.BindParam(4, SQLDT_STRING, (void *)data.c_str(), strlen(data.c_str()))
 			|| SQL_SUCCESS != stmt.Execute()
 		) {
@@ -76,10 +76,10 @@ HANDLER_FUNC(merchantstore_save) {
 				"UPDATE `%s` SET `data` = ? WHERE (`account_id` = ? AND `char_id` = ? AND `world_name` = ? AND `store_type` = ?)",
 				merchant_configs_table)
 			|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_STRING, (void *)data.c_str(), strlen(data.c_str()))
-			|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT, &account_id, sizeof(account_id))
-			|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_INT, &char_id, sizeof(char_id))
+			|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT32, &account_id, sizeof(account_id))
+			|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_INT32, &char_id, sizeof(char_id))
 			|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_STRING, (void *)world_name, strlen(world_name))
-			|| SQL_SUCCESS != stmt.BindParam(4, SQLDT_INT, &store_type, sizeof(store_type))
+			|| SQL_SUCCESS != stmt.BindParam(4, SQLDT_INT32, &store_type, sizeof(store_type))
 			|| SQL_SUCCESS != stmt.Execute()
 		) {
 			SqlStmt_ShowDebug(stmt);
@@ -121,10 +121,10 @@ HANDLER_FUNC(merchantstore_load) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `data` FROM `%s` WHERE (`account_id` = ? AND `char_id` = ? AND `world_name` = ? AND `store_type` = ?) LIMIT 1",
 			merchant_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
-		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT, &char_id, sizeof(char_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_INT32, &char_id, sizeof(char_id))
 		|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_STRING, (void *)world_name, strlen(world_name))
-		|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_INT, &store_type, sizeof(store_type))
+		|| SQL_SUCCESS != stmt.BindParam(3, SQLDT_INT32, &store_type, sizeof(store_type))
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
 		SqlStmt_ShowDebug(stmt);

+ 4 - 4
src/web/userconfig_controller.cpp

@@ -37,7 +37,7 @@ HANDLER_FUNC(userconfig_save) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `data` FROM `%s` WHERE (`account_id` = ? AND `world_name` = ?) LIMIT 1",
 			user_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
 		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_STRING, (void *)world_name.c_str(), world_name.length())
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
@@ -71,7 +71,7 @@ HANDLER_FUNC(userconfig_save) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"REPLACE INTO `%s` (`account_id`, `world_name`, `data`) VALUES (?, ?, ?)",
 			user_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
 		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_STRING, (void *)world_name.c_str(), world_name.length())
 		|| SQL_SUCCESS != stmt.BindParam(2, SQLDT_STRING, (void *)data_str.c_str(), data_str.length())
 		|| SQL_SUCCESS != stmt.Execute()
@@ -112,7 +112,7 @@ HANDLER_FUNC(userconfig_load) {
 	if (SQL_SUCCESS != stmt.Prepare(
 			"SELECT `data` FROM `%s` WHERE (`account_id` = ? AND `world_name` = ?) LIMIT 1",
 			user_configs_table)
-		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT, &account_id, sizeof(account_id))
+		|| SQL_SUCCESS != stmt.BindParam(0, SQLDT_INT32, &account_id, sizeof(account_id))
 		|| SQL_SUCCESS != stmt.BindParam(1, SQLDT_STRING, (void *)world_name, strlen(world_name))
 		|| SQL_SUCCESS != stmt.Execute()
 	) {
@@ -127,7 +127,7 @@ HANDLER_FUNC(userconfig_load) {
 		std::string data = "{\"Type\": 1}";
 
 		if( SQL_SUCCESS != stmt.Prepare( "INSERT INTO `%s` (`account_id`, `world_name`, `data`) VALUES (?, ?, ?)", user_configs_table ) ||
-			SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT, &account_id, sizeof( account_id ) ) ||
+			SQL_SUCCESS != stmt.BindParam( 0, SQLDT_INT32, &account_id, sizeof( account_id ) ) ||
 			SQL_SUCCESS != stmt.BindParam( 1, SQLDT_STRING, (void *)world_name, strlen( world_name ) ) ||
 			SQL_SUCCESS != stmt.BindParam( 2, SQLDT_STRING, (void *)data.c_str(), strlen( data.c_str() ) ) ||
 			SQL_SUCCESS != stmt.Execute() ){