Fix missing blocks

master
kts of kettek(MindFire) 2020-01-15 15:09:06 -08:00
parent 9fc090e795
commit d09ffb861e
1 changed files with 9 additions and 6 deletions

View File

@ -1183,13 +1183,14 @@ void fix_object(object *op) {
wc-=(tmp->stats.wc+tmp->magic); wc-=(tmp->stats.wc+tmp->magic);
if (tmp->slaying!=NULL) { if (tmp->slaying!=NULL) {
if (op->slaying != NULL) if (op->slaying != NULL) {
sstring joined_str = join_strings(op->slaying, tmp->slaying, ","); sstring joined_str = join_strings(op->slaying, tmp->slaying, ",");
free_string(op->slaying); free_string(op->slaying);
op->slaying = joined_str; op->slaying = joined_str;
else } else {
add_refcount(op->slaying = tmp->slaying); add_refcount(op->slaying = tmp->slaying);
} }
}
if (tmp->stats.ac) if (tmp->stats.ac)
ac-=(tmp->stats.ac+tmp->magic); ac-=(tmp->stats.ac+tmp->magic);
@ -1237,13 +1238,14 @@ void fix_object(object *op) {
if (weapon_speed<0) if (weapon_speed<0)
weapon_speed=0; weapon_speed=0;
if (tmp->slaying!=NULL) { if (tmp->slaying!=NULL) {
if (op->slaying != NULL) if (op->slaying != NULL) {
sstring joined_str = join_strings(op->slaying, tmp->slaying, ","); sstring joined_str = join_strings(op->slaying, tmp->slaying, ",");
free_string(op->slaying); free_string(op->slaying);
op->slaying = joined_str; op->slaying = joined_str;
else } else {
add_refcount(op->slaying = tmp->slaying); add_refcount(op->slaying = tmp->slaying);
} }
}
/* If there is desire that two handed weapons should do /* If there is desire that two handed weapons should do
* extra strength damage, this is where the code should * extra strength damage, this is where the code should
* go. * go.
@ -1282,13 +1284,14 @@ void fix_object(object *op) {
if (ARMOUR_SPEED(tmp) && ARMOUR_SPEED(tmp)/10.0<max) if (ARMOUR_SPEED(tmp) && ARMOUR_SPEED(tmp)/10.0<max)
max=ARMOUR_SPEED(tmp)/10.0; max=ARMOUR_SPEED(tmp)/10.0;
if (tmp->slaying!=NULL) { if (tmp->slaying!=NULL) {
if (op->slaying != NULL) if (op->slaying != NULL) {
sstring joined_str = join_strings(op->slaying, tmp->slaying, ","); sstring joined_str = join_strings(op->slaying, tmp->slaying, ",");
free_string(op->slaying); free_string(op->slaying);
op->slaying = joined_str; op->slaying = joined_str;
else } else {
add_refcount(op->slaying = tmp->slaying); add_refcount(op->slaying = tmp->slaying);
} }
}
break; break;
} /* switch tmp->type */ } /* switch tmp->type */
} /* item is equipped */ } /* item is equipped */