diff options
-rw-r--r-- | Changelog-Trunk.txt | 5 | ||||
-rw-r--r-- | conf-tmpl/battle/misc.conf | 22 | ||||
-rw-r--r-- | src/map/battle.c | 12 | ||||
-rw-r--r-- | src/map/battle.h | 6 | ||||
-rw-r--r-- | src/map/itemdb.c | 159 | ||||
-rw-r--r-- | src/map/itemdb.h | 1 | ||||
-rw-r--r-- | src/map/map.c | 17 | ||||
-rw-r--r-- | src/map/npc.c | 3 | ||||
-rw-r--r-- | src/map/script.c | 18 | ||||
-rw-r--r-- | src/map/skill.c | 57 |
10 files changed, 3 insertions, 297 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ae7b4ce13..d4e36ca40 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,11 +4,12 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2007/01/26 + * Removed all those useless read-from-GRF features noone would ever use, + also removed cutincard script command as a consequence [DracoRPG] + - this is only the beginning of full grfio disparition from map-server * Now assassins can equip arrows, and status arrows trigger on any ranged physical attack: mimics Grimtooth + status arrow "Aegis bug" [DracoRPG] * Added some random Storage Password packets thingies [DracoRPG] - -> Those 2 things affect too few code to break anything, or so I hope as - I can't try compiling atm :s * Kaite and Assumptio no longer stack. One will remove the other in the same way Assumptio and Kyrie do. * Made homunculus renaming go through the char-server so it can be diff --git a/conf-tmpl/battle/misc.conf b/conf-tmpl/battle/misc.conf index f8f37ad7a..c521cc0ef 100644 --- a/conf-tmpl/battle/misc.conf +++ b/conf-tmpl/battle/misc.conf @@ -78,28 +78,6 @@ error_log: on // Display other stuff? (for debug only) (default: off) (Note 1) etc_log: off -// You can turn the following 5 settings off if you don't need them, -// or if you're experiencing problems with GRF loading -// -// Override item names from GRF file? (Note 1) -item_name_override_grffile: no -// -// Override item equip positions from GRF file? (Note 1) -item_equip_override_grffile: no -// -// Override item slots from GRF file? (Note 1) -item_slots_override_grffile: no -// -// Override 'indoors' mapflags from GRF file? (Note 1) -indoors_override_grffile: no -// -// Override SP used per level from GRF file? (Note 1) -// Turn this off if you have a customised skill_require_db.txt -skill_sp_override_grffile: no -// -// Read card illustrations from GRF file? (Note 1) -cardillust_read_grffile: yes - // Do you want to debug warp points? If set to yes, warp points will appear as flags.(Note 1) // It will also run on start-up a warp-check to print out which warp points lead directly on // top of on-touch npcs (which can lead to infinite loopback warping situations) diff --git a/src/map/battle.c b/src/map/battle.c index f0e0dfb2c..fd38721aa 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3587,12 +3587,6 @@ static const struct battle_data_short { { "wedding_ignorepalette", &battle_config.wedding_ignorepalette }, //[Skotlex] { "xmas_ignorepalette", &battle_config.xmas_ignorepalette }, // [Valaris] { "natural_heal_weight_rate", &battle_config.natural_heal_weight_rate }, - { "item_name_override_grffile", &battle_config.item_name_override_grffile}, - { "item_equip_override_grffile", &battle_config.item_equip_override_grffile}, // [Celest] - { "item_slots_override_grffile", &battle_config.item_slots_override_grffile}, // [Celest] - { "indoors_override_grffile", &battle_config.indoors_override_grffile}, // [Celest] - { "skill_sp_override_grffile", &battle_config.skill_sp_override_grffile}, // [Celest] - { "cardillust_read_grffile", &battle_config.cardillust_read_grffile}, // [Celest] { "arrow_decrement", &battle_config.arrow_decrement }, { "max_aspd", &battle_config.max_aspd }, { "max_walk_speed", &battle_config.max_walk_speed }, @@ -4004,12 +3998,6 @@ void battle_set_defaults() { battle_config.natural_healsp_interval=8000; battle_config.natural_heal_skill_interval=10000; battle_config.natural_heal_weight_rate=50; - battle_config.item_name_override_grffile=1; - battle_config.item_equip_override_grffile=0; // [Celest] - battle_config.item_slots_override_grffile=0; // [Celest] - battle_config.indoors_override_grffile=0; // [Celest] - battle_config.skill_sp_override_grffile=0; // [Celest] - battle_config.cardillust_read_grffile=0; // [Celest] battle_config.arrow_decrement=1; battle_config.max_aspd = 199; battle_config.max_walk_speed = 300; diff --git a/src/map/battle.h b/src/map/battle.h index adec20e43..4fc6e545b 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -203,12 +203,6 @@ extern struct Battle_Config { int natural_healsp_interval; int natural_heal_skill_interval; unsigned short natural_heal_weight_rate; - unsigned short item_name_override_grffile; - unsigned short indoors_override_grffile; // [Celest] - unsigned short skill_sp_override_grffile; // [Celest] - unsigned short cardillust_read_grffile; - unsigned short item_equip_override_grffile; - unsigned short item_slots_override_grffile; unsigned short arrow_decrement; unsigned short max_aspd; unsigned short max_walk_speed; //Maximum walking speed after buffs [Skotlex] 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-buf<s;){ - int nameid; - char buf2[64]; //Why 64? What's this for, other than holding an item's name? [Skotlex] - - if( sscanf(p,"%d#%[^#]#",&nameid,buf2)==2 ){ - -#ifdef ITEMDB_OVERRIDE_NAME_VERBOSE - if( itemdb_exists(nameid) && - strncmp(itemdb_search(nameid)->jname,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-buf<s;){ - int nameid; - char buf2[64]; - - if( sscanf(p,"%d#%[^#]#",&nameid,buf2)==2 ){ - strcat(buf2,".bmp"); - memcpy(itemdb_search(nameid)->cardillustname,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(); } /*========================================== diff --git a/src/map/itemdb.h b/src/map/itemdb.h index f1e97227c..85a0cdb21 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -37,7 +37,6 @@ struct item_data { int nameid; char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH]; char prefix[NAME_LENGTH],suffix[NAME_LENGTH]; - char cardillustname[64]; //Do not add stuff between value_buy and wlv (see how getiteminfo works) int value_buy; int value_sell; diff --git a/src/map/map.c b/src/map/map.c index 6d1bb490d..b8e733499 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3696,12 +3696,6 @@ void do_final(void) { //we probably don't need the cache open at all times 'yet', so this is closed by mapsource_final [celest] //map_cache_close(); - // We probably don't need the grfio after server bootup 'yet' too. So this is closed near the end of do_init [Lance] - if((battle_config.cardillust_read_grffile || battle_config.item_equip_override_grffile || - battle_config.item_slots_override_grffile || battle_config.item_name_override_grffile || - battle_config.skill_sp_override_grffile)) - grfio_final(); - for (i = 0; i < map_num; i++) if (map[i].m >= 0) map_foreachinmap(cleanup_sub, i, BL_ALL); @@ -3991,17 +3985,6 @@ int do_init(int argc, char *argv[]) { if (battle_config.pk_mode == 1) ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n"); - if(!(battle_config.cardillust_read_grffile || battle_config.item_equip_override_grffile || - battle_config.item_slots_override_grffile || battle_config.item_name_override_grffile || - battle_config.skill_sp_override_grffile)) - grfio_final(); // Unused after reading all maps. - - //However, some reload functions still use it,disable them. - //battle_config.cardillust_read_grffile = - //battle_config.item_equip_override_grffile = - //battle_config.item_slots_override_grffile = - //battle_config.item_name_override_grffile = 0; - ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port); return 0; diff --git a/src/map/npc.c b/src/map/npc.c index 90d61e226..8c7ac76da 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3016,9 +3016,6 @@ int do_init_npc(void) for (busy = 1; busy < MAX_NPC_CLASS; busy++) npc_viewdb[busy].class_ = busy; busy = 0; - // indoorrswtable.txt and etcinfo.txt [Celest] - if (battle_config.indoors_override_grffile) - npc_read_indoors(); // comparing only the first 24 chars of labels that are 50 chars long isn't that nice // will cause "duplicated" labels where actually no dup is... diff --git a/src/map/script.c b/src/map/script.c index 7abbe83df..2182e5c74 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3565,7 +3565,6 @@ int buildin_getequippercentrefinery(struct script_state *st); int buildin_successrefitem(struct script_state *st); int buildin_failedrefitem(struct script_state *st); int buildin_cutin(struct script_state *st); -int buildin_cutincard(struct script_state *st); int buildin_statusup(struct script_state *st); int buildin_statusup2(struct script_state *st); int buildin_bonus(struct script_state *st); @@ -3866,7 +3865,6 @@ struct script_function buildin_func[] = { {buildin_enableitemuse,"enable_items",""}, {buildin_disableitemuse,"disable_items",""}, {buildin_cutin,"cutin","si"}, - {buildin_cutincard,"cutincard","i"}, {buildin_viewpoint,"viewpoint","iiiii"}, {buildin_heal,"heal","ii"}, {buildin_itemheal,"itemheal","ii"}, @@ -5181,22 +5179,6 @@ int buildin_cutin(struct script_state *st) return 0; } -/*========================================== - * カードのイラストを表示する - *------------------------------------------ - */ -int buildin_cutincard(struct script_state *st) -{ - int itemid; - struct item_data *i_data; - - itemid=conv_num(st,& (st->stack->stack_data[st->start+2])); - - i_data = itemdb_exists(itemid); - if (i_data) - clif_cutin(script_rid2sd(st),i_data->cardillustname,4); - return 0; -} /*========================================== * diff --git a/src/map/skill.c b/src/map/skill.c index 7365b6d9b..e780d8208 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -11,7 +11,6 @@ #include "../common/nullpo.h" #include "../common/malloc.h" #include "../common/showmsg.h" -#include "../common/grfio.h" #include "../common/ers.h" #include "skill.h" @@ -11571,62 +11570,9 @@ int skill_readdb (void) return 0; } -/*=============================================== - * For reading leveluseskillspamount.txt [Celest] - *----------------------------------------------- - */ -static int skill_read_skillspamount (void) -{ - char *buf,*p; - struct skill_db *skill = NULL; - int s, idx, new_flag=1, level=1, sp=0; - - buf=(char *) grfio_reads("data\\leveluseskillspamount.txt",&s); - - if(buf==NULL) - return -1; - - buf[s]=0; - for(p=buf;p-buf<s;){ - char buf2[64]; - - if (sscanf(p,"%[@]",buf2) == 1) { - level = 1; - new_flag = 1; - } else if (new_flag && sscanf(p,"%[^#]#",buf2) == 1) { - for (idx=0; skill_names[idx].id != 0; idx++) { - if (strstr(buf2, skill_names[idx].name) != NULL) { - //Apply Guild/Homunc adjustment. - sp = skill_names[idx].id; - if (sp >= GD_SKILLBASE) sp = GD_SKILLRANGEMIN + sp - GD_SKILLBASE; - if (sp >= HM_SKILLBASE) sp = HM_SKILLRANGEMIN + sp - HM_SKILLBASE; - if (sp < 1 || sp >= MAX_SKILL_DB) - continue; - skill = &skill_db[sp]; - new_flag = 0; - break; - } - } - } else if (!new_flag && sscanf(p,"%d#",&sp) == 1) { - skill->sp[level-1]=sp; - level++; - } - - p=strchr(p,10); - if(!p) break; - p++; - } - aFree(buf); - ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\leveluseskillspamount.txt"); - - return 0; -} - void skill_reload (void) { skill_readdb(); - if (battle_config.skill_sp_override_grffile) - skill_read_skillspamount(); } /*========================================== @@ -11641,9 +11587,6 @@ int do_init_skill (void) skill_unit_ers = ers_new(sizeof(struct skill_unit_group)); skill_timer_ers = ers_new(sizeof(struct skill_timerskill)); - if (battle_config.skill_sp_override_grffile) - skill_read_skillspamount(); - add_timer_func_list(skill_unit_timer,"skill_unit_timer"); add_timer_func_list(skill_castend_id,"skill_castend_id"); add_timer_func_list(skill_castend_pos,"skill_castend_pos"); |