summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-11 18:40:14 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-11 18:40:14 +0000
commit5abc71c7c7628c4e7691d2b629e5aa70cc528c76 (patch)
tree9648514e7316060c6a871e0e4e7ec28ccf899f9b /src/map/status.c
parent74fe52db48a34b056bbe3f1806c9ffd237f67a44 (diff)
downloadhercules-5abc71c7c7628c4e7691d2b629e5aa70cc528c76.tar.gz
hercules-5abc71c7c7628c4e7691d2b629e5aa70cc528c76.tar.bz2
hercules-5abc71c7c7628c4e7691d2b629e5aa70cc528c76.tar.xz
hercules-5abc71c7c7628c4e7691d2b629e5aa70cc528c76.zip
- simplified the code for @autoloot
- made @hominfo display the six basic stats. - Simplified the MD_DETECTOR checks, since now all insects/demons have it set, and it's no longer needed to check for the race. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9464 54d463be-8e91-2dee-dedb-b68131a5f0ec
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;
}