Ver Fonte

Trimmed trailing whitespaces in /src/char

Lemongrass3110 há 8 anos atrás
pai
commit
366aeeaafe

+ 12 - 12
src/char/char.c

@@ -627,10 +627,10 @@ int char_memitemdata_to_sql(const struct item items[], int max, int id, int tabl
 			&&  items[i].card[3] == item.card[3]
 			) {	//They are the same item.
 				int k;
-				
+
 				ARR_FIND( 0, MAX_SLOTS, j, items[i].card[j] != item.card[j] );
 				ARR_FIND( 0, MAX_ITEM_RDM_OPT, k, items[i].option[k].id != item.option[k].id || items[i].option[k].value != item.option[k].value || items[i].option[k].param != item.option[k].param );
-				
+
 				if( j == MAX_SLOTS &&
 					k == MAX_ITEM_RDM_OPT &&
 				    items[i].amount == item.amount &&
@@ -800,10 +800,10 @@ int char_inventory_to_sql(const struct item items[], int max, int id) {
 			   &&  items[i].card[3] == item.card[3]
 			   ) {	//They are the same item.
 				int k;
-				
+
 				ARR_FIND( 0, MAX_SLOTS, j, items[i].card[j] != item.card[j] );
 				ARR_FIND( 0, MAX_ITEM_RDM_OPT, k, items[i].option[k].id != item.option[k].id || items[i].option[k].value != item.option[k].value || items[i].option[k].param != item.option[k].param );
-				
+
 				if( j == MAX_SLOTS &&
 					k == MAX_ITEM_RDM_OPT &&
 					items[i].amount == item.amount &&
@@ -2195,11 +2195,11 @@ void char_pincode_decrypt( uint32 userSeed, char* pin ){
 	int i;
 	char tab[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
 	char *buf;
-	
+
 	for( i = 1; i < 10; i++ ){
 		int pos;
 		uint32 multiplier = 0x3498, baseSeed = 0x881234;
-		
+
 		userSeed = baseSeed + userSeed * multiplier;
 		pos = userSeed % ( i + 1 );
 		if( i != pos ){
@@ -2319,14 +2319,14 @@ int char_lan_config_read(const char *lancfgName) {
 bool char_checkdb(void){
 	int i;
 	const char* sqltable[] = {
-		schema_config.char_db, schema_config.hotkey_db, schema_config.scdata_db, schema_config.cart_db, 
-                schema_config.inventory_db, schema_config.charlog_db, schema_config.storage_db, 
+		schema_config.char_db, schema_config.hotkey_db, schema_config.scdata_db, schema_config.cart_db,
+                schema_config.inventory_db, schema_config.charlog_db, schema_config.storage_db,
                 schema_config.char_reg_str_table, schema_config.char_reg_num_table, schema_config.acc_reg_str_table,
                 schema_config.acc_reg_num_table, schema_config.skill_db, schema_config.interlog_db, schema_config.memo_db,
-		schema_config.guild_db, schema_config.guild_alliance_db, schema_config.guild_castle_db, 
-                schema_config.guild_expulsion_db, schema_config.guild_member_db, 
+		schema_config.guild_db, schema_config.guild_alliance_db, schema_config.guild_castle_db,
+                schema_config.guild_expulsion_db, schema_config.guild_member_db,
                 schema_config.guild_skill_db, schema_config.guild_position_db, schema_config.guild_storage_db,
-		schema_config.party_db, schema_config.pet_db, schema_config.friend_db, schema_config.mail_db, 
+		schema_config.party_db, schema_config.pet_db, schema_config.friend_db, schema_config.mail_db,
                 schema_config.auction_db, schema_config.quest_db, schema_config.homunculus_db, schema_config.skill_homunculus_db,
                 schema_config.mercenary_db, schema_config.mercenary_owner_db,
 		schema_config.elemental_db, schema_config.ragsrvinfo_db, schema_config.skillcooldown_db, schema_config.bonus_script_db
@@ -2748,7 +2748,7 @@ void char_set_defaults(){
 	charserv_config.char_check_db =1;
 
 	// See const.h to change the default values
-	charserv_config.start_point[0].map = mapindex_name2id(MAP_DEFAULT_NAME); 
+	charserv_config.start_point[0].map = mapindex_name2id(MAP_DEFAULT_NAME);
 	charserv_config.start_point[0].x = MAP_DEFAULT_X;
 	charserv_config.start_point[0].y = MAP_DEFAULT_Y;
 	charserv_config.start_point_count = 1;

+ 5 - 5
src/char/char_clif.c

@@ -243,13 +243,13 @@ int chclif_parse_pincode_change( int fd, struct char_session_data* sd ){
 	else {
 		char oldpin[PINCODE_LENGTH+1];
 		char newpin[PINCODE_LENGTH+1];
-		
+
 		memset(oldpin,0,PINCODE_LENGTH+1);
 		memset(newpin,0,PINCODE_LENGTH+1);
 		strncpy(oldpin, (char*)RFIFOP(fd,6), PINCODE_LENGTH);
 		strncpy(newpin, (char*)RFIFOP(fd,10), PINCODE_LENGTH);
 		RFIFOSKIP(fd,14);
-		
+
 		char_pincode_decrypt(sd->pincode_seed,oldpin);
 		if( !char_pincode_compare( fd, sd, oldpin ) )
 			return 1;
@@ -259,7 +259,7 @@ int chclif_parse_pincode_change( int fd, struct char_session_data* sd ){
 			chlogif_pincode_notifyLoginPinUpdate( sd->account_id, newpin );
 			strncpy(sd->pincode, newpin, sizeof(newpin));
 			ShowInfo("Pincode changed for AID: %d\n", sd->account_id);
-		
+
 			chclif_pincode_sendstate( fd, sd, PINCODE_PASSED );
 		}else{
 			chclif_pincode_sendstate( fd, sd, PINCODE_ILLEGAL );
@@ -289,7 +289,7 @@ int chclif_parse_pincode_setnew( int fd, struct char_session_data* sd ){
 			chlogif_pincode_notifyLoginPinUpdate( sd->account_id, newpin );
 			strncpy( sd->pincode, newpin, strlen( newpin ) );
 
-			chclif_pincode_sendstate( fd, sd, PINCODE_PASSED );	
+			chclif_pincode_sendstate( fd, sd, PINCODE_PASSED );
 		}else{
 			chclif_pincode_sendstate( fd, sd, PINCODE_ILLEGAL );
 		}
@@ -1209,7 +1209,7 @@ void chclif_reject(int fd, uint8 errCode){
 int chclif_parse_reqcaptcha(int fd){
 	//FIFOSD_CHECK(8)
 	RFIFOSKIP(fd,8);
-	chclif_ack_captcha(fd); 
+	chclif_ack_captcha(fd);
 	return 1;
 }
 

+ 1 - 1
src/char/char_logif.c

@@ -100,7 +100,7 @@ static int chlogif_send_acc_tologin_sub(DBKey key, DBData *data, va_list ap) {
  * @param tick : Scheduled tick
  * @param id : GID linked to that timered call
  * @param data : data transmited for delayed function
- * @return 
+ * @return
  */
 int chlogif_send_acc_tologin(int tid, unsigned int tick, int id, intptr_t data) {
 	if ( chlogif_isconnected() ){

+ 3 - 3
src/char/char_mapif.c

@@ -587,7 +587,7 @@ void chmapif_changemapserv_ack(int fd, bool nok){
     WFIFOHEAD(fd,30);
     WFIFOW(fd,0) = 0x2b06;
     memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 28);
-    if(nok) 
+    if(nok)
 	WFIFOL(fd,6) = 0; //Set login1 to 0.(not ok)
     WFIFOSET(fd,30);
 }
@@ -1106,7 +1106,7 @@ int chmapif_parse_reqauth(int fd, int id){
  * @return : 0 not enough data received, 1 success
  */
 int chmapif_parse_updmapip(int fd, int id){
-	if (RFIFOREST(fd) < 6) 
+	if (RFIFOREST(fd) < 6)
 		return 0;
 	map_server[id].ip = ntohl(RFIFOL(fd, 2));
 	ShowInfo("Updated IP address of map-server #%d to %d.%d.%d.%d.\n", id, CONVIP(map_server[id].ip));
@@ -1250,7 +1250,7 @@ int chmapif_parse_reqcharban(int fd){
 			Sql_GetData(sql_handle, 2, &data, NULL); unban_time = atol(data);
 			Sql_FreeResult(sql_handle);
 
-			if(timediff<0 && unban_time==0) 
+			if(timediff<0 && unban_time==0)
 				return 1; //attemp to reduce time of a non banned account ?!?
 			else if(unban_time<now) unban_time=now; //new entry
 			unban_time += timediff; //alterate the time

+ 1 - 1
src/char/int_auction.c

@@ -97,7 +97,7 @@ unsigned int auction_create(struct auction_data *auction)
 	}
 	StringBuf_Printf(&buf, ") VALUES ('%d',?,'%d',?,'%d','%d','%d','%lu','%hu',?,'%d','%d','%d','%"PRIu64"'",
 		auction->seller_id, auction->buyer_id, auction->price, auction->buynow, auction->hours, (unsigned long)auction->timestamp, auction->item.nameid, auction->type, auction->item.refine, auction->item.attribute, auction->item.unique_id);
-	for( j = 0; j < MAX_SLOTS; j++ )	
+	for( j = 0; j < MAX_SLOTS; j++ )
 		StringBuf_Printf(&buf, ",'%hu'", auction->item.card[j]);
 	for (j = 0; j < MAX_ITEM_RDM_OPT; ++j) {
 		StringBuf_Printf(&buf, ", '%d'", auction->item.option[j].id);

+ 3 - 3
src/char/int_guild.c

@@ -1446,12 +1446,12 @@ int mapif_parse_GuildBasicInfoChange(int fd,int guild_id,int type,const char *da
  * Receive a modification request for the guildmember
  * @param fd : map-serv link
  * @param guild_id : Guild to alter
- * @param account_id : Player aid to alter 
+ * @param account_id : Player aid to alter
  * @param char_id : Player cid to alter
  * @param type : Type of modification
  * @param data : Value of modification
  * @param len : Size of value
- * @return 
+ * @return
  */
 int mapif_parse_GuildMemberInfoChange(int fd,int guild_id,uint32 account_id,uint32 char_id,int type,const char *data,int len)
 {
@@ -1666,7 +1666,7 @@ static int mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, uint32
  * @param account_id1
  * @param account_id2
  * @param flag
- * @return 
+ * @return
  */
 int mapif_parse_GuildAlliance(int fd,int guild_id1,int guild_id2,uint32 account_id1,uint32 account_id2,int flag)
 {

+ 1 - 1
src/char/int_party.c

@@ -741,7 +741,7 @@ int mapif_parse_PartyLeaderChange(int fd,int party_id,uint32 account_id,uint32 c
  * Used to update party share level range in run time
  * @param fd : map-serv link
  * @param share_lvl : Max level number of difference to share exp
- * @return 
+ * @return
  */
 int mapif_parse_PartyShareLevel(int fd,unsigned int share_lvl)
 {

+ 1 - 1
src/char/int_party.h

@@ -6,7 +6,7 @@
 
 //Party Flags on what to save/delete.
 enum {
-	PS_CREATE = 0x01, //Create a new party entry (index holds leader's info) 
+	PS_CREATE = 0x01, //Create a new party entry (index holds leader's info)
 	PS_BASIC = 0x02, //Update basic party info.
 	PS_LEADER = 0x04, //Update party's leader
 	PS_ADDMEMBER = 0x08, //Specify new party member (index specifies which party member)

+ 1 - 1
src/char/int_quest.c

@@ -117,7 +117,7 @@ bool mapif_quest_add(uint32 char_id, struct quest qd) {
  * @return false in case of errors, true otherwise
  */
 bool mapif_quest_update(uint32 char_id, struct quest qd) {
-	if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `state`='%d', `count1`='%d', `count2`='%d', `count3`='%d' WHERE `quest_id` = '%d' AND `char_id` = '%d'", schema_config.quest_db, qd.state, qd.count[0], qd.count[1], qd.count[2], qd.quest_id, char_id) ) 
+	if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `state`='%d', `count1`='%d', `count2`='%d', `count3`='%d' WHERE `quest_id` = '%d' AND `char_id` = '%d'", schema_config.quest_db, qd.state, qd.count[0], qd.count[1], qd.count[2], qd.quest_id, char_id) )
 	{
 		Sql_ShowDebug(sql_handle);
 		return false;

+ 2 - 2
src/char/inter.c

@@ -462,7 +462,7 @@ void mapif_accinfo_ack(bool success, int map_fd, int u_fd, int u_aid, int accoun
 	int group_id, int logincount, int state, const char *email, const char *last_ip, const char *lastlogin,
 	const char *birthdate, const char *user_pass, const char *pincode, const char *userid)
 {
-	
+
 	if (map_fd <= 0 || !session_isActive(map_fd))
 		return; // check if we have a valid fd
 
@@ -856,7 +856,7 @@ void inter_final(void)
 	inter_auction_sql_final();
 
 	if(geoip_cache) aFree(geoip_cache);
-	
+
 	return;
 }