Cleaned up hat effect code (#5462)

Converted from self written container to std::vector.
Converted clif code to struct usage.
This commit is contained in:
Lemongrass3110
2020-10-23 01:07:12 +02:00
committed by GitHub
parent 7336058485
commit ed473d066d
7 changed files with 47 additions and 62 deletions

View File

@@ -3401,12 +3401,8 @@ 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;
}
#if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
sd->hatEffects.clear();
#endif
if (sd->achievement_data.achievements)