diff options
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r-- | src/map/itemdb.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 350697a08..58397a2ee 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -437,6 +437,9 @@ void itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) case JOB_REBELLION: mask[1] = 1ULL << MAPID_GUNSLINGER; break; + case JOB_SUMMONER: + mask[0] = 1ULL << MAPID_SUMMONER; + break; // Other Classes case JOB_GANGSI: //Bongun/Munak mask[0] = 1ULL << MAPID_GANGSI; @@ -538,6 +541,8 @@ void itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) bclass[1] |= 1ULL<<MAPID_NINJA; if (jobmask & 1ULL<<30) //Rebellion bclass[1] |= 1ULL<<MAPID_GUNSLINGER; + if (jobmask & 1ULL<<31) //Summoner + bclass[0] |= 1ULL<<MAPID_SUMMONER; } void create_dummy_data(void) @@ -1376,7 +1381,7 @@ void itemdb_read_combos(void) char filepath[256]; FILE* fp; - sprintf(filepath, "%s/%s", map->db_path, DBPATH"item_combo_db.txt"); + snprintf(filepath, 256, "%s/%s", map->db_path, DBPATH"item_combo_db.txt"); if ((fp = fopen(filepath, "r")) == NULL) { ShowError("itemdb_read_combos: File not found \"%s\".\n", filepath); @@ -1535,6 +1540,30 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) { return 0; } + { + const char *c = entry->name; + while (ISALNUM(*c) || *c == '_') + ++c; + + if (*c != '\0') { + ShowWarning("itemdb_validate_entry: Invalid characters in the AegisName '%s' for item %d in '%s'. Skipping.\n", + entry->name, entry->nameid, source); + if (entry->script) { + script->free_code(entry->script); + entry->script = NULL; + } + if (entry->equip_script) { + script->free_code(entry->equip_script); + entry->equip_script = NULL; + } + if (entry->unequip_script) { + script->free_code(entry->unequip_script); + entry->unequip_script = NULL; + } + return 0; + } + } + if( entry->type < 0 || entry->type == IT_UNKNOWN || entry->type == IT_UNKNOWN2 || (entry->type > IT_DELAYCONSUME && entry->type < IT_CASH ) || entry->type >= IT_MAX ) { |