Parcourir la source

Fixed unknown type in map_destroyblock (#9217)

Fixes #9216

Thanks to @brynner23
Lemongrass3110 il y a 1 mois
Parent
commit
91c5fb0e6c
2 fichiers modifiés avec 4 ajouts et 5 suppressions
  1. 4 0
      src/map/map.cpp
  2. 0 5
      src/map/unit.cpp

+ 4 - 0
src/map/map.cpp

@@ -234,6 +234,10 @@ void map_destroyblock( block_list* bl ){
 	}
 
 	switch( bl->type ){
+		case BL_NUL:
+			// Dummy type, has no destructor
+			break;
+
 		case BL_PC:
 			// Do not call the destructor here, it will be done in chrif_auth_delete
 			//reinterpret_cast<map_session_data*>( bl )->~map_session_data();

+ 0 - 5
src/map/unit.cpp

@@ -3979,9 +3979,6 @@ int32 unit_free(struct block_list *bl, clr_type clrtype)
 
 			skill_clear_unitgroup(bl);
 			status_change_clear(bl,1);
-
-			// Do not call the destructor here, it will be done in chrif_auth_delete
-			// sd->~map_session_data();
 			break;
 		}
 		case BL_PET: {
@@ -4151,8 +4148,6 @@ int32 unit_free(struct block_list *bl, clr_type clrtype)
 
 			skill_clear_unitgroup(bl);
 			status_change_clear(bl,1);
-
-			ed->~s_elemental_data();
 			break;
 		}
 	}