- 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://svn.code.sf.net/p/rathena/svn/trunk@8687 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-09-09 16:52:24 +00:00
parent 2b63a85789
commit 2487548c72
6 changed files with 15 additions and 7 deletions

View File

@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/09 2006/09/09
* Moved perfect_hiding from state to special_state, so that it clears out
when you remove your pet. [Skotlex]
* Probably fixed the Taekwon Rest skills. [Skotlex]
* Fixed a npc-timer memory leak on npc_unload ("[Warning]: ers_obj_destroy: * Fixed a npc-timer memory leak on npc_unload ("[Warning]: ers_obj_destroy:
X entries missing, continuing destruction. Manager for entries of size X entries missing, continuing destruction. Manager for entries of size
16.") [Skotlex] 16.") [Skotlex]

View File

@ -575,7 +575,6 @@ struct map_session_data {
// Abracadabra bugfix by Aru // Abracadabra bugfix by Aru
unsigned abra_flag : 1; unsigned abra_flag : 1;
unsigned autotrade : 1; //By Fantik 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 reg_dirty : 3; //By Skotlex (marks whether registry variables have been saved or not yet)
unsigned showdelay :1; unsigned showdelay :1;
unsigned showexp :1; unsigned showexp :1;
@ -607,6 +606,7 @@ struct map_session_data {
unsigned no_sizefix : 1; unsigned no_sizefix : 1;
unsigned no_gemstone : 1; unsigned no_gemstone : 1;
unsigned intravision : 1; // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG] unsigned intravision : 1; // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
unsigned perfect_hiding : 1; // [Valaris]
} special_state; } special_state;
int char_id, login_id1, login_id2, sex; 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] unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]

View File

@ -1710,7 +1710,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
break; break;
case SP_PERFECT_HIDE: // [Valaris] case SP_PERFECT_HIDE: // [Valaris]
if(sd->state.lr_flag!=2) if(sd->state.lr_flag!=2)
sd->state.perfect_hiding=1; sd->special_state.perfect_hiding=1;
break; break;
case SP_UNBREAKABLE: case SP_UNBREAKABLE:
if(sd->state.lr_flag!=2) if(sd->state.lr_flag!=2)

View File

@ -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 )) if(type&2 && (pc_checkskill(sd,TK_HPTIME) > 0 || pc_checkskill(sd,TK_SPTIME) > 0 ))
{ {
sd->state.rest=1; 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; return 0;
@ -8969,8 +8970,11 @@ static int skill_sit_out (struct block_list *bl, va_list ap)
sd=(struct map_session_data*)bl; sd=(struct map_session_data*)bl;
if(sd->state.gangsterparadise && type&1) if(sd->state.gangsterparadise && type&1)
sd->state.gangsterparadise=0; sd->state.gangsterparadise=0;
if(sd->state.rest && type&2) if(sd->state.rest && type&2) {
sd->state.rest=0; sd->state.rest=0;
status_calc_regen(bl, &sd->battle_status, &sd->regen);
status_calc_regen_rate(bl, &sd->regen, &sd->sc);
}
return 0; return 0;
} }
@ -8981,7 +8985,7 @@ int skill_sit (struct map_session_data *sd, int type)
nullpo_retr(0, sd); nullpo_retr(0, sd);
if((lv = pc_checkskill(sd,RG_GANGSTER)) <= 0) { if((lv = pc_checkskill(sd,RG_GANGSTER)) > 0) {
flag|=1; flag|=1;
range = skill_get_splash(RG_GANGSTER, lv); range = skill_get_splash(RG_GANGSTER, lv);
} }

View File

@ -1082,7 +1082,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (pc_isinvisible(sd)) if (pc_isinvisible(sd))
return 0; return 0;
if (tsc->option&hide_flag && !(status->mode&MD_BOSS) 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_INSECT ||
status->race == RC_DEMON || status->race == RC_DEMON ||
status->mode&MD_DETECTOR 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) if (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK)
&& !(status->mode&MD_BOSS) && ( && !(status->mode&MD_BOSS) && (
((TBL_PC*)target)->state.perfect_hiding || !( ((TBL_PC*)target)->special_state.perfect_hiding || !(
status->race == RC_INSECT || status->race == RC_INSECT ||
status->race == RC_DEMON || status->race == RC_DEMON ||
status->mode&MD_DETECTOR status->mode&MD_DETECTOR

View File

@ -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); 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_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(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); void status_freecast_switch(struct map_session_data *sd);
int status_getrefinebonus(int lv,int type); int status_getrefinebonus(int lv,int type);