diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-25 18:05:40 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-25 18:05:40 +0000 |
commit | e7153a55c1392f478faa0522c7f62ded1c115b3a (patch) | |
tree | 5b694367c254201d171fa9155db5d2ad7cebd793 /src/map/mob.c | |
parent | 1d675068f04afe6ab0829e99a32d0179c5183431 (diff) | |
download | hercules-e7153a55c1392f478faa0522c7f62ded1c115b3a.tar.gz hercules-e7153a55c1392f478faa0522c7f62ded1c115b3a.tar.bz2 hercules-e7153a55c1392f478faa0522c7f62ded1c115b3a.tar.xz hercules-e7153a55c1392f478faa0522c7f62ded1c115b3a.zip |
- Modified and simplified the random item group format. It now is <GroupID>,<ItemID>,<Rate>, where Rate normally is 1, greater numbers is the equivalent of adding the line multiple times.
- Added constants to identify all groups to db/const.txt
- Cleaned up and updated item_db to use these new constants (warning: item_db.sql needs to be updated!)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6275 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index bdd6d6bb4..342ab5b43 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1985,7 +1985,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) // Ore Discovery [Celest]
if (sd == mvp_sd && !map[md->bl.m].flag.nomobloot && pc_checkskill(sd,BS_FINDINGORE)>0 && battle_config.finding_ore_rate/10 >= rand()%10000) {
- ditem = mob_setdropitem(itemdb_searchrandomid(6), 1);
+ ditem = mob_setdropitem(itemdb_searchrandomid(IG_FINDINGORE), 1);
if (drop_ore<0) drop_ore=8; //we have only 10 slots in LOG, there's a check to not overflow (9th item usually a card, so we use 8th slot)
log_item[drop_ore] = ditem->item_data.nameid; //it's for logging only
drop_items++; //we count if there were any drops
@@ -2020,7 +2020,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) if (drop_rate < rand()%10000 +1)
continue;
itemid = (sd->add_drop[i].id > 0) ? sd->add_drop[i].id :
- itemdb_searchrandomgroup(sd->add_drop[i].group);
+ itemdb_searchrandomid(sd->add_drop[i].group);
mob_item_drop(md, dlist, mob_setdropitem(itemid,1), 0, drop_rate);
}
|