1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-25 04:36:12 -04:00

fixes #420 filtered out the saves with the hero type: 0 not to crash character select screen (#466)

This commit is contained in:
Gürkan Kaymak 2020-06-26 17:24:46 +03:00 committed by GitHub
parent 875081f6b2
commit b4cd37fe6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ func GetAllPlayerStates() []*PlayerState {
continue
}
gameState := LoadPlayerState(path.Join(basePath, file.Name()))
if gameState == nil {
if gameState == nil || gameState.HeroType == d2enum.HeroNone {
continue
// temporarily loading default class stats if the character was created before saving stats was introduced
// to be removed in the future