浏览代码

Small cleanups
* Corrected the spacing to tabs in a few locations.
* Corrected a variable typo.

aleos89 8 年之前
父节点
当前提交
a8c8cbd498
共有 4 个文件被更改,包括 9 次插入8 次删除
  1. 1 1
      src/char/char.c
  2. 3 2
      src/char/int_storage.c
  3. 3 3
      src/map/chrif.c
  4. 2 2
      src/map/pc.c

+ 1 - 1
src/char/char.c

@@ -1095,7 +1095,7 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev
 
 
 	if (charserv_config.save_log)
-        ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, StringBuf_Value(&msg_buf)); //ok. all data load successfully!
+		ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, StringBuf_Value(&msg_buf)); //ok. all data load successfully!
 	SqlStmt_Free(stmt);
 
 	cp = (struct mmo_charstatus *)idb_ensure(char_db_, char_id, char_create_charstatus);

+ 3 - 2
src/char/int_storage.c

@@ -678,13 +678,14 @@ static void mapif_storage_data_loaded(int fd, uint32 account_id, char type, stru
  * @param fd
  * @param account_id
  * @param char_id
+ * @param success
  * @param type
  */
-void mapif_storage_saved(int fd, uint32 account_id, uint32 char_id, bool sucess, char type) {
+void mapif_storage_saved(int fd, uint32 account_id, uint32 char_id, bool success, char type) {
 	WFIFOHEAD(fd,8);
 	WFIFOW(fd, 0) = 0x388b;
 	WFIFOL(fd, 2) = account_id;
-	WFIFOB(fd, 6) = sucess;
+	WFIFOB(fd, 6) = success;
 	WFIFOB(fd, 7) = type;
 	WFIFOSET(fd,8);
 }

+ 3 - 3
src/map/chrif.c

@@ -299,9 +299,9 @@ int chrif_save(struct map_session_data *sd, int flag) {
 	chrif_bsdata_save(sd, (flag && (flag != 3)));
 
 	if (sd->state.storage_flag == 1)
-        intif_storage_save(sd,TABLE_STORAGE);
-    intif_storage_save(sd,TABLE_INVENTORY);
-    intif_storage_save(sd,TABLE_CART);
+		intif_storage_save(sd,TABLE_STORAGE);
+	intif_storage_save(sd,TABLE_INVENTORY);
+	intif_storage_save(sd,TABLE_CART);
 
 	//For data sync
 	if (sd->state.storage_flag == 2)

+ 2 - 2
src/map/pc.c

@@ -4486,7 +4486,7 @@ char pc_additem(struct map_session_data *sd,struct item *item,int amount,e_log_p
 				sd->inventory.u.items_inventory[i].bound == item->bound &&
 				sd->inventory.u.items_inventory[i].expire_time == 0 &&
 				sd->inventory.u.items_inventory[i].unique_id == item->unique_id &&
-			    memcmp(&sd->inventory.u.items_inventory[i].card, &item->card, sizeof(item->card)) == 0 ) {
+				memcmp(&sd->inventory.u.items_inventory[i].card, &item->card, sizeof(item->card)) == 0 ) {
 				if( amount > MAX_AMOUNT - sd->inventory.u.items_inventory[i].amount || ( id->stack.inventory && amount > id->stack.amount - sd->inventory.u.items_inventory[i].amount ) )
 					return ADDITEM_OVERAMOUNT;
 				sd->inventory.u.items_inventory[i].amount += amount;
@@ -5070,7 +5070,7 @@ void pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type,e_log
 	nullpo_retv(sd);
 
 	if(sd->cart.u.items_cart[n].nameid == 0 ||
-	   sd->cart.u.items_cart[n].amount < amount)
+		sd->cart.u.items_cart[n].amount < amount)
 		return;
 
 	log_pick_pc(sd, log_type, -amount, &sd->cart.u.items_cart[n]);