Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: skill.c
- ===================================================================
- --- skill.c (revision 16990)
- +++ skill.c (working copy)
- @@ -2152,17 +2152,24 @@
- const enum sc_type sc_def[5] = {SC_CP_WEAPON, SC_CP_SHIELD, SC_CP_ARMOR, SC_CP_HELM, 0};
- int i;
- - if (rnd()%100 >= rate)
- + if (rate > -1 && rnd()%100 >= rate)
- return 0;
- sc = status_get_sc(bl);
- if (!sc || sc->option&OPTION_MADOGEAR) //Mado Gear cannot be divested [Ind]
- return 0;
- - for (i = 0; i < ARRAYLENGTH(pos); i++) {
- - if (where&pos[i] && sc->data[sc_def[i]])
- - where&=~pos[i];
- - }
- +
- + for (i = 0; i < ARRAYLENGTH(pos); i++)
- + {
- + if (where&pos[i] && sc->data[sc_def[i]])
- + {
- + if(rate < 0)
- + status_change_end( bl, sc_def[i], INVALID_TIMER );
- + else
- + where&=~pos[i];
- + }
- + }
- if (!where) return 0;
- for (i = 0; i < ARRAYLENGTH(pos); i++) {
- @@ -6210,6 +6217,13 @@
- clif_gospel_info(sd, 0x28);
- break;
- }
- + if(sd && sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ROGUE && skillid != ST_FULLSTRIP)
- + {
- + int ii = 0, item_id = 7139;
- + ARR_FIND( 0, MAX_INVENTORY, ii, sd->status.inventory[ii].nameid == item_id);
- + if(ii < MAX_INVENTORY && rnd()%100 < i && !pc_delitem(sd, ii, 1, 0, 0, LOG_TYPE_CONSUME))
- + i = -1;
- + }
- //Attempts to strip at rate i and duration d
- if ((i = skill_strip_equip(bl, location, i, skilllv, d)) || (skillid != ST_FULLSTRIP && skillid != GC_WEAPONCRUSH))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement