Created
October 19, 2018 00:41
-
-
Save cydh/ab170f155bef0efc68df7368158c5b5e to your computer and use it in GitHub Desktop.
Follow up https://github.com/rathena/rathena/commit/f0dfdf9219f6467ceda819879b9ab0d85bcabf2e for https://github.com/rathena/rathena/commit/ab0046cf2c6023ddf2fb54bc4ec2c6886f0098c4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/map/skill.cpp | 6 ++++-- | |
1 file changed, 4 insertions(+), 2 deletions(-) | |
diff --git a/src/map/skill.cpp b/src/map/skill.cpp | |
index a45362a1a..69f733314 100755 | |
--- a/src/map/skill.cpp | |
+++ b/src/map/skill.cpp | |
@@ -2641,7 +2641,7 @@ bool skill_strip_equip(struct block_list *src, struct block_list *target, uint16 | |
const enum sc_type sc_atk[5] = {SC_STRIPWEAPON, SC_STRIPSHIELD, SC_STRIPARMOR, SC_STRIPHELM, SC__STRIPACCESSORY}; | |
const enum sc_type sc_def[5] = {SC_CP_WEAPON, SC_CP_SHIELD, SC_CP_ARMOR, SC_CP_HELM, SC_NONE}; | |
struct status_data *sstatus = status_get_status_data(src), *tstatus = status_get_status_data(target); | |
- int rate, time, location; | |
+ int rate, time, location, per = 100; | |
switch (skill_id) { // Rate | |
case RG_STRIPWEAPON: | |
@@ -2650,12 +2650,14 @@ bool skill_strip_equip(struct block_list *src, struct block_list *target, uint16 | |
case RG_STRIPHELM: | |
case GC_WEAPONCRUSH: | |
rate = 50 * (skill_lv + 1) + 2 * (sstatus->dex - tstatus->dex); | |
+ per = 1000; | |
break; | |
case ST_FULLSTRIP: { | |
int min_rate = 50 + 20 * skill_lv; | |
rate = min_rate + 2 * (sstatus->dex - tstatus->dex); | |
rate = max(min_rate, rate); | |
+ per = 1000; | |
break; | |
} | |
case GS_DISARM: | |
@@ -2677,7 +2679,7 @@ bool skill_strip_equip(struct block_list *src, struct block_list *target, uint16 | |
return false; | |
} | |
- if (rnd()%100 >= rate) | |
+ if (rnd()%per >= rate) | |
return false; | |
switch (skill_id) { // Duration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment