Advertisement
uddevil

rAthena Infinite Manhole Protection

Nov 25th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.76 KB | None | 0 0
  1. diff --git a/src/map/skill.cpp b/src/map/skill.cpp
  2. index 644129558..db4a1a38f 100755
  3. --- a/src/map/skill.cpp
  4. +++ b/src/map/skill.cpp
  5. @@ -17289,10 +17289,12 @@ static int skill_cell_overlap(struct block_list *bl, va_list ap)
  6.     uint16 skill_id;
  7.     int *alive;
  8.     struct skill_unit *unit;
  9. +   struct map_session_data *sd;
  10.  
  11.     skill_id = va_arg(ap,int);
  12.     alive = va_arg(ap,int *);
  13.     unit = (struct skill_unit *)bl;
  14. +   sd = va_arg(ap, struct map_session_data *);
  15.  
  16.     if (unit == NULL || unit->group == NULL || (*alive) == 0)
  17.         return 0;
  18. @@ -17316,10 +17318,30 @@ static int skill_cell_overlap(struct block_list *bl, va_list ap)
  19.         case GN_CRAZYWEED_ATK:
  20.             if (skill_get_unit_flag(unit->group->skill_id)&UF_CRAZYWEED_IMMUNE)
  21.                 break;
  22. +           // Cacad RO Mod, Does not remove Manhole if casted by Shadow Chaser [uddevil]
  23. +           if ((sd->status.class_ == JOB_SHADOW_CHASER_T) || (sd->status.class_ == JOB_SHADOW_CHASER) || (sd->status.class_ == JOB_BABY_CHASER)) {
  24. +               if (unit->group->skill_id != SC_MANHOLE) {
  25. +                   skill_delunit(unit);
  26. +               }
  27. +           } else {
  28. +               skill_delunit(unit);
  29. +           }
  30. +           return 1;
  31.         case HW_GANBANTEIN:
  32. +           skill_delunit(unit);
  33. +           return 1;
  34.         case LG_EARTHDRIVE:
  35. +           //ShowDebug("src_id=%d", unit->group->src_id);
  36. +           //ShowDebug("sd_test=%d", sd->status.class_);
  37.             // Officially songs/dances are removed
  38. -           skill_delunit(unit);
  39. +           // Cacad RO Mod, Does not remove Manhole if casted by Shadow Chaser [uddevil]
  40. +           if ((sd->status.class_ == JOB_SHADOW_CHASER_T) || (sd->status.class_ == JOB_SHADOW_CHASER) || (sd->status.class_ == JOB_BABY_CHASER)) {
  41. +               if (unit->group->skill_id != SC_MANHOLE) {
  42. +                   skill_delunit(unit);
  43. +               }
  44. +           } else {
  45. +               skill_delunit(unit);
  46. +           }
  47.             return 1;
  48.         case SA_VOLCANO:
  49.         case SA_DELUGE:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement