1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-23 03:35:59 -04:00

d2tbl loader returns string lookup table (#725)

* fix glfw error in ci workflow

* make the tbl loader return the string lookup table (for use in hellspawner)
This commit is contained in:
lord 2020-09-11 16:24:33 -07:00 committed by GitHub
parent 77c358ed67
commit 3988bd7f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ package d2tbl
import (
"log"
"strconv"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2datautils"
)
@ -35,7 +35,7 @@ func TranslateString(key string) string {
}
// LoadTextDictionary loads the text dictionary from the given data
func LoadTextDictionary(dictionaryData []byte) {
func LoadTextDictionary(dictionaryData []byte) map[string]string {
if lookupTable == nil {
lookupTable = make(map[string]string)
}
@ -105,4 +105,6 @@ func LoadTextDictionary(dictionaryData []byte) {
lookupTable[key] = value
}
}
return lookupTable
}