Skip to content

Instantly share code, notes, and snippets.

@cydh
Created October 19, 2018 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cydh/ab170f155bef0efc68df7368158c5b5e to your computer and use it in GitHub Desktop.
Save cydh/ab170f155bef0efc68df7368158c5b5e to your computer and use it in GitHub Desktop.
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