summaryrefslogtreecommitdiff
path: root/src/map/pc.h
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 01:08:05 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 01:08:05 +0000
commit9cf756c11d39101b139ed585e4d5891768a20a45 (patch)
tree2814272466940688dd18245a689fe4a9c7438eae /src/map/pc.h
parent49586af4b75b96010380576fe9ce0a9b67a83ac2 (diff)
downloadhercules-9cf756c11d39101b139ed585e4d5891768a20a45.tar.gz
hercules-9cf756c11d39101b139ed585e4d5891768a20a45.tar.bz2
hercules-9cf756c11d39101b139ed585e4d5891768a20a45.tar.xz
hercules-9cf756c11d39101b139ed585e4d5891768a20a45.zip
Improved bonus-adding processes by no longer having to add it to the zero'd memset bullshit, replaced it by moving the first set of bonus into its own struct and simply zeroing the struct prior to recalc.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16272 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.h')
-rw-r--r--src/map/pc.h68
1 files changed, 35 insertions, 33 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 1ee7f966e..0eb90344f 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -284,39 +284,41 @@ struct map_session_data {
struct s_autobonus autobonus[MAX_PC_BONUS], autobonus2[MAX_PC_BONUS], autobonus3[MAX_PC_BONUS]; //Auto script on attack, when attacked, on skill usage
// manually zeroed structures end here.
// zeroed vars start here.
- int atk_rate;
- int arrow_atk,arrow_ele,arrow_cri,arrow_hit;
- int nsshealhp,nsshealsp;
- int critical_def,double_rate;
- int long_attack_atk_rate; //Long range atk rate, not weapon based. [Skotlex]
- int near_attack_def_rate,long_attack_def_rate,magic_def_rate,misc_def_rate;
- int ignore_mdef_ele;
- int ignore_mdef_race;
- int perfect_hit;
- int perfect_hit_add;
- int get_zeny_rate;
- int get_zeny_num; //Added Get Zeny Rate [Skotlex]
- int double_add_rate;
- int short_weapon_damage_return,long_weapon_damage_return;
- int magic_damage_return; // AppleGirl Was Here
- int break_weapon_rate,break_armor_rate;
- int crit_atk_rate;
- int classchange; // [Valaris]
- int speed_rate, speed_add_rate, aspd_add;
- int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
- int shieldmdef;//royal guard's
- unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
-
- short splash_range, splash_add_range;
- short add_steal_rate;
- short add_heal_rate, add_heal2_rate;
- short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
- short sp_vanish_rate;
- short sp_vanish_per;
- short sp_weapon_matk,sp_base_matk;
- unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
- unsigned short unbreakable_equip; //100% break resistance on certain equipment
- unsigned short unstripable_equip;
+ struct {
+ int atk_rate;
+ int arrow_atk,arrow_ele,arrow_cri,arrow_hit;
+ int nsshealhp,nsshealsp;
+ int critical_def,double_rate;
+ int long_attack_atk_rate; //Long range atk rate, not weapon based. [Skotlex]
+ int near_attack_def_rate,long_attack_def_rate,magic_def_rate,misc_def_rate;
+ int ignore_mdef_ele;
+ int ignore_mdef_race;
+ int perfect_hit;
+ int perfect_hit_add;
+ int get_zeny_rate;
+ int get_zeny_num; //Added Get Zeny Rate [Skotlex]
+ int double_add_rate;
+ int short_weapon_damage_return,long_weapon_damage_return;
+ int magic_damage_return; // AppleGirl Was Here
+ int break_weapon_rate,break_armor_rate;
+ int crit_atk_rate;
+ int classchange; // [Valaris]
+ int speed_rate, speed_add_rate, aspd_add;
+ int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
+ int shieldmdef;//royal guard's
+ unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
+
+ short splash_range, splash_add_range;
+ short add_steal_rate;
+ short add_heal_rate, add_heal2_rate;
+ short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
+ short sp_vanish_rate;
+ short sp_vanish_per;
+ short sp_weapon_matk,sp_base_matk;
+ unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
+ unsigned short unbreakable_equip; //100% break resistance on certain equipment
+ unsigned short unstripable_equip;
+ } bonus;
// zeroed vars end here.