summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-02-02 16:50:03 -0200
committershennetsind <ind@henn.et>2014-02-02 16:50:03 -0200
commit00ef66fb9261a50e6761cf77c11e7f468494c95f (patch)
treec1bc879e76ecaaf619366d6392c13a72bb5640b9 /src/map/unit.c
parentd33469689ea8e671fa0d525d54bce6932dfe9107 (diff)
downloadhercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.tar.gz
hercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.tar.bz2
hercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.tar.xz
hercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c8
1 files changed, 4 insertions, 4 deletions
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++) {