summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2015-12-23 16:02:13 +0800
committerJedzkie <jedzkie13@rocketmail.com>2015-12-23 16:02:13 +0800
commite9129d00278edc75a45a1d5d47345c9d9f2460c3 (patch)
tree3ef0e959c65a3d40e731e26c5b2b170059f9a1ed /src/map/pc.c
parent248f245f078ddba531cf771dcd42ad9e0bd0f7c7 (diff)
downloadhercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.tar.gz
hercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.tar.bz2
hercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.tar.xz
hercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.zip
Update:
- Rename BLUE_CRYST and PINK_CRYST to BLUE_CRYSTAL and PINK_CRYSTAL - Rename FOOD_STOR to FOOD_STORAGE - Rename TREAS01, TREAS40, TREAS41, TREAS49 to TREASURE_01, TREASURE_40, TREASURE_41, TREASURE_49
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 43d320a80..157f7faab 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5246,7 +5246,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
sd_status= status->get_status_data(&sd->bl);
md_status= status->get_status_data(bl);
- if( md->master_id || md_status->mode&MD_BOSS || mob_is_treasure(md) ||
+ if (md->master_id || md_status->mode&MD_BOSS || mob_is_treasure(md) ||
map->list[bl->m].flag.nomobloot || // check noloot map flag [Lorky]
(battle_config.skill_steal_max_tries && //Reached limit of steal attempts. [Lupus]
md->state.steal_flag++ >= battle_config.skill_steal_max_tries)
@@ -5312,20 +5312,21 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
int pc_steal_coin(struct map_session_data *sd, struct block_list *target) {
int rate, skill_lv;
struct mob_data *md;
- if(!sd || !target || target->type != BL_MOB)
+
+ if (!sd || !target || target->type != BL_MOB)
return 0;
md = (TBL_MOB*)target;
- if( md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || md->status.mode&MD_BOSS )
+ if (md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || md->status.mode&MD_BOSS)
return 0;
- if( mob_is_treasure(md) )
+ 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;
+ 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]
+ 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]
pc->getzeny(sd, amount, LOG_TYPE_STEAL, NULL);
md->state.steal_coin_flag = 1;