diff options
author | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-30 14:11:27 +0000 |
---|---|---|
committer | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-30 14:11:27 +0000 |
commit | 4cda59dd53012e13193bc8875b231ddaf4df61ba (patch) | |
tree | 84909cb4a6138501081e69c42d4d37a8269cd119 /src/map/pc.c | |
parent | 9d47df647756cb71d5efa85ccb15153c18d3c4e5 (diff) | |
download | hercules-4cda59dd53012e13193bc8875b231ddaf4df61ba.tar.gz hercules-4cda59dd53012e13193bc8875b231ddaf4df61ba.tar.bz2 hercules-4cda59dd53012e13193bc8875b231ddaf4df61ba.tar.xz hercules-4cda59dd53012e13193bc8875b231ddaf4df61ba.zip |
fixed STEAL. 8) and tested at lhz_dun03
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6399 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index a4db9bcfa..075ca173a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2925,10 +2925,8 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl) if(!sd || !bl || bl->type != BL_MOB)
return 0;
-
- md=(struct mob_data *)bl;
-//temp steal disable [Lupus]
- if(1 || md->state.steal_flag>battle_config.skill_steal_max_tries || status_get_mode(bl)&MD_BOSS || md->master_id ||
+
+ if(md->state.steal_flag>battle_config.skill_steal_max_tries || status_get_mode(bl)&MD_BOSS || md->master_id ||
(md->class_>=1324 && md->class_<1364) || // prevent stealing from treasure boxes [Valaris]
map[md->bl.m].flag.nomobloot || // check noloot map flag [Lorky]
md->sc.data[SC_STONE].timer != -1 || md->sc.data[SC_FREEZE].timer != -1 //status change check
@@ -2950,12 +2948,12 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl) itemid = md->db->dropitem[i].nameid;
if(itemid <= 0 || (itemid>4000 && itemid<5000 && pc_checkskill(sd,TF_STEAL) <= 5))
continue;
- if(rand() % 10000 > ((md->db->dropitem[i].p * skill) / 100 + sd->add_steal_rate))
+ if(rand() % 10000 <= ((md->db->dropitem[i].p * skill) / 100 + sd->add_steal_rate))
break;
}
if (i == MAX_MOB_DROP)
return 0;
-
+
md->state.steal_flag = 255; //you can't steal from this mob any more
memset(&tmp_item,0,sizeof(tmp_item));
|