diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 16 | ||||
-rw-r--r-- | src/map/status.c | 1 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index c7cc1edec..1e032a125 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1660,9 +1660,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) switch(type){
case SP_ADDELE:
- if(val >= ELE_MAX) {
+ if(type2 >= ELE_MAX) {
if(battle_config.error_log)
- ShowError("pc_bonus2: SP_ADDELE: Invalid element %d\n", val);
+ ShowError("pc_bonus2: SP_ADDELE: Invalid element %d\n", type2);
break;
}
if(!sd->state.lr_flag)
@@ -1689,9 +1689,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) sd->arrow_addsize[type2]+=val;
break;
case SP_SUBELE:
- if(val >= ELE_MAX) {
+ if(type2 >= ELE_MAX) {
if(battle_config.error_log)
- ShowError("pc_bonus2: SP_SUBELE: Invalid element %d\n", val);
+ ShowError("pc_bonus2: SP_SUBELE: Invalid element %d\n", type2);
break;
}
if(sd->state.lr_flag != 2)
@@ -1730,9 +1730,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) sd->reseff[type2-SC_COMMON_MIN]+=val;
break;
case SP_MAGIC_ADDELE:
- if(val >= ELE_MAX) {
+ if(type2 >= ELE_MAX) {
if(battle_config.error_log)
- ShowError("pc_bonus2: SP_MAGIC_ADDELE: Invalid element %d\n", val);
+ ShowError("pc_bonus2: SP_MAGIC_ADDELE: Invalid element %d\n", type2);
break;
}
if(sd->state.lr_flag != 2)
@@ -1896,9 +1896,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) }
break;
case SP_WEAPON_COMA_ELE:
- if(val >= ELE_MAX) {
+ if(type2 >= ELE_MAX) {
if(battle_config.error_log)
- ShowError("pc_bonus2: SP_WEAPON_COMA_ELE: Invalid element %d\n", val);
+ ShowError("pc_bonus2: SP_WEAPON_COMA_ELE: Invalid element %d\n", type2);
break;
}
if(sd->state.lr_flag != 2)
diff --git a/src/map/status.c b/src/map/status.c index 068e7a733..9b1e43268 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -625,6 +625,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s return hp+sp; //Normal death + status->hp = 0; if (battle_config.clear_unit_ondeath && battle_config.clear_unit_ondeath&target->type) skill_clear_unitgroup(target); |