diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-20 10:57:30 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-20 10:57:30 +0000 |
commit | 492443cd3a0eddabb24212e6b04a3f7d3c9bce88 (patch) | |
tree | f59fa26b969e4426a9758b0dc2307088785907e8 /src/map/itemdb.c | |
parent | 8d5b0ca9a5f8129a6e3cba71adc9bfea21f9ddb6 (diff) | |
download | hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.tar.gz hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.tar.bz2 hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.tar.xz hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.zip |
* Updated Acid Terror, Sword Reject, Double Strafe
* Replaced checking whether items can be refined or not with a new function
* Fixed npctalk outputting to chat [celest]
* Allowed some values in script_config to be customised in script_athena.conf
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@654 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r-- | src/map/itemdb.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index a68afd61f..a68fb3664 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -41,6 +41,7 @@ static int itemdb_read_randomitem(); static int itemdb_read_itemavail(void); static int itemdb_read_itemnametable(void); static int itemdb_read_noequip(void); +static int itemdb_read_norefine(void); void itemdb_reload(void); /*========================================== @@ -292,6 +293,7 @@ static void itemdb_read(void) itemdb_read_randomitem(); itemdb_read_itemavail(); itemdb_read_noequip(); + itemdb_read_norefine(); if (!battle_config.item_name_override_grffile) itemdb_read_itemnametable(); @@ -637,6 +639,31 @@ static int itemdb_read_noequip(void) ShowStatus(tmp_output); return 0; } + +/*================================================ + * Whether the item can be refined or not [Celest] + *------------------------------------------------ + */ +static int itemdb_read_norefine(void) +{ + int i, nameid; + struct item_data *id; + // To-do: let it read from a text file later + int cant_refine[] = { + 0, 1243, 1530, 2110, 2112, 2264, 2298, 2352, 2410, 2413, + 2414, 2509, 2510, 5008, 5046, 5049, 5050, 5053, 5055, 5098 + }; + + for (i=0; i < (int)(sizeof(cant_refine) / sizeof(cant_refine[0])); i++) { + nameid = cant_refine[i]; + if(nameid<=0 || nameid>=20000 || !(id=itemdb_exists(nameid))) + continue; + id->flag.no_refine = 1; + } + + return 1; +} + #ifndef TXT_ONLY /*====================================== @@ -870,6 +897,7 @@ static void itemdb_read(void) itemdb_read_randomitem(); itemdb_read_itemavail(); itemdb_read_noequip(); + itemdb_read_norefine(); itemdb_read_cardillustnametable(); if (!battle_config.item_name_override_grffile) itemdb_read_itemnametable(); |