浏览代码

Fixed unknown type in map_destroyblock (#9217)

Fixes #9216

Thanks to @brynner23
Lemongrass3110 1 月之前
父节点
当前提交
91c5fb0e6c
共有 2 个文件被更改,包括 4 次插入5 次删除
  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;
 		}
 	}