mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-02 22:57:04 -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
|
package d2records
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2txt"
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2txt"
|
||||||
)
|
)
|
||||||
@ -125,6 +127,10 @@ func updateEquivalencies(
|
|||||||
itemType *ItemTypeRecord,
|
itemType *ItemTypeRecord,
|
||||||
checked []string,
|
checked []string,
|
||||||
) {
|
) {
|
||||||
|
if itemType == nil {
|
||||||
|
log.Fatal("invalid data file. Please ensure, yo're using the newest patch_d2.mpq file!")
|
||||||
|
}
|
||||||
|
|
||||||
if itemType.Code == "" {
|
if itemType.Code == "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user