summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-28 15:53:03 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-28 15:53:03 +0000
commitd8a8a34e4999d52b0bedf88f8232f001be1ec7a2 (patch)
tree98c074355f2660cc55f1ebf2c5081fbf4f9bbe31 /src/map/pc.c
parent64cd11e4ddf883d3861277f778aaf17fea0f2632 (diff)
downloadhercules-d8a8a34e4999d52b0bedf88f8232f001be1ec7a2.tar.gz
hercules-d8a8a34e4999d52b0bedf88f8232f001be1ec7a2.tar.bz2
hercules-d8a8a34e4999d52b0bedf88f8232f001be1ec7a2.tar.xz
hercules-d8a8a34e4999d52b0bedf88f8232f001be1ec7a2.zip
- Added constant MAX_MOB_DROP to specify the amount of normal drops a mob has. The mob_db reading code will automatically parse the file according to the number of drops expected (the Mexp/Mper and MVP item rewards must still be after the normal drops). Set to 10 currently.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6347 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 90fc5dfe9..036771b74 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2938,12 +2938,12 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
if (skill < 1)
return 0;
- j = i = rand()%10; //Pick one mobs drop slot.
+ j = i = rand()%MAX_MOB_DROP; //Pick one mobs drop slot.
do {
//if it's empty, we check one by one, till find an item
i--;
if(i<0)
- i=9; //9th slot
+ i=MAX_MOB_DROP-1;
itemid = md->db->dropitem[i].nameid;
//now try all 10 slots till success
if(itemid <= 0 || (itemdb_type(itemid) == 6 && pc_checkskill(sd,TF_STEAL) <= 5))