From d57579a58d5035d48fc1f7a42c833cb47ae571b9 Mon Sep 17 00:00:00 2001 From: DracoRPG Date: Sat, 27 Jan 2007 05:04:10 +0000 Subject: Removed useless read-from-GRF features git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9725 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/itemdb.c | 159 ------------------------------------------------------- 1 file changed, 159 deletions(-) (limited to 'src/map/itemdb.c') diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 7d27f4fd0..c2c98f42b 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -8,7 +8,6 @@ #include "../common/nullpo.h" #include "../common/malloc.h" #include "../common/showmsg.h" -#include "../common/grfio.h" #include "../common/strlib.h" #include "map.h" #include "battle.h" @@ -16,10 +15,6 @@ #include "script.h" #include "pc.h" -// ** ITEMDB_OVERRIDE_NAME_VERBOSE ** -// 定義すると、itemdb.txtとgrfで名前が異なる場合、表示します. -//#define ITEMDB_OVERRIDE_NAME_VERBOSE 1 - static struct dbt* item_db; static struct item_group itemgroup_db[MAX_ITEMGROUP]; @@ -571,152 +566,6 @@ static void itemdb_read_itemgroup(void) } return; } -/*========================================== - * アイテムの名前テーブルを読み込む - *------------------------------------------ - */ -static int itemdb_read_itemnametable(void) -{ - char *buf,*p; - int s; - - buf=(char *) grfio_reads("data\\idnum2itemdisplaynametable.txt",&s); - - if(buf==NULL) - return -1; - - buf[s]=0; - for(p=buf;p-bufjname,buf2,ITEM_NAME_LENGTH)!=0 ){ - ShowNotice("[override] %d %s => %s\n",nameid - ,itemdb_search(nameid)->jname,buf2); - } -#endif - - strncpy(itemdb_search(nameid)->jname,buf2,ITEM_NAME_LENGTH-1); - } - - p=strchr(p,10); - if(!p) break; - p++; - } - aFree(buf); - ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\idnum2itemdisplaynametable.txt"); - - return 0; -} - -/*========================================== - * カードイラストのリソース名前テーブルを読み込む - *------------------------------------------ - */ -static int itemdb_read_cardillustnametable(void) -{ - char *buf,*p; - int s; - - buf=(char *) grfio_reads("data\\num2cardillustnametable.txt",&s); - - if(buf==NULL) - return -1; - - buf[s]=0; - for(p=buf;p-bufcardillustname,buf2,64); - } - - p=strchr(p,10); - if(!p) break; - p++; - } - aFree(buf); - ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\num2cardillustnametable.txt"); - - return 0; -} - -// -// 初期化 -// -/*========================================== - * - *------------------------------------------ - */ -static int itemdb_read_itemslottable(void) -{ - char *buf, *p; - int s; - - buf = (char *)grfio_reads("data\\itemslottable.txt", &s); - if (buf == NULL) - return -1; - buf[s] = 0; - for (p = buf; p - buf < s; ) { - int nameid, equip; - struct item_data* item; - sscanf(p, "%d#%d#", &nameid, &equip); - item = itemdb_search(nameid); - if (equip && item && itemdb_isequip2(item)) - item->equip = equip; - p = strchr(p, 10); - if(!p) break; - p++; - p=strchr(p, 10); - if(!p) break; - p++; - } - aFree(buf); - ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\itemslottable.txt"); - - return 0; -} - -/*========================================== - * - *------------------------------------------ - */ -static int itemdb_read_itemslotcounttable(void) -{ - char *buf, *p; - int s; - - buf = (char *)grfio_reads("data\\itemslotcounttable.txt", &s); - if (buf == NULL) - return -1; - buf[s] = 0; - for (p = buf; p - buf < s;){ - int nameid, slot; - sscanf(p, "%d#%d#", &nameid, &slot); - if (slot > MAX_SLOTS) - { - ShowWarning("itemdb_read_itemslotcounttable: Item %d specifies %d slots, but the server only supports up to %d\n", nameid, slot, MAX_SLOTS); - slot = MAX_SLOTS; - } - itemdb_slot(nameid) = slot; - p = strchr(p,10); - if(!p) break; - p++; - p = strchr(p,10); - if(!p) break; - p++; - } - aFree(buf); - ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n", "data\\itemslotcounttable.txt"); - - return 0; -} /*========================================== * 装備制限ファイル読み出し @@ -1202,14 +1051,6 @@ static void itemdb_read(void) itemdb_read_itemavail(); itemdb_read_noequip(); itemdb_read_itemtrade(); - if (battle_config.cardillust_read_grffile) - itemdb_read_cardillustnametable(); - if (battle_config.item_equip_override_grffile) - itemdb_read_itemslottable(); - if (battle_config.item_slots_override_grffile) - itemdb_read_itemslotcounttable(); - if (battle_config.item_name_override_grffile) - itemdb_read_itemnametable(); } /*========================================== -- cgit v1.2.3-60-g2f50