summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c48
1 files changed, 15 insertions, 33 deletions
diff --git a/src/map/status.c b/src/map/status.c
index dee934c8f..81837bef1 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1087,12 +1087,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
struct map_session_data *sd = (TBL_PC*) target;
if (pc_isinvisible(sd))
return 0;
- if (tsc->option&hide_flag && !(status->mode&MD_BOSS)
- && (sd->special_state.perfect_hiding || !(
- status->race == RC_INSECT ||
- status->race == RC_DEMON ||
- status->mode&MD_DETECTOR
- )))
+ if (tsc->option&hide_flag && !(status->mode&MD_BOSS) &&
+ (sd->special_state.perfect_hiding || !(status->mode&MD_DETECTOR)))
return 0;
}
break;
@@ -1110,15 +1106,9 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
return 0;
default:
//Check for chase-walk/hiding/cloaking opponents.
- if (tsc && !(status->mode&MD_BOSS))
- {
- if (tsc->option&hide_flag && !(
- status->race == RC_INSECT ||
- status->race == RC_DEMON ||
- status->mode&MD_DETECTOR
- ))
- return 0;
- }
+ if (tsc && tsc->option&hide_flag && !(status->mode&MD_BOSS) &&
+ !(status->mode&MD_DETECTOR))
+ return 0;
}
return 1;
}
@@ -1144,32 +1134,24 @@ int status_check_visibility(struct block_list *src, struct block_list *target)
return 0;
switch (target->type)
- {
+ { //Check for chase-walk/hiding/cloaking opponents.
case BL_PC:
{
- if (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK)
- && !(status->mode&MD_BOSS) && (
- ((TBL_PC*)target)->special_state.perfect_hiding || !(
- status->race == RC_INSECT ||
- status->race == RC_DEMON ||
- status->mode&MD_DETECTOR
- )))
+ if(tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) &&
+ !(status->mode&MD_BOSS) &&
+ (
+ ((TBL_PC*)target)->special_state.perfect_hiding ||
+ !(status->mode&MD_DETECTOR)
+ ))
return 0;
}
break;
default:
- //Check for chase-walk/hiding/cloaking opponents.
- if (tsc && !(status->mode&MD_BOSS))
- {
- if (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK)
- && !(
- status->race == RC_INSECT ||
- status->race == RC_DEMON ||
- status->mode&MD_DETECTOR
- ))
+ if (tsc && tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) &&
+ !(status->mode&MD_BOSS) && !(status->mode&MD_DETECTOR))
return 0;
- }
}
+
return 1;
}