mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-16 01:17:10 -05:00
itemTypeLoader: wrap panic, which occures, when a wrong version of patch_d2 is there
This commit is contained in:
parent
2f4663c680
commit
966c86a6b5
@ -1,6 +1,8 @@
|
||||
package d2records
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2txt"
|
||||
)
|
||||
@ -125,6 +127,10 @@ func updateEquivalencies(
|
||||
itemType *ItemTypeRecord,
|
||||
checked []string,
|
||||
) {
|
||||
if itemType == nil {
|
||||
log.Fatal("invalid data file. Please ensure, yo're using the newest patch_d2.mpq file!")
|
||||
}
|
||||
|
||||
if itemType.Code == "" {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user