Parcourir la source

Minor cleanups
* Follow up to 429e266.

aleos89 il y a 5 ans
Parent
commit
3766c701a8
3 fichiers modifiés avec 11 ajouts et 11 suppressions
  1. 1 1
      src/login/account.cpp
  2. 5 5
      src/map/log.cpp
  3. 5 5
      src/map/map.cpp

+ 1 - 1
src/login/account.cpp

@@ -113,7 +113,7 @@ static bool account_db_check_tables(AccountDB* self) {
 	// Account table
 	if( SQL_ERROR == Sql_Query(db->accounts,
 		"SELECT `account_id`, `userid`, `user_pass`, `sex`, `email`, `group_id`, `state`, `unban_time`, `expiration_time`, "
-		"`logincount`, `lastlogin`, `last_ip`, `birthdate`, `character_slots`, `pincode`, `pincode_change`, `bank_vault`, "
+		"`logincount`, `lastlogin`, `last_ip`, `birthdate`, `character_slots`, `pincode`, `pincode_change`, "
 		"`vip_time`, `old_group` "
 		"FROM `%s`;", db->account_table.c_str()) )
 	{

+ 5 - 5
src/map/log.cpp

@@ -806,7 +806,7 @@ int log_config_read(const char* cfgName)
 				log_config.amount_items_log = atoi(w2);
 //end of common filter settings
 			else if( strcmpi(w1, "log_branch") == 0 )
-				log_config.branch = (bool)config_switch(w2);
+				log_config.branch = config_switch(w2) ? true : false;
 			else if( strcmpi(w1, "log_filter") == 0 )
 				log_config.filter = (e_log_filter)config_switch(w2);
 			else if( strcmpi(w1, "log_zeny") == 0 )
@@ -814,17 +814,17 @@ int log_config_read(const char* cfgName)
 			else if( strcmpi( w1, "log_cash" ) == 0 )
 				log_config.cash = config_switch( w2 ) > 0;
 			else if( strcmpi(w1, "log_commands") == 0 )
-				log_config.commands = config_switch(w2);
+				log_config.commands = config_switch(w2) ? true : false;
 			else if( strcmpi(w1, "log_npc") == 0 )
-				log_config.npc = config_switch(w2);
+				log_config.npc = config_switch(w2) ? true : false;
 			else if( strcmpi(w1, "log_chat") == 0 )
 				log_config.chat = (e_log_chat_type)config_switch(w2);
 			else if( strcmpi(w1, "log_mvpdrop") == 0 )
-				log_config.mvpdrop = config_switch(w2);
+				log_config.mvpdrop = config_switch(w2) ? true : false;
 			else if( strcmpi(w1, "log_feeding") == 0 )
 				log_config.feeding = config_switch(w2);
 			else if( strcmpi(w1, "log_chat_woe_disable") == 0 )
-				log_config.log_chat_woe_disable = (bool)config_switch(w2);
+				log_config.log_chat_woe_disable = config_switch(w2) ? true : false;
 			else if( strcmpi(w1, "log_branch_table") == 0 )
 				log_config.schema.branch_table = w2;
 			else if( strcmpi(w1, "log_pick_table") == 0 )

+ 5 - 5
src/map/map.cpp

@@ -3972,7 +3972,7 @@ static bool map_schema_read_conf(const char *w1, const char *w2) {
 	}\
 
 	if (strcmpi(w1,"use_sql_db")==0) {
-		mapserv_schema_config.db_use_sqldbs = config_switch(w2);
+		mapserv_schema_config.db_use_sqldbs = config_switch(w2) ? true : false;
 		ShowStatus ("Using SQL dbs: %s\n",w2);
 		return true;
 	}
@@ -4094,19 +4094,19 @@ int map_config_read(const char *cfgName)
 		else if(strcmpi(w1,"db_path") == 0)
 			safestrncpy(db_path,w2,ARRAYLENGTH(db_path));
 		else if (strcmpi(w1, "console") == 0) {
-			map_config.console = config_switch(w2);
+			map_config.console = config_switch(w2) ? true : false;
 			if (map_config.console)
 				ShowNotice("Console Commands are enabled.\n");
 		} else if (strcmpi(w1, "enable_spy") == 0)
-			map_config.enable_spy = config_switch(w2);
+			map_config.enable_spy = config_switch(w2) ? true : false;
 		else if (strcmpi(w1, "use_grf") == 0)
-			map_config.enable_grf = config_switch(w2);
+			map_config.enable_grf = config_switch(w2) ? true : false;
 		else if (strcmpi(w1, "console_msg_log") == 0)
 			console_msg_log = atoi(w2);//[Ind]
 		else if (strcmpi(w1, "console_log_filepath") == 0)
 			safestrncpy(console_log_filepath, w2, sizeof(console_log_filepath));
 		else if (strcmpi(w1,"check_tables") == 0)
-			map_config.check_tables = config_switch(w2);
+			map_config.check_tables = config_switch(w2) ? true : false;
 		else if (map_schema_read_conf(w1, w2))
 			continue;
 		else if (strcmpi(w1, "import") == 0)