diff options
author | GmOcean <hyperassassin@gmail.com> | 2014-11-23 23:16:52 -1000 |
---|---|---|
committer | GmOcean <hyperassassin@gmail.com> | 2014-11-23 23:16:52 -1000 |
commit | eca655c1e581a7a25f58e9e1d96d1da7c84ea64f (patch) | |
tree | a5dd1562a3eb7778ab7dcd2ae94b1b5824b90aa2 /src | |
parent | 467327c8169d0c952cec53535f9f2189d85baa53 (diff) | |
download | hercules-eca655c1e581a7a25f58e9e1d96d1da7c84ea64f.tar.gz hercules-eca655c1e581a7a25f58e9e1d96d1da7c84ea64f.tar.bz2 hercules-eca655c1e581a7a25f58e9e1d96d1da7c84ea64f.tar.xz hercules-eca655c1e581a7a25f58e9e1d96d1da7c84ea64f.zip |
Fixed whitespace
Diffstat (limited to 'src')
-rw-r--r-- | src/map/script.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/map/script.c b/src/map/script.c index 37236d223..a4fcb118d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -12433,35 +12433,35 @@ BUILDIN(getinventorylist){ int i,j=0,k,l; if(!sd) return true; - for(i=0;i<MAX_INVENTORY;i++) { - if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0) { - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_id"), j),sd->status.inventory[i].nameid); - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_amount"), j),sd->status.inventory[i].amount); - if(sd->status.inventory[i].equip) { - for (k = 0; k < ARRAYLENGTH(script->equip); k++) { - id = pc->checkequip(sd,script->equip[k]); - item = sd->inventory_data[id]; - if( item != 0 ){ - if(item->nameid == sd->status.inventory[i].nameid) { - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_equip"), j),k+1); - } + for(i=0;i<MAX_INVENTORY;i++) { + if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0) { + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_id"), j),sd->status.inventory[i].nameid); + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_amount"), j),sd->status.inventory[i].amount); + if(sd->status.inventory[i].equip) { + for (k = 0; k < ARRAYLENGTH(script->equip); k++) { + id = pc->checkequip(sd,script->equip[k]); + item = sd->inventory_data[id]; + if( item != 0 ){ + if(item->nameid == sd->status.inventory[i].nameid) { + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_equip"), j),k+1); } } - } else { - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_equip"), j),0); - } - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_refine"), j),sd->status.inventory[i].refine); - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_identify"), j),sd->status.inventory[i].identify); - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_attribute"), j),sd->status.inventory[i].attribute); - for (l = 0; l < MAX_SLOTS; l++) { - sprintf(card_var, "@inventorylist_card%d",l+1); - pc->setreg(sd,reference_uid(script->add_str(card_var), j),sd->status.inventory[i].card[l]); } - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time); - pc->setreg(sd,reference_uid(script->add_str("@inventorylist_bound"), j),sd->status.inventory[i].bound); - j++; + } else { + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_equip"), j),0); + } + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_refine"), j),sd->status.inventory[i].refine); + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_identify"), j),sd->status.inventory[i].identify); + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_attribute"), j),sd->status.inventory[i].attribute); + for (l = 0; l < MAX_SLOTS; l++) { + sprintf(card_var, "@inventorylist_card%d",l+1); + pc->setreg(sd,reference_uid(script->add_str(card_var), j),sd->status.inventory[i].card[l]); } + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time); + pc->setreg(sd,reference_uid(script->add_str("@inventorylist_bound"), j),sd->status.inventory[i].bound); + j++; } + } pc->setreg(sd,script->add_str("@inventorylist_count"),j); return true; } @@ -12473,23 +12473,23 @@ BUILDIN(getcartinventorylist){ int i,j=0,k; if(!sd) return true; - for(i=0;i<MAX_CART;i++) { - if(sd->status.cart[i].nameid > 0 && sd->status.cart[i].amount > 0) { - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_id"), j),sd->status.cart[i].nameid); - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_amount"), j),sd->status.cart[i].amount); - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_equip"), j),sd->status.cart[i].equip); - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_refine"), j),sd->status.cart[i].refine); - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_identify"), j),sd->status.cart[i].identify); - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_attribute"), j),sd->status.cart[i].attribute); - for (k = 0; k < MAX_SLOTS; k++) { - sprintf(card_var, "@cartinventorylist_card%d",k+1); - pc->setreg(sd,reference_uid(script->add_str(card_var), j),sd->status.cart[i].card[k]); - } - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_expire"), j),sd->status.cart[i].expire_time); - pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_bound"), j),sd->status.cart[i].bound); - j++; + for(i=0;i<MAX_CART;i++) { + if(sd->status.cart[i].nameid > 0 && sd->status.cart[i].amount > 0) { + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_id"), j),sd->status.cart[i].nameid); + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_amount"), j),sd->status.cart[i].amount); + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_equip"), j),sd->status.cart[i].equip); + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_refine"), j),sd->status.cart[i].refine); + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_identify"), j),sd->status.cart[i].identify); + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_attribute"), j),sd->status.cart[i].attribute); + for (k = 0; k < MAX_SLOTS; k++) { + sprintf(card_var, "@cartinventorylist_card%d",k+1); + pc->setreg(sd,reference_uid(script->add_str(card_var), j),sd->status.cart[i].card[k]); } + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_expire"), j),sd->status.cart[i].expire_time); + pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_bound"), j),sd->status.cart[i].bound); + j++; } + } pc->setreg(sd,script->add_str("@cartinventorylist_count"),j); return true; } |