summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-25 16:37:02 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-25 16:37:02 +0000
commitd944e1b20e85f474ed4f08d4a9caf747b80bd51e (patch)
tree768966a7f35d789ec8ba7ea7d51aa64a4e13888b /src/map/mob.c
parent4ad2c136939d190f29c1faf3775e6359cd82572b (diff)
downloadhercules-d944e1b20e85f474ed4f08d4a9caf747b80bd51e.tar.gz
hercules-d944e1b20e85f474ed4f08d4a9caf747b80bd51e.tar.bz2
hercules-d944e1b20e85f474ed4f08d4a9caf747b80bd51e.tar.xz
hercules-d944e1b20e85f474ed4f08d4a9caf747b80bd51e.zip
Added Ore Discovery, and base code for Slim Pitcher and Preservation
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@361 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 93425c81e..ef67341f8 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2458,6 +2458,28 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
log_drop(mvp_sd, md->class, log_item);
#endif
+ // Ore Discovery [Celest]
+ if (pc_checkskill(sd,BS_FINDINGORE)>0 && 1 >= rand()%1000) {
+ struct delay_item_drop *ditem;
+ int itemid[17] = { 714, 756, 757, 969, 984, 985, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1002 };
+ ditem=(struct delay_item_drop *)aCalloc(1,sizeof(struct delay_item_drop));
+ ditem->nameid = itemid[rand()%17];
+ log_item[i] = ditem->nameid;
+ ditem->amount = 1;
+ ditem->m = md->bl.m;
+ ditem->x = md->bl.x;
+ ditem->y = md->bl.y;
+ ditem->first_sd = mvp_sd;
+ ditem->second_sd = second_sd;
+ ditem->third_sd = third_sd;
+ add_timer(tick+500+i,mob_delay_item_drop,(int)ditem,0);
+ }
+
+ #ifndef TXT_ONLY
+ if(log_config.drop > 0)
+ log_drop(mvp_sd, md->class, log_item);
+ #endif
+
if(sd && sd->state.attack_type == BF_WEAPON) {
for(i=0;i<sd->monster_drop_item_count;i++) {
struct delay_item_drop *ditem;