Prechádzať zdrojové kódy

Follow up to ede39b1

Fixed the compile errors on packet versions < 20150513
Lemongrass3110 8 rokov pred
rodič
commit
ebcb92363b
2 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 2 0
      src/map/pc.c
  2. 2 0
      src/map/unit.c

+ 2 - 0
src/map/pc.c

@@ -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) {

+ 2 - 0
src/map/unit.c

@@ -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)