Small cleanups
* Corrected the spacing to tabs in a few locations. * Corrected a variable typo.
This commit is contained in:
parent
800714abfe
commit
a8c8cbd498
@ -1095,7 +1095,7 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev
|
|||||||
|
|
||||||
|
|
||||||
if (charserv_config.save_log)
|
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);
|
SqlStmt_Free(stmt);
|
||||||
|
|
||||||
cp = (struct mmo_charstatus *)idb_ensure(char_db_, char_id, char_create_charstatus);
|
cp = (struct mmo_charstatus *)idb_ensure(char_db_, char_id, char_create_charstatus);
|
||||||
|
@ -678,13 +678,14 @@ static void mapif_storage_data_loaded(int fd, uint32 account_id, char type, stru
|
|||||||
* @param fd
|
* @param fd
|
||||||
* @param account_id
|
* @param account_id
|
||||||
* @param char_id
|
* @param char_id
|
||||||
|
* @param success
|
||||||
* @param type
|
* @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);
|
WFIFOHEAD(fd,8);
|
||||||
WFIFOW(fd, 0) = 0x388b;
|
WFIFOW(fd, 0) = 0x388b;
|
||||||
WFIFOL(fd, 2) = account_id;
|
WFIFOL(fd, 2) = account_id;
|
||||||
WFIFOB(fd, 6) = sucess;
|
WFIFOB(fd, 6) = success;
|
||||||
WFIFOB(fd, 7) = type;
|
WFIFOB(fd, 7) = type;
|
||||||
WFIFOSET(fd,8);
|
WFIFOSET(fd,8);
|
||||||
}
|
}
|
||||||
|
@ -299,9 +299,9 @@ int chrif_save(struct map_session_data *sd, int flag) {
|
|||||||
chrif_bsdata_save(sd, (flag && (flag != 3)));
|
chrif_bsdata_save(sd, (flag && (flag != 3)));
|
||||||
|
|
||||||
if (sd->state.storage_flag == 1)
|
if (sd->state.storage_flag == 1)
|
||||||
intif_storage_save(sd,TABLE_STORAGE);
|
intif_storage_save(sd,TABLE_STORAGE);
|
||||||
intif_storage_save(sd,TABLE_INVENTORY);
|
intif_storage_save(sd,TABLE_INVENTORY);
|
||||||
intif_storage_save(sd,TABLE_CART);
|
intif_storage_save(sd,TABLE_CART);
|
||||||
|
|
||||||
//For data sync
|
//For data sync
|
||||||
if (sd->state.storage_flag == 2)
|
if (sd->state.storage_flag == 2)
|
||||||
|
@ -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].bound == item->bound &&
|
||||||
sd->inventory.u.items_inventory[i].expire_time == 0 &&
|
sd->inventory.u.items_inventory[i].expire_time == 0 &&
|
||||||
sd->inventory.u.items_inventory[i].unique_id == item->unique_id &&
|
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 ) )
|
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;
|
return ADDITEM_OVERAMOUNT;
|
||||||
sd->inventory.u.items_inventory[i].amount += amount;
|
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);
|
nullpo_retv(sd);
|
||||||
|
|
||||||
if(sd->cart.u.items_cart[n].nameid == 0 ||
|
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;
|
return;
|
||||||
|
|
||||||
log_pick_pc(sd, log_type, -amount, &sd->cart.u.items_cart[n]);
|
log_pick_pc(sd, log_type, -amount, &sd->cart.u.items_cart[n]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user