summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorEmistry <Equinox1991@gmail.com>2016-08-10 23:07:42 +0800
committerHaru <haru@dotalux.com>2016-08-14 17:53:23 +0200
commit26f1241ca5e58d95845aba101d7026759fa15e4b (patch)
treeddbe9bf60c41783db7e08d5eb640b99164720ef1 /src/map/pc.c
parent694070de091852a2b3426072d2141224391a8cc8 (diff)
downloadhercules-26f1241ca5e58d95845aba101d7026759fa15e4b.tar.gz
hercules-26f1241ca5e58d95845aba101d7026759fa15e4b.tar.bz2
hercules-26f1241ca5e58d95845aba101d7026759fa15e4b.tar.xz
hercules-26f1241ca5e58d95845aba101d7026759fa15e4b.zip
Update pc_steal_coin parameter
Added skill_lv as parameter to *pc_steal_coin() Closes #1395 as merged Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c13
1 files changed, 7 insertions, 6 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]