Skip to content

Commit

Permalink
Follow up to ede39b1
Browse files Browse the repository at this point in the history
Fixed the compile errors on packet versions < 20150513
  • Loading branch information
Lemongrass3110 committed Aug 13, 2016
1 parent ede39b1 commit ebcb923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/map/pc.c
Expand Up @@ -1269,8 +1269,10 @@ bool pc_authok(struct map_session_data *sd, uint32 login_id2, time_t expiration_
sd->bonus_script.head = NULL;
sd->bonus_script.count = 0;

#if PACKETVER >= 20150513
sd->hatEffectIDs = NULL;
sd->hatEffectCount = 0;
#endif

// Check EXP overflow, since in previous revision EXP on Max Level can be more than 'official' Max EXP
if (pc_is_maxbaselv(sd) && sd->status.base_exp > MAX_LEVEL_BASE_EXP) {
Expand Down
2 changes: 2 additions & 0 deletions src/map/unit.c
Expand Up @@ -3211,11 +3211,13 @@ int unit_free(struct block_list *bl, clr_type clrtype)
}
sd->qi_count = 0;

#if PACKETVER >= 20150513
if( sd->hatEffectCount > 0 ){
aFree(sd->hatEffectIDs);
sd->hatEffectIDs = NULL;
sd->hatEffectCount = 0;
}
#endif

// Clearing...
if (sd->bonus_script.head)
Expand Down

0 comments on commit ebcb923

Please sign in to comment.