diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 01:57:08 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 01:57:08 +0000 |
commit | 6f51acd64405e1f081e1a54a5c3f5c3b5431bc70 (patch) | |
tree | a8bc02495db478fcd7cea8704857de9ab96dc981 /src/map/map.h | |
parent | d305f53531e7dd0b4c29a677ff829379aac7e890 (diff) | |
download | hercules-6f51acd64405e1f081e1a54a5c3f5c3b5431bc70.tar.gz hercules-6f51acd64405e1f081e1a54a5c3f5c3b5431bc70.tar.bz2 hercules-6f51acd64405e1f081e1a54a5c3f5c3b5431bc70.tar.xz hercules-6f51acd64405e1f081e1a54a5c3f5c3b5431bc70.zip |
- Applied use of structure regen_data for a unified regen module. Natural and skill-heal is handled by this structure, while sitting-skill-heal is still player dependant (mostly because the other object types can't sit)
- Added SCB_REGEN constant to identify status changes which alter regeneration
- Modified SC_REGENERATION so that if val4 is set, the status actually blocks regen rather than increase it, this is what now Frenzy uses instead of "canregen_tick"
- Cleaned up the status calc code for homun by moving it from status_calc_bl_sub_homun to status_calc_homun (where it should had always been)
- Moved the Fleet watk code to status_calc_watk where it belongs.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8334 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r-- | src/map/map.h | 48 |
1 files changed, 19 insertions, 29 deletions
diff --git a/src/map/map.h b/src/map/map.h index 0237aff2c..e1bcf2169 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -467,28 +467,25 @@ struct view_data { struct regen_data {
- int flag; //Marks what stuff you may heal or not.
- unsigned int
- hp_tick, //tick accumulation before healing.
- sp_tick,
- shp_tick,
- ssp_tick;
-
+ unsigned short flag; //Marks what stuff you may heal or not.
unsigned short
- hp, //natural heal
- sp,
- s_hp, //natural heal from skills
- s_sp;
-
- unsigned char //Skill related regen rates.
- hpfactor,
- spfactor,
- shpfactor,
- sspfactor;
+ hp,sp,shp,ssp;
+
+ //tick accumulation before healing.
+ struct {
+ unsigned int hp,sp,shp,ssp;
+ } tick;
+
+ //Regen rates (where every 1 means +100% regen)
+ struct {
+ unsigned char
+ hp,sp,shp,ssp;
+ } rate;
struct {
- unsigned walk_regen :1; //Can you regen even when walking?
- unsigned overweight :1; //Block regen due to overweight.
+ unsigned walk:1; //Can you regen even when walking?
+ unsigned gc:1; //Tags when you should have double regen due to GVG castle
+ unsigned overweight :2; //overweight state (1: 50%, 2: 90%)
unsigned block :2; //Block regen flag (1: Hp, 2: Sp)
} state;
};
@@ -524,6 +521,7 @@ struct map_session_data { struct status_data base_status, battle_status;
struct weapon_atk base_lhw, battle_lhw; //Left-hand weapon atk data.
struct status_change sc;
+ struct regen_data regen;
//NOTE: When deciding to add a flag to state or special_state, take into consideration that state is preserved in
//status_calc_pc, while special_state is recalculated in each call. [Skotlex]
struct {
@@ -627,11 +625,9 @@ struct map_session_data { int invincible_timer;
unsigned int canlog_tick;
- unsigned int canregen_tick;
unsigned int canuseitem_tick; // [Skotlex]
unsigned int cantalk_tick;
- int hp_sub,sp_sub;
- int inchealhptick,inchealsptick,inchealspirithptick,inchealspiritsptick;
+ int inchealspirithptick,inchealspiritsptick;
short weapontype1,weapontype2;
short disguise; // [Valaris]
@@ -720,7 +716,6 @@ struct map_session_data { unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
unsigned short unbreakable_equip; //100% break resistance on certain equipment
unsigned short unstripable_equip;
- short no_regen;
short add_def_count,add_mdef_count;
short add_dmg_count,add_mdmg_count;
@@ -966,17 +961,12 @@ struct homun_data { struct view_data *vd;
struct status_data base_status, battle_status;
struct status_change sc;
+ struct regen_data regen;
struct homunculus_db *homunculusDB; //[orn]
struct map_session_data *master; //pointer back to its master
-
int hungry_timer; //[orn]
-
int target_id,attacked_id;
-
- int natural_heal_timer; //[orn]
-
- unsigned short regenhp,regensp;
unsigned long exp_next;
char blockskill[MAX_SKILL]; // [orn]
};
|