summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-07-26 19:48:09 +0200
committerGitHub <noreply@github.com>2020-07-26 19:48:09 +0200
commite523cc59ae44f38f2b48e7c610ec61b4bcba4e03 (patch)
tree7ab99d463fd5c8d8da6a8c203567a2a397c34bac
parentae8f443ea5a1816b7c21bfb28b5c7fe92a193735 (diff)
parenta3d01fb73ed82710fa72f76c8c898300f1eb7c39 (diff)
downloadhercules-e523cc59ae44f38f2b48e7c610ec61b4bcba4e03.tar.gz
hercules-e523cc59ae44f38f2b48e7c610ec61b4bcba4e03.tar.bz2
hercules-e523cc59ae44f38f2b48e7c610ec61b4bcba4e03.tar.xz
hercules-e523cc59ae44f38f2b48e7c610ec61b4bcba4e03.zip
Merge pull request #2802 from MrKeiKun/fix-gank_formula
Fix RG_SNATCHER formula.
-rw-r--r--src/map/skill.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 17721caff..c2a336d7e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1649,11 +1649,15 @@ static int skill_additional_effect(struct block_list *src, struct block_list *bl
if( pc_iswug(sd) && (temp=pc->checkskill(sd,RA_WUGSTRIKE)) > 0 && rnd()%1000 <= sstatus->luk*3 )
skill->castend_damage_id(src,bl,RA_WUGSTRIKE,temp,tick,0);
// Gank
- if(dstmd && sd->weapontype != W_BOW &&
- (temp=pc->checkskill(sd,RG_SNATCHER)) > 0 &&
- (temp*15 + 55) + pc->checkskill(sd,TF_STEAL)*10 > rnd()%1000) {
- if(pc->steal_item(sd,bl,pc->checkskill(sd,TF_STEAL)))
- clif->skill_nodamage(src,bl,TF_STEAL,temp,1);
+ if (dstmd && sd->weapontype != W_BOW &&
+ (temp = pc->checkskill(sd, RG_SNATCHER)) > 0 &&
+#ifdef RENEWAL
+ (temp * 10) + pc->checkskill(sd, TF_STEAL) * 10 > rnd() % 1000) {
+#else
+ (temp * 15 + 55) + pc->checkskill(sd, TF_STEAL) * 10 > rnd() % 1000) {
+#endif
+ if (pc->steal_item(sd, bl, pc->checkskill(sd, TF_STEAL)))
+ clif->skill_nodamage(src, bl, TF_STEAL, temp, 1);
else
clif->skill_fail(sd, RG_SNATCHER, USESKILL_FAIL_LEVEL, 0, 0);
}