summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5a28f63b9..e2bf1b725 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4368,10 +4368,15 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
if( (md->class_ >= 1324 && md->class_ < 1364) || (md->class_ >= 1938 && md->class_ < 1946) )
return 0;
+ // FIXME: This formula is either custom or outdated.
skill = pc_checkskill(sd,RG_STEALCOIN)*10;
rate = skill + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2;
- if(rnd()%1000 < rate) {
- pc_getzeny(sd,md->level*10 + rnd()%100);
+ if(rnd()%1000 < rate)
+ {
+ int amount = md->level*10 + rand()%100;
+
+ log_zeny(sd, LOG_TYPE_STEAL, sd, amount);
+ pc_getzeny(sd, amount);
md->state.steal_coin_flag = 1;
return 1;
}