summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-09 16:52:24 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-09 16:52:24 +0000
commitf7a7b1d041ff396d96468be30bc4914e626979b3 (patch)
treeeadb9ef5f012dc1806186edeea43bb54e793a7ea /src/map
parent49000e689a2516db20060d88871762f5a3bcac39 (diff)
downloadhercules-f7a7b1d041ff396d96468be30bc4914e626979b3.tar.gz
hercules-f7a7b1d041ff396d96468be30bc4914e626979b3.tar.bz2
hercules-f7a7b1d041ff396d96468be30bc4914e626979b3.tar.xz
hercules-f7a7b1d041ff396d96468be30bc4914e626979b3.zip
- Moved perfect_hiding from state to special_state, so that it clears out when you remove your pet.
- Probably fixed the Taekwon Rest skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8687 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/skill.c10
-rw-r--r--src/map/status.c4
-rw-r--r--src/map/status.h1
5 files changed, 12 insertions, 7 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 4249babd4..32394a3e7 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -575,7 +575,6 @@ struct map_session_data {
// Abracadabra bugfix by Aru
unsigned abra_flag : 1;
unsigned autotrade : 1; //By Fantik
- unsigned perfect_hiding : 1; // [Valaris]
unsigned reg_dirty : 3; //By Skotlex (marks whether registry variables have been saved or not yet)
unsigned showdelay :1;
unsigned showexp :1;
@@ -607,6 +606,7 @@ struct map_session_data {
unsigned no_sizefix : 1;
unsigned no_gemstone : 1;
unsigned intravision : 1; // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
+ unsigned perfect_hiding : 1; // [Valaris]
} special_state;
int char_id, login_id1, login_id2, sex;
unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]
diff --git a/src/map/pc.c b/src/map/pc.c
index 855a84979..f6bed1846 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1710,7 +1710,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
break;
case SP_PERFECT_HIDE: // [Valaris]
if(sd->state.lr_flag!=2)
- sd->state.perfect_hiding=1;
+ sd->special_state.perfect_hiding=1;
break;
case SP_UNBREAKABLE:
if(sd->state.lr_flag!=2)
diff --git a/src/map/skill.c b/src/map/skill.c
index 5d3ae3f3d..aa5df9d19 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8956,7 +8956,8 @@ static int skill_sit_in (struct block_list *bl, va_list ap)
if(type&2 && (pc_checkskill(sd,TK_HPTIME) > 0 || pc_checkskill(sd,TK_SPTIME) > 0 ))
{
sd->state.rest=1;
- status_calc_regen(bl, status_get_status_data(bl), status_get_regen_data(bl));
+ status_calc_regen(bl, &sd->battle_status, &sd->regen);
+ status_calc_regen_rate(bl, &sd->regen, &sd->sc);
}
return 0;
@@ -8969,8 +8970,11 @@ static int skill_sit_out (struct block_list *bl, va_list ap)
sd=(struct map_session_data*)bl;
if(sd->state.gangsterparadise && type&1)
sd->state.gangsterparadise=0;
- if(sd->state.rest && type&2)
+ if(sd->state.rest && type&2) {
sd->state.rest=0;
+ status_calc_regen(bl, &sd->battle_status, &sd->regen);
+ status_calc_regen_rate(bl, &sd->regen, &sd->sc);
+ }
return 0;
}
@@ -8981,7 +8985,7 @@ int skill_sit (struct map_session_data *sd, int type)
nullpo_retr(0, sd);
- if((lv = pc_checkskill(sd,RG_GANGSTER)) <= 0) {
+ if((lv = pc_checkskill(sd,RG_GANGSTER)) > 0) {
flag|=1;
range = skill_get_splash(RG_GANGSTER, lv);
}
diff --git a/src/map/status.c b/src/map/status.c
index 39530e5d5..069e02f64 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1082,7 +1082,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (pc_isinvisible(sd))
return 0;
if (tsc->option&hide_flag && !(status->mode&MD_BOSS)
- && (sd->state.perfect_hiding || !(
+ && (sd->special_state.perfect_hiding || !(
status->race == RC_INSECT ||
status->race == RC_DEMON ||
status->mode&MD_DETECTOR
@@ -1137,7 +1137,7 @@ int status_check_visibility(struct block_list *src, struct block_list *target)
{
if (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK)
&& !(status->mode&MD_BOSS) && (
- ((TBL_PC*)target)->state.perfect_hiding || !(
+ ((TBL_PC*)target)->special_state.perfect_hiding || !(
status->race == RC_INSECT ||
status->race == RC_DEMON ||
status->mode&MD_DETECTOR
diff --git a/src/map/status.h b/src/map/status.h
index 15d0f0bf3..c53387026 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -638,6 +638,7 @@ int status_calc_mob(struct mob_data* md, int first); //[Skotlex]
int status_calc_homunculus(struct homun_data *hd, int first);
void status_calc_misc(struct block_list *bl, struct status_data *status, int level);
void status_calc_regen(struct block_list *bl, struct status_data *status, struct regen_data *regen);
+void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, struct status_change *sc);
void status_freecast_switch(struct map_session_data *sd);
int status_getrefinebonus(int lv,int type);