From 00ef66fb9261a50e6761cf77c11e7f468494c95f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 2 Feb 2014 16:50:03 -0200 Subject: Fixed item combo bypassing disabled item restrictions Special Thanks to Mhalicot! Also improves the overall memory usage of the item combo feature Signed-off-by: shennetsind --- src/map/unit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 7b37be266..320649a6c 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2363,11 +2363,11 @@ int unit_free(struct block_list *bl, clr_type clrtype) { sd->st = NULL; sd->npc_id = 0; } - if( sd->combos.count ) { - aFree(sd->combos.bonus); - aFree(sd->combos.id); - sd->combos.count = 0; + if( sd->combos ) { + aFree(sd->combos); + sd->combos = NULL; } + sd->combo_count = 0; /* [Ind/Hercules] */ if( sd->sc_display_count ) { for(i = 0; i < sd->sc_display_count; i++) { -- cgit v1.2.3-60-g2f50