diff options
author | shennetsind <ind@henn.et> | 2013-03-29 19:40:25 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-03-29 19:40:25 -0300 |
commit | a89d501fc60b12a997a262429cb4515af9dad69e (patch) | |
tree | 39e2a5153a99d46dc40cb461eb3ecdb9ded73275 /src/map/searchstore.c | |
parent | cfd2bdb06048c17decaafd0f5a3c04e3f0ac6a3b (diff) | |
download | hercules-a89d501fc60b12a997a262429cb4515af9dad69e.tar.gz hercules-a89d501fc60b12a997a262429cb4515af9dad69e.tar.bz2 hercules-a89d501fc60b12a997a262429cb4515af9dad69e.tar.xz hercules-a89d501fc60b12a997a262429cb4515af9dad69e.zip |
Hercules Renewal: clif.c
1st Phase Complete.
http://hercules.ws/board/topic/237-hercules-renewal/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/searchstore.c')
-rw-r--r-- | src/map/searchstore.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/map/searchstore.c b/src/map/searchstore.c index c59c13bed..cac79a242 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -6,7 +6,7 @@ #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy #include "battle.h" // battle_config.* -#include "clif.h" // clif_open_search_store_info, clif_search_store_info_* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* #include "pc.h" // struct map_session_data #include "searchstore.h" // struct s_search_store_info @@ -106,7 +106,7 @@ bool searchstore_open(struct map_session_data* sd, unsigned int uses, unsigned s sd->searchstore.uses = uses; sd->searchstore.effect = effect; - clif_open_search_store_info(sd); + clif->open_search_store_info(sd); return true; } @@ -141,13 +141,13 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned if( sd->searchstore.nextquerytime > querytime ) { - clif_search_store_info_failed(sd, SSI_FAILED_LIMIT_SEARCH_TIME); + clif->search_store_info_failed(sd, SSI_FAILED_LIMIT_SEARCH_TIME); return; } if( !sd->searchstore.uses ) { - clif_search_store_info_failed(sd, SSI_FAILED_SEARCH_CNT); + clif->search_store_info_failed(sd, SSI_FAILED_SEARCH_CNT); return; } @@ -157,7 +157,7 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned if( !itemdb_exists(itemlist[i]) ) { ShowWarning("searchstore_query: Client resolved item %hu is not known.\n", itemlist[i]); - clif_search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); + clif->search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); return; } } @@ -166,7 +166,7 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned if( !itemdb_exists(cardlist[i]) ) { ShowWarning("searchstore_query: Client resolved card %hu is not known.\n", cardlist[i]); - clif_search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); + clif->search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); return; } } @@ -205,7 +205,7 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned if( !store_searchall(pl_sd, &s) ) {// exceeded result size - clif_search_store_info_failed(sd, SSI_FAILED_OVER_MAXCOUNT); + clif->search_store_info_failed(sd, SSI_FAILED_OVER_MAXCOUNT); break; } } @@ -218,7 +218,7 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned sd->searchstore.items = (struct s_search_store_info_item*)aRealloc(sd->searchstore.items, sizeof(struct s_search_store_info_item)*sd->searchstore.count); // present results - clif_search_store_info_ack(sd); + clif->search_store_info_ack(sd); // one page displayed sd->searchstore.pages++; @@ -229,10 +229,10 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned searchstore_clear(sd); // update uses - clif_search_store_info_ack(sd); + clif->search_store_info_ack(sd); // notify of failure - clif_search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); + clif->search_store_info_failed(sd, SSI_FAILED_NOTHING_SEARCH_ITEM); } } @@ -257,7 +257,7 @@ void searchstore_next(struct map_session_data* sd) } // present results - clif_search_store_info_ack(sd); + clif->search_store_info_ack(sd); // one more page displayed sd->searchstore.pages++; @@ -308,19 +308,19 @@ void searchstore_click(struct map_session_data* sd, int account_id, int store_id if( i == sd->searchstore.count ) {// no such result, crafted ShowWarning("searchstore_click: Received request with item %hu of account %d, which is not part of current result set (account_id=%d, char_id=%d).\n", nameid, account_id, sd->bl.id, sd->status.char_id); - clif_search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); + clif->search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); return; } if( ( pl_sd = map_id2sd(account_id) ) == NULL ) {// no longer online - clif_search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); + clif->search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); return; } if( !searchstore_hasstore(pl_sd, sd->searchstore.type) || searchstore_getstoreid(pl_sd, sd->searchstore.type) != store_id ) {// no longer vending/buying or not same shop - clif_search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); + clif->search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); return; } @@ -328,7 +328,7 @@ void searchstore_click(struct map_session_data* sd, int account_id, int store_id if( !store_search(pl_sd, nameid) ) {// item no longer being sold/bought - clif_search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); + clif->search_store_info_failed(sd, SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE); return; } @@ -339,11 +339,11 @@ void searchstore_click(struct map_session_data* sd, int account_id, int store_id if( sd->bl.m != pl_sd->bl.m ) {// not on same map, wipe previous marker - clif_search_store_info_click_ack(sd, -1, -1); + clif->search_store_info_click_ack(sd, -1, -1); } else { - clif_search_store_info_click_ack(sd, pl_sd->bl.x, pl_sd->bl.y); + clif->search_store_info_click_ack(sd, pl_sd->bl.x, pl_sd->bl.y); } break; |