summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-04 05:21:17 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-04 05:21:17 +0000
commitff35e6448d38510b727c2f381260aac9969cf784 (patch)
tree011daac6cd85456ced50662ed32e0db7e33affd8 /src/map/skill.c
parent4e909b3f50b8a3750dc8af9075a763aafc2088a6 (diff)
downloadhercules-ff35e6448d38510b727c2f381260aac9969cf784.tar.gz
hercules-ff35e6448d38510b727c2f381260aac9969cf784.tar.bz2
hercules-ff35e6448d38510b727c2f381260aac9969cf784.tar.xz
hercules-ff35e6448d38510b727c2f381260aac9969cf784.zip
- Removed usage of MAX_PC_BONUS all over the code, it is now only used in map.h (this is done so that individual bonuses can have their array length modified without having to change all the other bonuses as well).
- Removed bonus bAddDamageByClass since it is not needed, and implemented bAddDefClass which can be used for the same (but previously was doing nothing). - Cleaned up the weapon_data structure to use a sub-structure to hold the add_dmg information. - Cleaned up some of the add dmg/def bonuses so the 'count' variable is not needed anymore. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11121 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 02d41c671..679753f2f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1433,7 +1433,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
skillid != CR_REFLECTSHIELD
){ //Trigger status effects
int i, type;
- for(i=0; i < MAX_PC_BONUS && sd->addeff[i].flag; i++)
+ for(i=0; i < ARRAYLENGTH(sd->addeff) && sd->addeff[i].flag; i++)
{
rate = sd->addeff[i].rate;
if (attack_type&BF_LONG) // Any ranged physical attack takes status arrows into account (Grimtooth...) [DracoRPG]
@@ -1469,7 +1469,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
struct unit_data *ud;
int i, skilllv;
- for (i = 0; i < MAX_PC_BONUS && sd->autospell[i].id; i++) {
+ for (i = 0; i < ARRAYLENGTH(sd->autospell) && sd->autospell[i].id; i++) {
if(!(sd->autospell[i].flag&attack_type&BF_WEAPONMASK &&
sd->autospell[i].flag&attack_type&BF_RANGEMASK &&
@@ -1609,7 +1609,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
if(dstsd && attack_type&BF_WEAPON)
{ //Counter effects.
int i, type, time;
- for(i=0; i < MAX_PC_BONUS && dstsd->addeff2[i].flag; i++)
+ for(i=0; i < ARRAYLENGTH(dstsd->addeff2) && dstsd->addeff2[i].flag; i++)
{
rate = dstsd->addeff2[i].rate;
if (attack_type&BF_LONG)
@@ -1641,7 +1641,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
struct unit_data *ud;
int i, skillid, skilllv, rate;
- for (i = 0; i < MAX_PC_BONUS && dstsd->autospell2[i].id; i++) {
+ for (i = 0; i < ARRAYLENGTH(dstsd->autospell2) && dstsd->autospell2[i].id; i++) {
if(!(dstsd->autospell2[i].flag&attack_type&BF_WEAPONMASK &&
dstsd->autospell2[i].flag&attack_type&BF_RANGEMASK &&