summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-01 13:17:45 -0200
committershennetsind <ind@henn.et>2013-12-01 13:17:45 -0200
commite115c30bde414fc82a617645c7fadeabd04cf56f (patch)
tree7ac8ff845119d4d81d94a4e7d03654865b2e3bdc /src/map
parent4e20f139fa7d0ebd6de30fde9b91ec5e235981d2 (diff)
downloadhercules-e115c30bde414fc82a617645c7fadeabd04cf56f.tar.gz
hercules-e115c30bde414fc82a617645c7fadeabd04cf56f.tar.bz2
hercules-e115c30bde414fc82a617645c7fadeabd04cf56f.tar.xz
hercules-e115c30bde414fc82a617645c7fadeabd04cf56f.zip
Fixed Bug 7866
Fixed EQI_SHADOW_ACC_L ability to produce bonuses, Special Thanks to rosfus, Angelmelody. http://hercules.ws/board/tracker/issue-7866-eqi-shadow-acc-l-missing-effect/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c3
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/status.c6
3 files changed, 10 insertions, 7 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3976c8427..be68a399e 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2051,9 +2051,10 @@ ACMD(refine)
refine = cap_value(refine, -MAX_REFINE, MAX_REFINE);
count = 0;
- for (j = 0; j < EQI_MAX-1; j++) {
+ for (j = 0; j < EQI_MAX; j++) {
if ((i = sd->equip_index[j]) < 0)
continue;
+ if(j == EQI_AMMO) continue; /* can't equip ammo */
if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == i)
continue;
if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == i)
diff --git a/src/map/pc.c b/src/map/pc.c
index feca11758..64fbd77f3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2002,8 +2002,8 @@ int pc_delautobonus(struct map_session_data* sd, struct s_autobonus *autobonus,c
if( autobonus[i].bonus_script )
{
int j;
- ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
- if( j < EQI_MAX-1 )
+ ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
+ if( j < EQI_MAX )
script->run_autobonus(autobonus[i].bonus_script,sd->bl.id,sd->equip_index[j]);
}
continue;
@@ -2033,8 +2033,8 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
if( autobonus->other_script )
{
int j;
- ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
- if( j < EQI_MAX-1 )
+ ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
+ if( j < EQI_MAX )
script->run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]);
}
diff --git a/src/map/status.c b/src/map/status.c
index 29a1689a1..be004e918 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2453,10 +2453,11 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
pc->delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true);
// Parse equipment.
- for(i=0;i<EQI_MAX-1;i++) {
+ for(i=0;i<EQI_MAX;i++) {
status->current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to status->current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
if(index < 0)
continue;
+ if(i == EQI_AMMO) continue;/* ammo has special handler down there */
if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index)
continue;
if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index)
@@ -2588,10 +2589,11 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
bstatus->def += (refinedef+50)/100;
//Parse Cards
- for(i=0;i<EQI_MAX-1;i++) {
+ for(i=0;i<EQI_MAX;i++) {
status->current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to status->current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
if(index < 0)
continue;
+ if(i == EQI_AMMO) continue;/* ammo doesn't have cards */
if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index)
continue;
if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index)