summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-03-17 15:15:16 +0100
committerHaru <haru@dotalux.com>2016-03-17 15:15:16 +0100
commit7117106f873e954e820a4be3ed3b8687e96fd1fe (patch)
treee7e8718a41e4029e362ae6424b1e75d713dd760a
parent3cecbe83ddf16d2884706a3a77f24a0228b794bd (diff)
parent327f9679f0f47bca96af2ef870ac5851bd6293ab (diff)
downloadhercules-7117106f873e954e820a4be3ed3b8687e96fd1fe.tar.gz
hercules-7117106f873e954e820a4be3ed3b8687e96fd1fe.tar.bz2
hercules-7117106f873e954e820a4be3ed3b8687e96fd1fe.tar.xz
hercules-7117106f873e954e820a4be3ed3b8687e96fd1fe.zip
Merge pull request #1202 from Kolkka/master
Fixes #1198 and fixes #1194 introduced in pull request #1189
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/status.c14
-rw-r--r--src/map/status.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 0d2bca84d..5c5ec131d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -657,7 +657,7 @@ END_ZEROED_BLOCK;
#define pc_stop_attack(sd) (unit->stop_attack(&(sd)->bl))
//Weapon check considering dual wielding.
-#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \
+#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_SINGLE_WEAPON_TYPE? \
1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)|(1<<(sd)->status.weapon)))
// clientside display macros (values to the left/right of the "+")
diff --git a/src/map/status.c b/src/map/status.c
index 82c427317..f8cd2940a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2718,7 +2718,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
// Base batk value is set on status->calc_misc
// weapon-type bonus (FIXME: Why is the weapon_atk bonus applied to base attack?)
- if (sd->status.weapon < MAX_WEAPON_TYPE && sd->weapon_atk[sd->status.weapon])
+ if (sd->status.weapon < MAX_SINGLE_WEAPON_TYPE && sd->weapon_atk[sd->status.weapon])
bstatus->batk += sd->weapon_atk[sd->status.weapon];
// Absolute modifiers from passive skills
#ifndef RENEWAL
@@ -4189,10 +4189,10 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
float temp;
int skill_lv, val = 0;
amotion = status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1];
- if ( sd->status.weapon > MAX_WEAPON_TYPE )
+ if ( sd->status.weapon > MAX_SINGLE_WEAPON_TYPE)
amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] / 4;
if ( sd->status.shield )
- amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE];
+ amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][MAX_SINGLE_WEAPON_TYPE];
switch ( sd->status.weapon ) {
case W_BOW:
case W_MUSICAL:
@@ -4215,7 +4215,7 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
amotion = ((int)(temp + ((float)(status->calc_aspd(&sd->bl, &sd->sc, 1) + val) * st->agi / 200)) - min(amotion, 200));
#else
// base weapon delay
- amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
+ amotion = (sd->status.weapon < MAX_SINGLE_WEAPON_TYPE)
? (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
: (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 7 / 10; // dual-wield
@@ -12603,7 +12603,7 @@ void status_read_job_db_sub(int idx, const char *name, struct config_setting_t *
{ "FuumaShuriken", W_HUUMA },
{ "TwoHandRod", W_2HSTAFF },
#ifdef RENEWAL_ASPD
- { "Shield", MAX_WEAPON_TYPE }
+ { "Shield", MAX_SINGLE_WEAPON_TYPE }
#endif
};
@@ -12999,10 +12999,10 @@ int status_readdb(void)
memset(status->dbs->job_bonus,0,sizeof(status->dbs->job_bonus)); // Job-specific stats bonus
}
for ( i = 0; i < CLASS_COUNT; i++ ) {
- for ( j = 0; j < MAX_WEAPON_TYPE; j++ )
+ for ( j = 0; j < MAX_SINGLE_WEAPON_TYPE; j++ )
status->dbs->aspd_base[i][j] = 2000;
#ifdef RENEWAL_ASPD
- status->dbs->aspd_base[i][MAX_WEAPON_TYPE] = 0;
+ status->dbs->aspd_base[i][MAX_SINGLE_WEAPON_TYPE] = 0;
#endif
}
diff --git a/src/map/status.h b/src/map/status.h
index 046227b78..fda700387 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -2162,7 +2162,7 @@ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when sta
int max_weight_base[CLASS_COUNT];
int HP_table[CLASS_COUNT][MAX_LEVEL + 1];
int SP_table[CLASS_COUNT][MAX_LEVEL + 1];
- int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD
+ int aspd_base[CLASS_COUNT][MAX_SINGLE_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD
sc_type Skill2SCTable[MAX_SKILL]; // skill -> status
int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated)
unsigned int ChangeFlagTable[SC_MAX]; // status -> flags