summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c13
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c2
3 files changed, 9 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 414b236d7..51d02ff40 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5392,13 +5392,15 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
/**
* Steals zeny from a monster through the RG_STEALCOIN skill.
*
- * @param sd Source character
- * @param target Target monster
+ * @param sd Source character
+ * @param target Target monster
+ * @param skill_lv Skill Level
*
* @return Amount of stolen zeny (0 in case of failure)
- **/
-int pc_steal_coin(struct map_session_data *sd, struct block_list *target) {
- int rate, skill_lv;
+ */
+int pc_steal_coin(struct map_session_data *sd, struct block_list *target, uint16 skill_lv)
+{
+ int rate;
struct mob_data *md = BL_CAST(BL_MOB, target);
if (sd == NULL || md == NULL)
@@ -5410,7 +5412,6 @@ int pc_steal_coin(struct map_session_data *sd, struct block_list *target) {
if (mob_is_treasure(md))
return 0;
- skill_lv = pc->checkskill(sd, RG_STEALCOIN);
rate = skill_lv * 10 + (sd->status.base_level - md->level) * 2 + sd->battle_status.dex / 2 + sd->battle_status.luk / 2;
if(rnd()%1000 < rate) {
int amount = md->level * skill_lv / 10 + md->level * 8 + rnd()%(md->level * 2 + 1); // mob_lv * skill_lv / 10 + random [mob_lv*8; mob_lv*10]
diff --git a/src/map/pc.h b/src/map/pc.h
index df5416bc1..fd446813f 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -901,7 +901,7 @@ END_ZEROED_BLOCK; /* End */
bool (*can_insert_card_into) (struct map_session_data* sd, int idx_card, int idx_equip);
int (*steal_item) (struct map_session_data *sd,struct block_list *bl, uint16 skill_lv);
- int (*steal_coin) (struct map_session_data *sd,struct block_list *bl);
+ int (*steal_coin) (struct map_session_data *sd,struct block_list *bl, uint16 skill_lv);
int (*modifybuyvalue) (struct map_session_data *sd,int orig_value);
int (*modifysellvalue) (struct map_session_data *sd,int orig_value);
diff --git a/src/map/skill.c b/src/map/skill.c
index a7ed0b8f2..40001659c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6538,7 +6538,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case RG_STEALCOIN:
if(sd) {
- int amount = pc->steal_coin(sd, bl);
+ int amount = pc->steal_coin(sd, bl, skill_lv);
if( amount > 0 ) {
dstmd->state.provoke_flag = src->id;
mob->target(dstmd, src, skill->get_range2(src, skill_id, skill_lv));