Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2012
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. Index: skill.c
  2. ===================================================================
  3. --- skill.c (revision 16990)
  4. +++ skill.c (working copy)
  5. @@ -2152,17 +2152,24 @@
  6. const enum sc_type sc_def[5] = {SC_CP_WEAPON, SC_CP_SHIELD, SC_CP_ARMOR, SC_CP_HELM, 0};
  7. int i;
  8.  
  9. - if (rnd()%100 >= rate)
  10. + if (rate > -1 && rnd()%100 >= rate)
  11. return 0;
  12.  
  13. sc = status_get_sc(bl);
  14. if (!sc || sc->option&OPTION_MADOGEAR) //Mado Gear cannot be divested [Ind]
  15. return 0;
  16.  
  17. - for (i = 0; i < ARRAYLENGTH(pos); i++) {
  18. - if (where&pos[i] && sc->data[sc_def[i]])
  19. - where&=~pos[i];
  20. - }
  21. +
  22. + for (i = 0; i < ARRAYLENGTH(pos); i++)
  23. + {
  24. + if (where&pos[i] && sc->data[sc_def[i]])
  25. + {
  26. + if(rate < 0)
  27. + status_change_end( bl, sc_def[i], INVALID_TIMER );
  28. + else
  29. + where&=~pos[i];
  30. + }
  31. + }
  32. if (!where) return 0;
  33.  
  34. for (i = 0; i < ARRAYLENGTH(pos); i++) {
  35. @@ -6210,6 +6217,13 @@
  36. clif_gospel_info(sd, 0x28);
  37. break;
  38. }
  39. + if(sd && sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ROGUE && skillid != ST_FULLSTRIP)
  40. + {
  41. + int ii = 0, item_id = 7139;
  42. + ARR_FIND( 0, MAX_INVENTORY, ii, sd->status.inventory[ii].nameid == item_id);
  43. + if(ii < MAX_INVENTORY && rnd()%100 < i && !pc_delitem(sd, ii, 1, 0, 0, LOG_TYPE_CONSUME))
  44. + i = -1;
  45. + }
  46.  
  47. //Attempts to strip at rate i and duration d
  48. 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