diff options
author | Haru <haru@dotalux.com> | 2019-11-17 15:11:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-17 15:11:25 +0100 |
commit | ebbed2342dbb7324295217ac7cf46f5e9da2fc0b (patch) | |
tree | d99f8aba2b104153be9f3bf8962f76ae6d833561 /src/map/pc.c | |
parent | 174c5d284f5cd57e0125535ea31554038379690e (diff) | |
parent | 22b946b2db0374164697ba57b64abb11551b0ff3 (diff) | |
download | hercules-ebbed2342dbb7324295217ac7cf46f5e9da2fc0b.tar.gz hercules-ebbed2342dbb7324295217ac7cf46f5e9da2fc0b.tar.bz2 hercules-ebbed2342dbb7324295217ac7cf46f5e9da2fc0b.tar.xz hercules-ebbed2342dbb7324295217ac7cf46f5e9da2fc0b.zip |
Merge pull request #2567 from MishimaHaruna/steal-fixes
Fix some issues in the Steal skill
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index a8ff661e8..56a00b5ce 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5583,15 +5583,17 @@ static int pc_steal_item(struct map_session_data *sd, struct block_list *bl, uin // Try dropping one item, in the order from first to last possible slot. // Droprate is affected by the skill success rate. - for (i = 0; i < MAX_STEAL_DROP; i++) { + for (i = 0; i < MAX_MOB_DROP; i++) { if (md->db->dropitem[i].nameid == 0) continue; if ((data = itemdb->exists(md->db->dropitem[i].nameid)) == NULL) continue; + if (data->type == IT_CARD) + continue; if (rnd() % 10000 < apply_percentrate(md->db->dropitem[i].p, rate, 100)) break; } - if (i == MAX_STEAL_DROP) + if (i == MAX_MOB_DROP) return 0; itemid = md->db->dropitem[i].nameid; |