Follow up to 1e2032c Thanks to @Everade
@@ -6518,7 +6518,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if(!clif_skill_nodamage(src,bl,skill_id,skill_lv, sc_start(src,bl,type,(60+skill_lv*10),skill_lv, skill_get_time(skill_id,skill_lv)))) {
if (dstsd){
short index = dstsd->equip_index[EQI_HAND_R];
- if (index&EQP_WEAPON && dstsd->inventory_data[index]->type == IT_WEAPON)
+ if (index != -1 && dstsd->inventory_data[index] && dstsd->inventory_data[index]->type == IT_WEAPON)
pc_unequipitem(dstsd, index, 3); //Must unequip the weapon instead of breaking it [Daegaladh]
}
if (sd)